partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
FermiDos.get_fermi
Finds the fermi level at which the doping concentration at the given temperature (T) is equal to c. A greedy algorithm is used where the relative error is minimized by calculating the doping at a grid which is continuously become finer. Args: c (float): doping concentration....
pymatgen/electronic_structure/dos.py
def get_fermi(self, c, T, rtol=0.01, nstep=50, step=0.1, precision=8): """ Finds the fermi level at which the doping concentration at the given temperature (T) is equal to c. A greedy algorithm is used where the relative error is minimized by calculating the doping at a grid which ...
def get_fermi(self, c, T, rtol=0.01, nstep=50, step=0.1, precision=8): """ Finds the fermi level at which the doping concentration at the given temperature (T) is equal to c. A greedy algorithm is used where the relative error is minimized by calculating the doping at a grid which ...
[ "Finds", "the", "fermi", "level", "at", "which", "the", "doping", "concentration", "at", "the", "given", "temperature", "(", "T", ")", "is", "equal", "to", "c", ".", "A", "greedy", "algorithm", "is", "used", "where", "the", "relative", "error", "is", "mi...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L528-L557
[ "def", "get_fermi", "(", "self", ",", "c", ",", "T", ",", "rtol", "=", "0.01", ",", "nstep", "=", "50", ",", "step", "=", "0.1", ",", "precision", "=", "8", ")", ":", "fermi", "=", "self", ".", "efermi", "# initialize target fermi", "for", "_", "in...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.get_site_orbital_dos
Get the Dos for a particular orbital of a particular site. Args: site: Site in Structure associated with CompleteDos. orbital: Orbital in the site. Returns: Dos containing densities for orbital of site.
pymatgen/electronic_structure/dos.py
def get_site_orbital_dos(self, site, orbital): """ Get the Dos for a particular orbital of a particular site. Args: site: Site in Structure associated with CompleteDos. orbital: Orbital in the site. Returns: Dos containing densities for orbital of si...
def get_site_orbital_dos(self, site, orbital): """ Get the Dos for a particular orbital of a particular site. Args: site: Site in Structure associated with CompleteDos. orbital: Orbital in the site. Returns: Dos containing densities for orbital of si...
[ "Get", "the", "Dos", "for", "a", "particular", "orbital", "of", "a", "particular", "site", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L589-L600
[ "def", "get_site_orbital_dos", "(", "self", ",", "site", ",", "orbital", ")", ":", "return", "Dos", "(", "self", ".", "efermi", ",", "self", ".", "energies", ",", "self", ".", "pdos", "[", "site", "]", "[", "orbital", "]", ")" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.get_site_dos
Get the total Dos for a site (all orbitals). Args: site: Site in Structure associated with CompleteDos. Returns: Dos containing summed orbital densities for site.
pymatgen/electronic_structure/dos.py
def get_site_dos(self, site): """ Get the total Dos for a site (all orbitals). Args: site: Site in Structure associated with CompleteDos. Returns: Dos containing summed orbital densities for site. """ site_dos = functools.reduce(add_densities, se...
def get_site_dos(self, site): """ Get the total Dos for a site (all orbitals). Args: site: Site in Structure associated with CompleteDos. Returns: Dos containing summed orbital densities for site. """ site_dos = functools.reduce(add_densities, se...
[ "Get", "the", "total", "Dos", "for", "a", "site", "(", "all", "orbitals", ")", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L602-L613
[ "def", "get_site_dos", "(", "self", ",", "site", ")", ":", "site_dos", "=", "functools", ".", "reduce", "(", "add_densities", ",", "self", ".", "pdos", "[", "site", "]", ".", "values", "(", ")", ")", "return", "Dos", "(", "self", ".", "efermi", ",", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.get_site_spd_dos
Get orbital projected Dos of a particular site Args: site: Site in Structure associated with CompleteDos. Returns: dict of {orbital: Dos}, e.g. {"s": Dos object, ...}
pymatgen/electronic_structure/dos.py
def get_site_spd_dos(self, site): """ Get orbital projected Dos of a particular site Args: site: Site in Structure associated with CompleteDos. Returns: dict of {orbital: Dos}, e.g. {"s": Dos object, ...} """ spd_dos = dict() for orb, pdo...
def get_site_spd_dos(self, site): """ Get orbital projected Dos of a particular site Args: site: Site in Structure associated with CompleteDos. Returns: dict of {orbital: Dos}, e.g. {"s": Dos object, ...} """ spd_dos = dict() for orb, pdo...
[ "Get", "orbital", "projected", "Dos", "of", "a", "particular", "site" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L615-L633
[ "def", "get_site_spd_dos", "(", "self", ",", "site", ")", ":", "spd_dos", "=", "dict", "(", ")", "for", "orb", ",", "pdos", "in", "self", ".", "pdos", "[", "site", "]", ".", "items", "(", ")", ":", "orbital_type", "=", "_get_orb_type", "(", "orb", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.get_site_t2g_eg_resolved_dos
Get the t2g, eg projected DOS for a particular site. Args: site: Site in Structure associated with CompleteDos. Returns: A dict {"e_g": Dos, "t2g": Dos} containing summed e_g and t2g DOS for the site.
pymatgen/electronic_structure/dos.py
def get_site_t2g_eg_resolved_dos(self, site): """ Get the t2g, eg projected DOS for a particular site. Args: site: Site in Structure associated with CompleteDos. Returns: A dict {"e_g": Dos, "t2g": Dos} containing summed e_g and t2g DOS for the site....
def get_site_t2g_eg_resolved_dos(self, site): """ Get the t2g, eg projected DOS for a particular site. Args: site: Site in Structure associated with CompleteDos. Returns: A dict {"e_g": Dos, "t2g": Dos} containing summed e_g and t2g DOS for the site....
[ "Get", "the", "t2g", "eg", "projected", "DOS", "for", "a", "particular", "site", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L635-L658
[ "def", "get_site_t2g_eg_resolved_dos", "(", "self", ",", "site", ")", ":", "t2g_dos", "=", "[", "]", "eg_dos", "=", "[", "]", "for", "s", ",", "atom_dos", "in", "self", ".", "pdos", ".", "items", "(", ")", ":", "if", "s", "==", "site", ":", "for", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.get_spd_dos
Get orbital projected Dos. Returns: dict of {orbital: Dos}, e.g. {"s": Dos object, ...}
pymatgen/electronic_structure/dos.py
def get_spd_dos(self): """ Get orbital projected Dos. Returns: dict of {orbital: Dos}, e.g. {"s": Dos object, ...} """ spd_dos = {} for atom_dos in self.pdos.values(): for orb, pdos in atom_dos.items(): orbital_type = _get_orb_type...
def get_spd_dos(self): """ Get orbital projected Dos. Returns: dict of {orbital: Dos}, e.g. {"s": Dos object, ...} """ spd_dos = {} for atom_dos in self.pdos.values(): for orb, pdos in atom_dos.items(): orbital_type = _get_orb_type...
[ "Get", "orbital", "projected", "Dos", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L660-L677
[ "def", "get_spd_dos", "(", "self", ")", ":", "spd_dos", "=", "{", "}", "for", "atom_dos", "in", "self", ".", "pdos", ".", "values", "(", ")", ":", "for", "orb", ",", "pdos", "in", "atom_dos", ".", "items", "(", ")", ":", "orbital_type", "=", "_get_...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.get_element_dos
Get element projected Dos. Returns: dict of {Element: Dos}
pymatgen/electronic_structure/dos.py
def get_element_dos(self): """ Get element projected Dos. Returns: dict of {Element: Dos} """ el_dos = {} for site, atom_dos in self.pdos.items(): el = site.specie for pdos in atom_dos.values(): if el not in el_dos: ...
def get_element_dos(self): """ Get element projected Dos. Returns: dict of {Element: Dos} """ el_dos = {} for site, atom_dos in self.pdos.items(): el = site.specie for pdos in atom_dos.values(): if el not in el_dos: ...
[ "Get", "element", "projected", "Dos", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L679-L696
[ "def", "get_element_dos", "(", "self", ")", ":", "el_dos", "=", "{", "}", "for", "site", ",", "atom_dos", "in", "self", ".", "pdos", ".", "items", "(", ")", ":", "el", "=", "site", ".", "specie", "for", "pdos", "in", "atom_dos", ".", "values", "(",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.spin_polarization
Calculates spin polarization at Fermi level. See Sanvito et al., doi: 10.1126/sciadv.1602241 for an example usage. :return (float): spin polarization in range [0, 1], will also return NaN if spin polarization ill-defined (e.g. for insulator)
pymatgen/electronic_structure/dos.py
def spin_polarization(self): """ Calculates spin polarization at Fermi level. See Sanvito et al., doi: 10.1126/sciadv.1602241 for an example usage. :return (float): spin polarization in range [0, 1], will also return NaN if spin polarization ill-defined (e.g. fo...
def spin_polarization(self): """ Calculates spin polarization at Fermi level. See Sanvito et al., doi: 10.1126/sciadv.1602241 for an example usage. :return (float): spin polarization in range [0, 1], will also return NaN if spin polarization ill-defined (e.g. fo...
[ "Calculates", "spin", "polarization", "at", "Fermi", "level", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L724-L746
[ "def", "spin_polarization", "(", "self", ")", ":", "n_F", "=", "self", ".", "get_interpolated_value", "(", "self", ".", "efermi", ")", "n_F_up", "=", "n_F", "[", "Spin", ".", "up", "]", "n_F_down", "=", "n_F", "[", "Spin", ".", "down", "]", "if", "("...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CompleteDos.as_dict
Json-serializable dict representation of CompleteDos.
pymatgen/electronic_structure/dos.py
def as_dict(self): """ Json-serializable dict representation of CompleteDos. """ d = {"@module": self.__class__.__module__, "@class": self.__class__.__name__, "efermi": self.efermi, "structure": self.structure.as_dict(), "energies": list(self.energi...
def as_dict(self): """ Json-serializable dict representation of CompleteDos. """ d = {"@module": self.__class__.__module__, "@class": self.__class__.__name__, "efermi": self.efermi, "structure": self.structure.as_dict(), "energies": list(self.energi...
[ "Json", "-", "serializable", "dict", "representation", "of", "CompleteDos", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L766-L789
[ "def", "as_dict", "(", "self", ")", ":", "d", "=", "{", "\"@module\"", ":", "self", ".", "__class__", ".", "__module__", ",", "\"@class\"", ":", "self", ".", "__class__", ".", "__name__", ",", "\"efermi\"", ":", "self", ".", "efermi", ",", "\"structure\"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LobsterCompleteDos.get_element_spd_dos
Get element and spd projected Dos Args: el: Element in Structure.composition associated with LobsterCompleteDos Returns: dict of {Element: {"S": densities, "P": densities, "D": densities}}
pymatgen/electronic_structure/dos.py
def get_element_spd_dos(self, el): """ Get element and spd projected Dos Args: el: Element in Structure.composition associated with LobsterCompleteDos Returns: dict of {Element: {"S": densities, "P": densities, "D": densities}} """ el = get_el_s...
def get_element_spd_dos(self, el): """ Get element and spd projected Dos Args: el: Element in Structure.composition associated with LobsterCompleteDos Returns: dict of {Element: {"S": densities, "P": densities, "D": densities}} """ el = get_el_s...
[ "Get", "element", "and", "spd", "projected", "Dos" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L871-L895
[ "def", "get_element_spd_dos", "(", "self", ",", "el", ")", ":", "el", "=", "get_el_sp", "(", "el", ")", "el_dos", "=", "{", "}", "for", "site", ",", "atom_dos", "in", "self", ".", "pdos", ".", "items", "(", ")", ":", "if", "site", ".", "specie", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LobsterCompleteDos.from_dict
Returns: CompleteDos object from dict representation.
pymatgen/electronic_structure/dos.py
def from_dict(cls, d): """ Returns: CompleteDos object from dict representation. """ tdos = Dos.from_dict(d) struct = Structure.from_dict(d["structure"]) pdoss = {} for i in range(len(d["pdos"])): at = struct[i] orb_dos = {} for...
def from_dict(cls, d): """ Returns: CompleteDos object from dict representation. """ tdos = Dos.from_dict(d) struct = Structure.from_dict(d["structure"]) pdoss = {} for i in range(len(d["pdos"])): at = struct[i] orb_dos = {} for...
[ "Returns", ":", "CompleteDos", "object", "from", "dict", "representation", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/dos.py#L898-L913
[ "def", "from_dict", "(", "cls", ",", "d", ")", ":", "tdos", "=", "Dos", ".", "from_dict", "(", "d", ")", "struct", "=", "Structure", ".", "from_dict", "(", "d", "[", "\"structure\"", "]", ")", "pdoss", "=", "{", "}", "for", "i", "in", "range", "(...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AflowPrototypeMatcher.get_prototypes
Get prototype(s) structures for a given input structure. If you use this method in your work, please cite the appropriate AFLOW publication: Mehl, M. J., Hicks, D., Toher, C., Levy, O., Hanson, R. M., Hart, G., & Curtarolo, S. (2017). The AFLOW library of crystallographi...
pymatgen/analysis/aflow_prototypes.py
def get_prototypes(self, structure): """ Get prototype(s) structures for a given input structure. If you use this method in your work, please cite the appropriate AFLOW publication: Mehl, M. J., Hicks, D., Toher, C., Levy, O., Hanson, R. M., Hart, G., & Curtarolo...
def get_prototypes(self, structure): """ Get prototype(s) structures for a given input structure. If you use this method in your work, please cite the appropriate AFLOW publication: Mehl, M. J., Hicks, D., Toher, C., Levy, O., Hanson, R. M., Hart, G., & Curtarolo...
[ "Get", "prototype", "(", "s", ")", "structures", "for", "a", "given", "input", "structure", ".", "If", "you", "use", "this", "method", "in", "your", "work", "please", "cite", "the", "appropriate", "AFLOW", "publication", ":" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/aflow_prototypes.py#L80-L110
[ "def", "get_prototypes", "(", "self", ",", "structure", ")", ":", "tags", "=", "self", ".", "_match_single_prototype", "(", "structure", ")", "if", "len", "(", "tags", ")", "==", "0", ":", "return", "None", "else", ":", "return", "tags" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
read_pattern
General pattern reading on an input string Args: text_str (str): the input string to search for patterns patterns (dict): A dict of patterns, e.g., {"energy": r"energy\\(sigma->0\\)\\s+=\\s+([\\d\\-.]+)"}. terminate_on_match (bool): Whether to terminate when ...
pymatgen/io/qchem/utils.py
def read_pattern(text_str, patterns, terminate_on_match=False, postprocess=str): """ General pattern reading on an input string Args: text_str (str): the input string to search for patterns patterns (dict): A dict of patterns, e.g., {"energy"...
def read_pattern(text_str, patterns, terminate_on_match=False, postprocess=str): """ General pattern reading on an input string Args: text_str (str): the input string to search for patterns patterns (dict): A dict of patterns, e.g., {"energy"...
[ "General", "pattern", "reading", "on", "an", "input", "string" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem/utils.py#L6-L38
[ "def", "read_pattern", "(", "text_str", ",", "patterns", ",", "terminate_on_match", "=", "False", ",", "postprocess", "=", "str", ")", ":", "compiled", "=", "{", "key", ":", "re", ".", "compile", "(", "pattern", ",", "re", ".", "MULTILINE", "|", "re", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
read_table_pattern
Parse table-like data. A table composes of three parts: header, main body, footer. All the data matches "row pattern" in the main body will be returned. Args: text_str (str): the input string to search for patterns header_pattern (str): The regular expression pattern matches the ...
pymatgen/io/qchem/utils.py
def read_table_pattern(text_str, header_pattern, row_pattern, footer_pattern, postprocess=str, attribute_name=None, last_one_only=False): """ Parse table-like data. A table c...
def read_table_pattern(text_str, header_pattern, row_pattern, footer_pattern, postprocess=str, attribute_name=None, last_one_only=False): """ Parse table-like data. A table c...
[ "Parse", "table", "-", "like", "data", ".", "A", "table", "composes", "of", "three", "parts", ":", "header", "main", "body", "footer", ".", "All", "the", "data", "matches", "row", "pattern", "in", "the", "main", "body", "will", "be", "returned", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem/utils.py#L41-L107
[ "def", "read_table_pattern", "(", "text_str", ",", "header_pattern", ",", "row_pattern", ",", "footer_pattern", ",", "postprocess", "=", "str", ",", "attribute_name", "=", "None", ",", "last_one_only", "=", "False", ")", ":", "table_pattern_text", "=", "header_pat...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
lower_and_check_unique
Takes a dictionary and makes all the keys lower case. Also replaces "jobtype" with "job_type" just so that key specifically can be called elsewhere without ambiguity. Finally, ensures that multiple identical keys, that differed only due to different capitalizations, are not present. If there are multipl...
pymatgen/io/qchem/utils.py
def lower_and_check_unique(dict_to_check): """ Takes a dictionary and makes all the keys lower case. Also replaces "jobtype" with "job_type" just so that key specifically can be called elsewhere without ambiguity. Finally, ensures that multiple identical keys, that differed only due to different cap...
def lower_and_check_unique(dict_to_check): """ Takes a dictionary and makes all the keys lower case. Also replaces "jobtype" with "job_type" just so that key specifically can be called elsewhere without ambiguity. Finally, ensures that multiple identical keys, that differed only due to different cap...
[ "Takes", "a", "dictionary", "and", "makes", "all", "the", "keys", "lower", "case", ".", "Also", "replaces", "jobtype", "with", "job_type", "just", "so", "that", "key", "specifically", "can", "be", "called", "elsewhere", "without", "ambiguity", ".", "Finally", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem/utils.py#L110-L141
[ "def", "lower_and_check_unique", "(", "dict_to_check", ")", ":", "if", "dict_to_check", "==", "None", ":", "return", "None", "else", ":", "to_return", "=", "{", "}", "for", "key", "in", "dict_to_check", ":", "new_key", "=", "key", ".", "lower", "(", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
process_parsed_coords
Takes a set of parsed coordinates, which come as an array of strings, and returns a numpy array of floats.
pymatgen/io/qchem/utils.py
def process_parsed_coords(coords): """ Takes a set of parsed coordinates, which come as an array of strings, and returns a numpy array of floats. """ geometry = np.zeros(shape=(len(coords), 3), dtype=float) for ii, entry in enumerate(coords): for jj in range(3): geometry[ii, ...
def process_parsed_coords(coords): """ Takes a set of parsed coordinates, which come as an array of strings, and returns a numpy array of floats. """ geometry = np.zeros(shape=(len(coords), 3), dtype=float) for ii, entry in enumerate(coords): for jj in range(3): geometry[ii, ...
[ "Takes", "a", "set", "of", "parsed", "coordinates", "which", "come", "as", "an", "array", "of", "strings", "and", "returns", "a", "numpy", "array", "of", "floats", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem/utils.py#L144-L153
[ "def", "process_parsed_coords", "(", "coords", ")", ":", "geometry", "=", "np", ".", "zeros", "(", "shape", "=", "(", "len", "(", "coords", ")", ",", "3", ")", ",", "dtype", "=", "float", ")", "for", "ii", ",", "entry", "in", "enumerate", "(", "coo...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
gen_sl_transform_matricies
Generates the transformation matricies that convert a set of 2D vectors into a super lattice of integer area multiple as proven in Cassels: Cassels, John William Scott. An introduction to the geometry of numbers. Springer Science & Business Media, 2012. Args: area_multiple(int): integer mu...
pymatgen/analysis/substrate_analyzer.py
def gen_sl_transform_matricies(area_multiple): """ Generates the transformation matricies that convert a set of 2D vectors into a super lattice of integer area multiple as proven in Cassels: Cassels, John William Scott. An introduction to the geometry of numbers. Springer Science & Business Med...
def gen_sl_transform_matricies(area_multiple): """ Generates the transformation matricies that convert a set of 2D vectors into a super lattice of integer area multiple as proven in Cassels: Cassels, John William Scott. An introduction to the geometry of numbers. Springer Science & Business Med...
[ "Generates", "the", "transformation", "matricies", "that", "convert", "a", "set", "of", "2D", "vectors", "into", "a", "super", "lattice", "of", "integer", "area", "multiple", "as", "proven", "in", "Cassels", ":" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L348-L367
[ "def", "gen_sl_transform_matricies", "(", "area_multiple", ")", ":", "return", "[", "np", ".", "array", "(", "(", "(", "i", ",", "j", ")", ",", "(", "0", ",", "area_multiple", "/", "i", ")", ")", ")", "for", "i", "in", "get_factors", "(", "area_multi...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
vec_angle
Calculate angle between two vectors
pymatgen/analysis/substrate_analyzer.py
def vec_angle(a, b): """ Calculate angle between two vectors """ cosang = np.dot(a, b) sinang = fast_norm(np.cross(a, b)) return np.arctan2(sinang, cosang)
def vec_angle(a, b): """ Calculate angle between two vectors """ cosang = np.dot(a, b) sinang = fast_norm(np.cross(a, b)) return np.arctan2(sinang, cosang)
[ "Calculate", "angle", "between", "two", "vectors" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L396-L402
[ "def", "vec_angle", "(", "a", ",", "b", ")", ":", "cosang", "=", "np", ".", "dot", "(", "a", ",", "b", ")", "sinang", "=", "fast_norm", "(", "np", ".", "cross", "(", "a", ",", "b", ")", ")", "return", "np", ".", "arctan2", "(", "sinang", ",",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
reduce_vectors
Generate independent and unique basis vectors based on the methodology of Zur and McGill
pymatgen/analysis/substrate_analyzer.py
def reduce_vectors(a, b): """ Generate independent and unique basis vectors based on the methodology of Zur and McGill """ if np.dot(a, b) < 0: return reduce_vectors(a, -b) if fast_norm(a) > fast_norm(b): return reduce_vectors(b, a) if fast_norm(b) > fast_norm(np.add(b, a))...
def reduce_vectors(a, b): """ Generate independent and unique basis vectors based on the methodology of Zur and McGill """ if np.dot(a, b) < 0: return reduce_vectors(a, -b) if fast_norm(a) > fast_norm(b): return reduce_vectors(b, a) if fast_norm(b) > fast_norm(np.add(b, a))...
[ "Generate", "independent", "and", "unique", "basis", "vectors", "based", "on", "the", "methodology", "of", "Zur", "and", "McGill" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L412-L429
[ "def", "reduce_vectors", "(", "a", ",", "b", ")", ":", "if", "np", ".", "dot", "(", "a", ",", "b", ")", "<", "0", ":", "return", "reduce_vectors", "(", "a", ",", "-", "b", ")", "if", "fast_norm", "(", "a", ")", ">", "fast_norm", "(", "b", ")"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ZSLGenerator.is_same_vectors
Determine if two sets of vectors are the same within length and angle tolerances Args: vec_set1(array[array]): an array of two vectors vec_set2(array[array]): second array of two vectors
pymatgen/analysis/substrate_analyzer.py
def is_same_vectors(self, vec_set1, vec_set2): """ Determine if two sets of vectors are the same within length and angle tolerances Args: vec_set1(array[array]): an array of two vectors vec_set2(array[array]): second array of two vectors """ if (n...
def is_same_vectors(self, vec_set1, vec_set2): """ Determine if two sets of vectors are the same within length and angle tolerances Args: vec_set1(array[array]): an array of two vectors vec_set2(array[array]): second array of two vectors """ if (n...
[ "Determine", "if", "two", "sets", "of", "vectors", "are", "the", "same", "within", "length", "and", "angle", "tolerances" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L68-L87
[ "def", "is_same_vectors", "(", "self", ",", "vec_set1", ",", "vec_set2", ")", ":", "if", "(", "np", ".", "absolute", "(", "rel_strain", "(", "vec_set1", "[", "0", "]", ",", "vec_set2", "[", "0", "]", ")", ")", ">", "self", ".", "max_length_tol", ")",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ZSLGenerator.generate_sl_transformation_sets
Generates transformation sets for film/substrate pair given the area of the unit cell area for the film and substrate. The transformation sets map the film and substrate unit cells to super lattices with a maximum area Args: film_area(int): the unit cell area for the film ...
pymatgen/analysis/substrate_analyzer.py
def generate_sl_transformation_sets(self, film_area, substrate_area): """ Generates transformation sets for film/substrate pair given the area of the unit cell area for the film and substrate. The transformation sets map the film and substrate unit cells to super lattices with a ...
def generate_sl_transformation_sets(self, film_area, substrate_area): """ Generates transformation sets for film/substrate pair given the area of the unit cell area for the film and substrate. The transformation sets map the film and substrate unit cells to super lattices with a ...
[ "Generates", "transformation", "sets", "for", "film", "/", "substrate", "pair", "given", "the", "area", "of", "the", "unit", "cell", "area", "for", "the", "film", "and", "substrate", ".", "The", "transformation", "sets", "map", "the", "film", "and", "substra...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L89-L116
[ "def", "generate_sl_transformation_sets", "(", "self", ",", "film_area", ",", "substrate_area", ")", ":", "transformation_indicies", "=", "[", "(", "i", ",", "j", ")", "for", "i", "in", "range", "(", "1", ",", "int", "(", "self", ".", "max_area", "/", "f...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ZSLGenerator.get_equiv_transformations
Applies the transformation_sets to the film and substrate vectors to generate super-lattices and checks if they matches. Returns all matching vectors sets. Args: transformation_sets(array): an array of transformation sets: each transformation set is an array with the...
pymatgen/analysis/substrate_analyzer.py
def get_equiv_transformations(self, transformation_sets, film_vectors, substrate_vectors): """ Applies the transformation_sets to the film and substrate vectors to generate super-lattices and checks if they matches. Returns all matching vectors sets. ...
def get_equiv_transformations(self, transformation_sets, film_vectors, substrate_vectors): """ Applies the transformation_sets to the film and substrate vectors to generate super-lattices and checks if they matches. Returns all matching vectors sets. ...
[ "Applies", "the", "transformation_sets", "to", "the", "film", "and", "substrate", "vectors", "to", "generate", "super", "-", "lattices", "and", "checks", "if", "they", "matches", ".", "Returns", "all", "matching", "vectors", "sets", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L118-L148
[ "def", "get_equiv_transformations", "(", "self", ",", "transformation_sets", ",", "film_vectors", ",", "substrate_vectors", ")", ":", "for", "(", "film_transformations", ",", "substrate_transformations", ")", "in", "transformation_sets", ":", "# Apply transformations and re...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ZSLGenerator.match_as_dict
Returns dict which contains ZSL match Args: film_miller(array) substrate_miller(array)
pymatgen/analysis/substrate_analyzer.py
def match_as_dict(self, film_sl_vectors, substrate_sl_vectors, film_vectors, substrate_vectors, match_area): """ Returns dict which contains ZSL match Args: film_miller(array) substrate_miller(array) """ d = {} d["film_sl_vecs"] = np.asarray(film_...
def match_as_dict(self, film_sl_vectors, substrate_sl_vectors, film_vectors, substrate_vectors, match_area): """ Returns dict which contains ZSL match Args: film_miller(array) substrate_miller(array) """ d = {} d["film_sl_vecs"] = np.asarray(film_...
[ "Returns", "dict", "which", "contains", "ZSL", "match" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L174-L189
[ "def", "match_as_dict", "(", "self", ",", "film_sl_vectors", ",", "substrate_sl_vectors", ",", "film_vectors", ",", "substrate_vectors", ",", "match_area", ")", ":", "d", "=", "{", "}", "d", "[", "\"film_sl_vecs\"", "]", "=", "np", ".", "asarray", "(", "film...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SubstrateAnalyzer.generate_surface_vectors
Generates the film/substrate slab combinations for a set of given miller indicies Args: film_millers(array): all miller indices to generate slabs for film substrate_millers(array): all miller indicies to generate slabs for substrate
pymatgen/analysis/substrate_analyzer.py
def generate_surface_vectors(self, film_millers, substrate_millers): """ Generates the film/substrate slab combinations for a set of given miller indicies Args: film_millers(array): all miller indices to generate slabs for film substrate_millers(a...
def generate_surface_vectors(self, film_millers, substrate_millers): """ Generates the film/substrate slab combinations for a set of given miller indicies Args: film_millers(array): all miller indices to generate slabs for film substrate_millers(a...
[ "Generates", "the", "film", "/", "substrate", "slab", "combinations", "for", "a", "set", "of", "given", "miller", "indicies" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L217-L245
[ "def", "generate_surface_vectors", "(", "self", ",", "film_millers", ",", "substrate_millers", ")", ":", "vector_sets", "=", "[", "]", "for", "f", "in", "film_millers", ":", "film_slab", "=", "SlabGenerator", "(", "self", ".", "film", ",", "f", ",", "20", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SubstrateAnalyzer.calculate
Finds all topological matches for the substrate and calculates elastic strain energy and total energy for the film if elasticity tensor and ground state energy are provided: Args: film(Structure): conventional standard structure for the film substrate(Structure): convent...
pymatgen/analysis/substrate_analyzer.py
def calculate(self, film, substrate, elasticity_tensor=None, film_millers=None, substrate_millers=None, ground_state_energy=0, lowest=False): """ Finds all topological matches for the substrate and calculates elastic strain energy and total energy for the film...
def calculate(self, film, substrate, elasticity_tensor=None, film_millers=None, substrate_millers=None, ground_state_energy=0, lowest=False): """ Finds all topological matches for the substrate and calculates elastic strain energy and total energy for the film...
[ "Finds", "all", "topological", "matches", "for", "the", "substrate", "and", "calculates", "elastic", "strain", "energy", "and", "total", "energy", "for", "the", "film", "if", "elasticity", "tensor", "and", "ground", "state", "energy", "are", "provided", ":" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L247-L296
[ "def", "calculate", "(", "self", ",", "film", ",", "substrate", ",", "elasticity_tensor", "=", "None", ",", "film_millers", "=", "None", ",", "substrate_millers", "=", "None", ",", "ground_state_energy", "=", "0", ",", "lowest", "=", "False", ")", ":", "se...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SubstrateAnalyzer.calculate_3D_elastic_energy
Calculates the multi-plane elastic energy. Returns 999 if no elastic tensor was given on init Args: film(Structure): conventional standard structure for the film match(dictionary) : match dictionary from substrate analyzer elasticity_tensor(ElasticTensor): elasticity...
pymatgen/analysis/substrate_analyzer.py
def calculate_3D_elastic_energy(self, film, match, elasticity_tensor=None, include_strain=False): """ Calculates the multi-plane elastic energy. Returns 999 if no elastic tensor was given on init Args: film(Structure): conventional standar...
def calculate_3D_elastic_energy(self, film, match, elasticity_tensor=None, include_strain=False): """ Calculates the multi-plane elastic energy. Returns 999 if no elastic tensor was given on init Args: film(Structure): conventional standar...
[ "Calculates", "the", "multi", "-", "plane", "elastic", "energy", ".", "Returns", "999", "if", "no", "elastic", "tensor", "was", "given", "on", "init" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/substrate_analyzer.py#L298-L345
[ "def", "calculate_3D_elastic_energy", "(", "self", ",", "film", ",", "match", ",", "elasticity_tensor", "=", "None", ",", "include_strain", "=", "False", ")", ":", "if", "elasticity_tensor", "is", "None", ":", "return", "9999", "# Get the appropriate surface structu...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
XYZ._from_frame_string
Convert a single frame XYZ string to a molecule
pymatgen/io/xyz.py
def _from_frame_string(contents): """ Convert a single frame XYZ string to a molecule """ lines = contents.split("\n") num_sites = int(lines[0]) coords = [] sp = [] coord_patt = re.compile( r"(\w+)\s+([0-9\-\+\.eEdD]+)\s+([0-9\-\+\.eEdD]+)\s+([...
def _from_frame_string(contents): """ Convert a single frame XYZ string to a molecule """ lines = contents.split("\n") num_sites = int(lines[0]) coords = [] sp = [] coord_patt = re.compile( r"(\w+)\s+([0-9\-\+\.eEdD]+)\s+([0-9\-\+\.eEdD]+)\s+([...
[ "Convert", "a", "single", "frame", "XYZ", "string", "to", "a", "molecule" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/xyz.py#L59-L79
[ "def", "_from_frame_string", "(", "contents", ")", ":", "lines", "=", "contents", ".", "split", "(", "\"\\n\"", ")", "num_sites", "=", "int", "(", "lines", "[", "0", "]", ")", "coords", "=", "[", "]", "sp", "=", "[", "]", "coord_patt", "=", "re", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
XYZ.from_string
Creates XYZ object from a string. Args: contents: String representing an XYZ file. Returns: XYZ object
pymatgen/io/xyz.py
def from_string(contents): """ Creates XYZ object from a string. Args: contents: String representing an XYZ file. Returns: XYZ object """ if contents[-1] != "\n": contents += "\n" white_space = r"[ \t\r\f\v]" natoms_li...
def from_string(contents): """ Creates XYZ object from a string. Args: contents: String representing an XYZ file. Returns: XYZ object """ if contents[-1] != "\n": contents += "\n" white_space = r"[ \t\r\f\v]" natoms_li...
[ "Creates", "XYZ", "object", "from", "a", "string", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/xyz.py#L82-L104
[ "def", "from_string", "(", "contents", ")", ":", "if", "contents", "[", "-", "1", "]", "!=", "\"\\n\"", ":", "contents", "+=", "\"\\n\"", "white_space", "=", "r\"[ \\t\\r\\f\\v]\"", "natoms_line", "=", "white_space", "+", "r\"*\\d+\"", "+", "white_space", "+",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ChemicalShielding.principal_axis_system
Returns a chemical shielding tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero
pymatgen/analysis/nmr.py
def principal_axis_system(self): """ Returns a chemical shielding tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero """ return ChemicalShielding(np.diag(np.sort(np.linalg.eigvals(self))))
def principal_axis_system(self): """ Returns a chemical shielding tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero """ return ChemicalShielding(np.diag(np.sort(np.linalg.eigvals(self))))
[ "Returns", "a", "chemical", "shielding", "tensor", "aligned", "to", "the", "principle", "axis", "system", "so", "that", "only", "the", "3", "diagnol", "components", "are", "non", "-", "zero" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L65-L70
[ "def", "principal_axis_system", "(", "self", ")", ":", "return", "ChemicalShielding", "(", "np", ".", "diag", "(", "np", ".", "sort", "(", "np", ".", "linalg", ".", "eigvals", "(", "self", ")", ")", ")", ")" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ChemicalShielding.haeberlen_values
Returns: the Chemical shielding tensor in Haeberlen Notation
pymatgen/analysis/nmr.py
def haeberlen_values(self): """ Returns: the Chemical shielding tensor in Haeberlen Notation """ pas=self.principal_axis_system sigma_iso=pas.trace() / 3 sigmas=np.diag(pas) sigmas=sorted(sigmas, key=lambda x: np.abs(x - sigma_iso)) sigma_yy, sigma_xx, sig...
def haeberlen_values(self): """ Returns: the Chemical shielding tensor in Haeberlen Notation """ pas=self.principal_axis_system sigma_iso=pas.trace() / 3 sigmas=np.diag(pas) sigmas=sorted(sigmas, key=lambda x: np.abs(x - sigma_iso)) sigma_yy, sigma_xx, sig...
[ "Returns", ":", "the", "Chemical", "shielding", "tensor", "in", "Haeberlen", "Notation" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L73-L85
[ "def", "haeberlen_values", "(", "self", ")", ":", "pas", "=", "self", ".", "principal_axis_system", "sigma_iso", "=", "pas", ".", "trace", "(", ")", "/", "3", "sigmas", "=", "np", ".", "diag", "(", "pas", ")", "sigmas", "=", "sorted", "(", "sigmas", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ChemicalShielding.mehring_values
Returns: the Chemical shielding tensor in Mehring Notation
pymatgen/analysis/nmr.py
def mehring_values(self): """ Returns: the Chemical shielding tensor in Mehring Notation """ pas=self.principal_axis_system sigma_iso=pas.trace() / 3 sigma_11, sigma_22, sigma_33=np.diag(pas) return self.MehringNotation(sigma_iso, sigma_11, sigma_22, sigma_33)
def mehring_values(self): """ Returns: the Chemical shielding tensor in Mehring Notation """ pas=self.principal_axis_system sigma_iso=pas.trace() / 3 sigma_11, sigma_22, sigma_33=np.diag(pas) return self.MehringNotation(sigma_iso, sigma_11, sigma_22, sigma_33)
[ "Returns", ":", "the", "Chemical", "shielding", "tensor", "in", "Mehring", "Notation" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L88-L95
[ "def", "mehring_values", "(", "self", ")", ":", "pas", "=", "self", ".", "principal_axis_system", "sigma_iso", "=", "pas", ".", "trace", "(", ")", "/", "3", "sigma_11", ",", "sigma_22", ",", "sigma_33", "=", "np", ".", "diag", "(", "pas", ")", "return"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ChemicalShielding.maryland_values
Returns: the Chemical shielding tensor in Maryland Notation
pymatgen/analysis/nmr.py
def maryland_values(self): """ Returns: the Chemical shielding tensor in Maryland Notation """ pas=self.principal_axis_system sigma_iso=pas.trace() / 3 omega=np.diag(pas)[2] - np.diag(pas)[0] # There is a typo in equation 20 from Magn. Reson. Chem. 2008, 46, 582–5...
def maryland_values(self): """ Returns: the Chemical shielding tensor in Maryland Notation """ pas=self.principal_axis_system sigma_iso=pas.trace() / 3 omega=np.diag(pas)[2] - np.diag(pas)[0] # There is a typo in equation 20 from Magn. Reson. Chem. 2008, 46, 582–5...
[ "Returns", ":", "the", "Chemical", "shielding", "tensor", "in", "Maryland", "Notation" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L98-L108
[ "def", "maryland_values", "(", "self", ")", ":", "pas", "=", "self", ".", "principal_axis_system", "sigma_iso", "=", "pas", ".", "trace", "(", ")", "/", "3", "omega", "=", "np", ".", "diag", "(", "pas", ")", "[", "2", "]", "-", "np", ".", "diag", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ElectricFieldGradient.principal_axis_system
Returns a electric field gradient tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero
pymatgen/analysis/nmr.py
def principal_axis_system(self): """ Returns a electric field gradient tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero """ return ElectricFieldGradient(np.diag(np.sort(np.linalg.eigvals(self))))
def principal_axis_system(self): """ Returns a electric field gradient tensor aligned to the principle axis system so that only the 3 diagnol components are non-zero """ return ElectricFieldGradient(np.diag(np.sort(np.linalg.eigvals(self))))
[ "Returns", "a", "electric", "field", "gradient", "tensor", "aligned", "to", "the", "principle", "axis", "system", "so", "that", "only", "the", "3", "diagnol", "components", "are", "non", "-", "zero" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L149-L153
[ "def", "principal_axis_system", "(", "self", ")", ":", "return", "ElectricFieldGradient", "(", "np", ".", "diag", "(", "np", ".", "sort", "(", "np", ".", "linalg", ".", "eigvals", "(", "self", ")", ")", ")", ")" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ElectricFieldGradient.asymmetry
Asymmetry of the electric field tensor defined as: (V_yy - V_xx)/V_zz
pymatgen/analysis/nmr.py
def asymmetry(self): """ Asymmetry of the electric field tensor defined as: (V_yy - V_xx)/V_zz """ diags=np.diag(self.principal_axis_system) V=sorted(diags, key=np.abs) return np.abs((V[1] - V[0]) / V[2])
def asymmetry(self): """ Asymmetry of the electric field tensor defined as: (V_yy - V_xx)/V_zz """ diags=np.diag(self.principal_axis_system) V=sorted(diags, key=np.abs) return np.abs((V[1] - V[0]) / V[2])
[ "Asymmetry", "of", "the", "electric", "field", "tensor", "defined", "as", ":", "(", "V_yy", "-", "V_xx", ")", "/", "V_zz" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L171-L178
[ "def", "asymmetry", "(", "self", ")", ":", "diags", "=", "np", ".", "diag", "(", "self", ".", "principal_axis_system", ")", "V", "=", "sorted", "(", "diags", ",", "key", "=", "np", ".", "abs", ")", "return", "np", ".", "abs", "(", "(", "V", "[", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ElectricFieldGradient.coupling_constant
Computes the couplling constant C_q as defined in: Wasylishen R E, Ashbrook S E, Wimperis S. NMR of quadrupolar nuclei in solid materials[M]. John Wiley & Sons, 2012. (Chapter 3.2) C_q for a specific atom type for this electric field tensor: C_q=e*Q*V_zz/h h:...
pymatgen/analysis/nmr.py
def coupling_constant(self, specie): """ Computes the couplling constant C_q as defined in: Wasylishen R E, Ashbrook S E, Wimperis S. NMR of quadrupolar nuclei in solid materials[M]. John Wiley & Sons, 2012. (Chapter 3.2) C_q for a specific atom type for this electric fi...
def coupling_constant(self, specie): """ Computes the couplling constant C_q as defined in: Wasylishen R E, Ashbrook S E, Wimperis S. NMR of quadrupolar nuclei in solid materials[M]. John Wiley & Sons, 2012. (Chapter 3.2) C_q for a specific atom type for this electric fi...
[ "Computes", "the", "couplling", "constant", "C_q", "as", "defined", "in", ":", "Wasylishen", "R", "E", "Ashbrook", "S", "E", "Wimperis", "S", ".", "NMR", "of", "quadrupolar", "nuclei", "in", "solid", "materials", "[", "M", "]", ".", "John", "Wiley", "&",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/nmr.py#L180-L223
[ "def", "coupling_constant", "(", "self", ",", "specie", ")", ":", "planks_constant", "=", "FloatWithUnit", "(", "6.62607004E-34", ",", "\"m^2 kg s^-1\"", ")", "Vzz", "=", "FloatWithUnit", "(", "self", ".", "V_zz", ",", "\"V ang^-2\"", ")", "e", "=", "FloatWith...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JahnTellerAnalyzer.get_analysis_and_structure
Obtain an analysis of a given structure and if it may be Jahn-Teller active or not. This is a heuristic, and may give false positives and false negatives (false positives are preferred). :param structure: input structure :param calculate_valences (bool): whether to attempt to calculate ...
pymatgen/analysis/magnetism/jahnteller.py
def get_analysis_and_structure(self, structure, calculate_valences=True, guesstimate_spin=False, op_threshold=0.1): """ Obtain an analysis of a given structure and ...
def get_analysis_and_structure(self, structure, calculate_valences=True, guesstimate_spin=False, op_threshold=0.1): """ Obtain an analysis of a given structure and ...
[ "Obtain", "an", "analysis", "of", "a", "given", "structure", "and", "if", "it", "may", "be", "Jahn", "-", "Teller", "active", "or", "not", ".", "This", "is", "a", "heuristic", "and", "may", "give", "false", "positives", "and", "false", "negatives", "(", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/jahnteller.py#L68-L196
[ "def", "get_analysis_and_structure", "(", "self", ",", "structure", ",", "calculate_valences", "=", "True", ",", "guesstimate_spin", "=", "False", ",", "op_threshold", "=", "0.1", ")", ":", "structure", "=", "structure", ".", "get_primitive_structure", "(", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JahnTellerAnalyzer.get_magnitude_of_effect_from_species
Get magnitude of Jahn-Teller effect from provided species, spin state and motife. :param species: e.g. Fe2+ :param spin_state (str): "high" or "low" :param motif (str): "oct" or "tet" :return (str):
pymatgen/analysis/magnetism/jahnteller.py
def get_magnitude_of_effect_from_species(self, species, spin_state, motif): """ Get magnitude of Jahn-Teller effect from provided species, spin state and motife. :param species: e.g. Fe2+ :param spin_state (str): "high" or "low" :param motif (str): "oct" or "tet" :retur...
def get_magnitude_of_effect_from_species(self, species, spin_state, motif): """ Get magnitude of Jahn-Teller effect from provided species, spin state and motife. :param species: e.g. Fe2+ :param spin_state (str): "high" or "low" :param motif (str): "oct" or "tet" :retur...
[ "Get", "magnitude", "of", "Jahn", "-", "Teller", "effect", "from", "provided", "species", "spin", "state", "and", "motife", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/jahnteller.py#L251-L280
[ "def", "get_magnitude_of_effect_from_species", "(", "self", ",", "species", ",", "spin_state", ",", "motif", ")", ":", "magnitude", "=", "\"none\"", "sp", "=", "get_el_sp", "(", "species", ")", "# has to be Specie; we need to know the oxidation state", "if", "isinstance...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JahnTellerAnalyzer.get_magnitude_of_effect_from_spin_config
Roughly, the magnitude of Jahn-Teller distortion will be: * in octahedral environments, strong if e_g orbitals unevenly occupied but weak if t_2g orbitals unevenly occupied * in tetrahedral environments always weaker :param motif (str): "oct" or "tet" :param spin_config (...
pymatgen/analysis/magnetism/jahnteller.py
def get_magnitude_of_effect_from_spin_config(motif, spin_config): """ Roughly, the magnitude of Jahn-Teller distortion will be: * in octahedral environments, strong if e_g orbitals unevenly occupied but weak if t_2g orbitals unevenly occupied * in tetrahedral environments...
def get_magnitude_of_effect_from_spin_config(motif, spin_config): """ Roughly, the magnitude of Jahn-Teller distortion will be: * in octahedral environments, strong if e_g orbitals unevenly occupied but weak if t_2g orbitals unevenly occupied * in tetrahedral environments...
[ "Roughly", "the", "magnitude", "of", "Jahn", "-", "Teller", "distortion", "will", "be", ":", "*", "in", "octahedral", "environments", "strong", "if", "e_g", "orbitals", "unevenly", "occupied", "but", "weak", "if", "t_2g", "orbitals", "unevenly", "occupied", "*...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/jahnteller.py#L283-L307
[ "def", "get_magnitude_of_effect_from_spin_config", "(", "motif", ",", "spin_config", ")", ":", "magnitude", "=", "\"none\"", "if", "motif", "==", "\"oct\"", ":", "e_g", "=", "spin_config", "[", "\"e_g\"", "]", "t_2g", "=", "spin_config", "[", "\"t_2g\"", "]", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JahnTellerAnalyzer._estimate_spin_state
Simple heuristic to estimate spin state. If magnetic moment is sufficiently close to that predicted for a given spin state, we assign it that state. If we only have data for one spin state then that's the one we use (e.g. we assume all tetrahedral complexes are high-spin, since this is t...
pymatgen/analysis/magnetism/jahnteller.py
def _estimate_spin_state(species, motif, known_magmom): """ Simple heuristic to estimate spin state. If magnetic moment is sufficiently close to that predicted for a given spin state, we assign it that state. If we only have data for one spin state then that's the one we use (e.g...
def _estimate_spin_state(species, motif, known_magmom): """ Simple heuristic to estimate spin state. If magnetic moment is sufficiently close to that predicted for a given spin state, we assign it that state. If we only have data for one spin state then that's the one we use (e.g...
[ "Simple", "heuristic", "to", "estimate", "spin", "state", ".", "If", "magnetic", "moment", "is", "sufficiently", "close", "to", "that", "predicted", "for", "a", "given", "spin", "state", "we", "assign", "it", "that", "state", ".", "If", "we", "only", "have...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/jahnteller.py#L310-L341
[ "def", "_estimate_spin_state", "(", "species", ",", "motif", ",", "known_magmom", ")", ":", "mu_so_high", "=", "JahnTellerAnalyzer", ".", "mu_so", "(", "species", ",", "motif", "=", "motif", ",", "spin_state", "=", "\"high\"", ")", "mu_so_low", "=", "JahnTelle...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JahnTellerAnalyzer.mu_so
Calculates the spin-only magnetic moment for a given species. Only supports transition metals. :param species: str or Species :param motif: "oct" or "tet" :param spin_state: "high" or "low" :return: spin-only magnetic moment in Bohr magnetons
pymatgen/analysis/magnetism/jahnteller.py
def mu_so(species, motif, spin_state): """ Calculates the spin-only magnetic moment for a given species. Only supports transition metals. :param species: str or Species :param motif: "oct" or "tet" :param spin_state: "high" or "low" :return: spin-only magnetic mo...
def mu_so(species, motif, spin_state): """ Calculates the spin-only magnetic moment for a given species. Only supports transition metals. :param species: str or Species :param motif: "oct" or "tet" :param spin_state: "high" or "low" :return: spin-only magnetic mo...
[ "Calculates", "the", "spin", "-", "only", "magnetic", "moment", "for", "a", "given", "species", ".", "Only", "supports", "transition", "metals", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/jahnteller.py#L344-L360
[ "def", "mu_so", "(", "species", ",", "motif", ",", "spin_state", ")", ":", "try", ":", "sp", "=", "get_el_sp", "(", "species", ")", "n", "=", "sp", ".", "get_crystal_field_spin", "(", "coordination", "=", "motif", ",", "spin_config", "=", "spin_state", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_conversion_factor
Conversion factor to convert between cm^2/s diffusivity measurements and mS/cm conductivity measurements based on number of atoms of diffusing species. Note that the charge is based on the oxidation state of the species (where available), or else the number of valence electrons (usually a good guess, es...
pymatgen/analysis/diffusion_analyzer.py
def get_conversion_factor(structure, species, temperature): """ Conversion factor to convert between cm^2/s diffusivity measurements and mS/cm conductivity measurements based on number of atoms of diffusing species. Note that the charge is based on the oxidation state of the species (where available...
def get_conversion_factor(structure, species, temperature): """ Conversion factor to convert between cm^2/s diffusivity measurements and mS/cm conductivity measurements based on number of atoms of diffusing species. Note that the charge is based on the oxidation state of the species (where available...
[ "Conversion", "factor", "to", "convert", "between", "cm^2", "/", "s", "diffusivity", "measurements", "and", "mS", "/", "cm", "conductivity", "measurements", "based", "on", "number", "of", "atoms", "of", "diffusing", "species", ".", "Note", "that", "the", "char...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L768-L795
[ "def", "get_conversion_factor", "(", "structure", ",", "species", ",", "temperature", ")", ":", "df_sp", "=", "get_el_sp", "(", "species", ")", "if", "hasattr", "(", "df_sp", ",", "\"oxi_state\"", ")", ":", "z", "=", "df_sp", ".", "oxi_state", "else", ":",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
_get_vasprun
Internal method to support multiprocessing.
pymatgen/analysis/diffusion_analyzer.py
def _get_vasprun(args): """ Internal method to support multiprocessing. """ return Vasprun(args[0], ionic_step_skip=args[1], parse_dos=False, parse_eigen=False)
def _get_vasprun(args): """ Internal method to support multiprocessing. """ return Vasprun(args[0], ionic_step_skip=args[1], parse_dos=False, parse_eigen=False)
[ "Internal", "method", "to", "support", "multiprocessing", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L798-L803
[ "def", "_get_vasprun", "(", "args", ")", ":", "return", "Vasprun", "(", "args", "[", "0", "]", ",", "ionic_step_skip", "=", "args", "[", "1", "]", ",", "parse_dos", "=", "False", ",", "parse_eigen", "=", "False", ")" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
fit_arrhenius
Returns Ea, c, standard error of Ea from the Arrhenius fit: D = c * exp(-Ea/kT) Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivity). units: cm^2/s
pymatgen/analysis/diffusion_analyzer.py
def fit_arrhenius(temps, diffusivities): """ Returns Ea, c, standard error of Ea from the Arrhenius fit: D = c * exp(-Ea/kT) Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.dif...
def fit_arrhenius(temps, diffusivities): """ Returns Ea, c, standard error of Ea from the Arrhenius fit: D = c * exp(-Ea/kT) Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.dif...
[ "Returns", "Ea", "c", "standard", "error", "of", "Ea", "from", "the", "Arrhenius", "fit", ":", "D", "=", "c", "*", "exp", "(", "-", "Ea", "/", "kT", ")" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L806-L828
[ "def", "fit_arrhenius", "(", "temps", ",", "diffusivities", ")", ":", "t_1", "=", "1", "/", "np", ".", "array", "(", "temps", ")", "logd", "=", "np", ".", "log", "(", "diffusivities", ")", "# Do a least squares regression of log(D) vs 1/T", "a", "=", "np", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_extrapolated_diffusivity
Returns (Arrhenius) extrapolated diffusivity at new_temp Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivity). units: cm^2/s new_temp (float): desired temperature. units: K ...
pymatgen/analysis/diffusion_analyzer.py
def get_extrapolated_diffusivity(temps, diffusivities, new_temp): """ Returns (Arrhenius) extrapolated diffusivity at new_temp Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivi...
def get_extrapolated_diffusivity(temps, diffusivities, new_temp): """ Returns (Arrhenius) extrapolated diffusivity at new_temp Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivi...
[ "Returns", "(", "Arrhenius", ")", "extrapolated", "diffusivity", "at", "new_temp" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L831-L845
[ "def", "get_extrapolated_diffusivity", "(", "temps", ",", "diffusivities", ",", "new_temp", ")", ":", "Ea", ",", "c", ",", "_", "=", "fit_arrhenius", "(", "temps", ",", "diffusivities", ")", "return", "c", "*", "np", ".", "exp", "(", "-", "Ea", "/", "(...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_extrapolated_conductivity
Returns extrapolated mS/cm conductivity. Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivity). units: cm^2/s new_temp (float): desired temperature. units: K structure (...
pymatgen/analysis/diffusion_analyzer.py
def get_extrapolated_conductivity(temps, diffusivities, new_temp, structure, species): """ Returns extrapolated mS/cm conductivity. Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., ...
def get_extrapolated_conductivity(temps, diffusivities, new_temp, structure, species): """ Returns extrapolated mS/cm conductivity. Args: temps ([float]): A sequence of temperatures. units: K diffusivities ([float]): A sequence of diffusivities (e.g., ...
[ "Returns", "extrapolated", "mS", "/", "cm", "conductivity", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L848-L865
[ "def", "get_extrapolated_conductivity", "(", "temps", ",", "diffusivities", ",", "new_temp", ",", "structure", ",", "species", ")", ":", "return", "get_extrapolated_diffusivity", "(", "temps", ",", "diffusivities", ",", "new_temp", ")", "*", "get_conversion_factor", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_arrhenius_plot
Returns an Arrhenius plot. Args: temps ([float]): A sequence of temperatures. diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivity). diffusivity_errors ([float]): A sequence of errors for the diffusivities. If None, no error ...
pymatgen/analysis/diffusion_analyzer.py
def get_arrhenius_plot(temps, diffusivities, diffusivity_errors=None, **kwargs): """ Returns an Arrhenius plot. Args: temps ([float]): A sequence of temperatures. diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivit...
def get_arrhenius_plot(temps, diffusivities, diffusivity_errors=None, **kwargs): """ Returns an Arrhenius plot. Args: temps ([float]): A sequence of temperatures. diffusivities ([float]): A sequence of diffusivities (e.g., from DiffusionAnalyzer.diffusivit...
[ "Returns", "an", "Arrhenius", "plot", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L868-L908
[ "def", "get_arrhenius_plot", "(", "temps", ",", "diffusivities", ",", "diffusivity_errors", "=", "None", ",", "*", "*", "kwargs", ")", ":", "Ea", ",", "c", ",", "_", "=", "fit_arrhenius", "(", "temps", ",", "diffusivities", ")", "from", "pymatgen", ".", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.get_drift_corrected_structures
Returns an iterator for the drift-corrected structures. Use of iterator is to reduce memory usage as # of structures in MD can be huge. You don't often need all the structures all at once. Args: start, stop, step (int): applies a start/stop/step to the iterator. Fast...
pymatgen/analysis/diffusion_analyzer.py
def get_drift_corrected_structures(self, start=None, stop=None, step=None): """ Returns an iterator for the drift-corrected structures. Use of iterator is to reduce memory usage as # of structures in MD can be huge. You don't often need all the structures all at once. Args: ...
def get_drift_corrected_structures(self, start=None, stop=None, step=None): """ Returns an iterator for the drift-corrected structures. Use of iterator is to reduce memory usage as # of structures in MD can be huge. You don't often need all the structures all at once. Args: ...
[ "Returns", "an", "iterator", "for", "the", "drift", "-", "corrected", "structures", ".", "Use", "of", "iterator", "is", "to", "reduce", "memory", "usage", "as", "#", "of", "structures", "in", "MD", "can", "be", "huge", ".", "You", "don", "t", "often", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L348-L369
[ "def", "get_drift_corrected_structures", "(", "self", ",", "start", "=", "None", ",", "stop", "=", "None", ",", "step", "=", "None", ")", ":", "coords", "=", "np", ".", "array", "(", "self", ".", "structure", ".", "cart_coords", ")", "species", "=", "s...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.get_summary_dict
Provides a summary of diffusion information. Args: include_msd_t (bool): Whether to include mean square displace and time data with the data. include_msd_t (bool): Whether to include mean square charge displace and time data with the data. Return...
pymatgen/analysis/diffusion_analyzer.py
def get_summary_dict(self, include_msd_t=False, include_mscd_t=False): """ Provides a summary of diffusion information. Args: include_msd_t (bool): Whether to include mean square displace and time data with the data. include_msd_t (bool): Whether to inclu...
def get_summary_dict(self, include_msd_t=False, include_mscd_t=False): """ Provides a summary of diffusion information. Args: include_msd_t (bool): Whether to include mean square displace and time data with the data. include_msd_t (bool): Whether to inclu...
[ "Provides", "a", "summary", "of", "diffusion", "information", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L371-L409
[ "def", "get_summary_dict", "(", "self", ",", "include_msd_t", "=", "False", ",", "include_mscd_t", "=", "False", ")", ":", "d", "=", "{", "\"D\"", ":", "self", ".", "diffusivity", ",", "\"D_sigma\"", ":", "self", ".", "diffusivity_std_dev", ",", "\"D_charge\...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.get_framework_rms_plot
Get the plot of rms framework displacement vs time. Useful for checking for melting, especially if framework atoms can move via paddle-wheel or similar mechanism (which would show up in max framework displacement but doesn't constitute melting). Args: plt (matplotlib.pyplot)...
pymatgen/analysis/diffusion_analyzer.py
def get_framework_rms_plot(self, plt=None, granularity=200, matching_s=None): """ Get the plot of rms framework displacement vs time. Useful for checking for melting, especially if framework atoms can move via paddle-wheel or similar mechanism (which would ...
def get_framework_rms_plot(self, plt=None, granularity=200, matching_s=None): """ Get the plot of rms framework displacement vs time. Useful for checking for melting, especially if framework atoms can move via paddle-wheel or similar mechanism (which would ...
[ "Get", "the", "plot", "of", "rms", "framework", "displacement", "vs", "time", ".", "Useful", "for", "checking", "for", "melting", "especially", "if", "framework", "atoms", "can", "move", "via", "paddle", "-", "wheel", "or", "similar", "mechanism", "(", "whic...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L411-L463
[ "def", "get_framework_rms_plot", "(", "self", ",", "plt", "=", "None", ",", "granularity", "=", "200", ",", "matching_s", "=", "None", ")", ":", "from", "pymatgen", ".", "util", ".", "plotting", "import", "pretty_plot", "if", "self", ".", "lattices", "is",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.get_msd_plot
Get the plot of the smoothed msd vs time graph. Useful for checking convergence. This can be written to an image file. Args: plt: A plot object. Defaults to None, which means one will be generated. mode (str): Determines type of msd plot. By "species", "sites", ...
pymatgen/analysis/diffusion_analyzer.py
def get_msd_plot(self, plt=None, mode="specie"): """ Get the plot of the smoothed msd vs time graph. Useful for checking convergence. This can be written to an image file. Args: plt: A plot object. Defaults to None, which means one will be generated. ...
def get_msd_plot(self, plt=None, mode="specie"): """ Get the plot of the smoothed msd vs time graph. Useful for checking convergence. This can be written to an image file. Args: plt: A plot object. Defaults to None, which means one will be generated. ...
[ "Get", "the", "plot", "of", "the", "smoothed", "msd", "vs", "time", "graph", ".", "Useful", "for", "checking", "convergence", ".", "This", "can", "be", "written", "to", "an", "image", "file", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L465-L516
[ "def", "get_msd_plot", "(", "self", ",", "plt", "=", "None", ",", "mode", "=", "\"specie\"", ")", ":", "from", "pymatgen", ".", "util", ".", "plotting", "import", "pretty_plot", "plt", "=", "pretty_plot", "(", "12", ",", "8", ",", "plt", "=", "plt", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.export_msdt
Writes MSD data to a csv file that can be easily plotted in other software. Args: filename (str): Filename. Supported formats are csv and dat. If the extension is csv, a csv file is written. Otherwise, a dat format is assumed.
pymatgen/analysis/diffusion_analyzer.py
def export_msdt(self, filename): """ Writes MSD data to a csv file that can be easily plotted in other software. Args: filename (str): Filename. Supported formats are csv and dat. If the extension is csv, a csv file is written. Otherwise, a da...
def export_msdt(self, filename): """ Writes MSD data to a csv file that can be easily plotted in other software. Args: filename (str): Filename. Supported formats are csv and dat. If the extension is csv, a csv file is written. Otherwise, a da...
[ "Writes", "MSD", "data", "to", "a", "csv", "file", "that", "can", "be", "easily", "plotted", "in", "other", "software", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L531-L553
[ "def", "export_msdt", "(", "self", ",", "filename", ")", ":", "fmt", "=", "\"csv\"", "if", "filename", ".", "lower", "(", ")", ".", "endswith", "(", "\".csv\"", ")", "else", "\"dat\"", "delimiter", "=", "\", \"", "if", "fmt", "==", "\"csv\"", "else", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.from_structures
Convenient constructor that takes in a list of Structure objects to perform diffusion analysis. Args: structures ([Structure]): list of Structure objects (must be ordered in sequence of run). E.g., you may have performed sequential VASP runs to obtain suffici...
pymatgen/analysis/diffusion_analyzer.py
def from_structures(cls, structures, specie, temperature, time_step, step_skip, initial_disp=None, initial_structure=None, **kwargs): """ Convenient constructor that takes in a list of Structure objects to perform diffusion analysis. Args:...
def from_structures(cls, structures, specie, temperature, time_step, step_skip, initial_disp=None, initial_structure=None, **kwargs): """ Convenient constructor that takes in a list of Structure objects to perform diffusion analysis. Args:...
[ "Convenient", "constructor", "that", "takes", "in", "a", "list", "of", "Structure", "objects", "to", "perform", "diffusion", "analysis", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L556-L618
[ "def", "from_structures", "(", "cls", ",", "structures", ",", "specie", ",", "temperature", ",", "time_step", ",", "step_skip", ",", "initial_disp", "=", "None", ",", "initial_structure", "=", "None", ",", "*", "*", "kwargs", ")", ":", "p", ",", "l", "="...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.from_vaspruns
Convenient constructor that takes in a list of Vasprun objects to perform diffusion analysis. Args: vaspruns ([Vasprun]): List of Vaspruns (must be ordered in sequence of MD simulation). E.g., you may have performed sequential VASP runs to obtain sufficient ...
pymatgen/analysis/diffusion_analyzer.py
def from_vaspruns(cls, vaspruns, specie, initial_disp=None, initial_structure=None, **kwargs): """ Convenient constructor that takes in a list of Vasprun objects to perform diffusion analysis. Args: vaspruns ([Vasprun]): List of Vaspruns (must be ordere...
def from_vaspruns(cls, vaspruns, specie, initial_disp=None, initial_structure=None, **kwargs): """ Convenient constructor that takes in a list of Vasprun objects to perform diffusion analysis. Args: vaspruns ([Vasprun]): List of Vaspruns (must be ordere...
[ "Convenient", "constructor", "that", "takes", "in", "a", "list", "of", "Vasprun", "objects", "to", "perform", "diffusion", "analysis", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L621-L674
[ "def", "from_vaspruns", "(", "cls", ",", "vaspruns", ",", "specie", ",", "initial_disp", "=", "None", ",", "initial_structure", "=", "None", ",", "*", "*", "kwargs", ")", ":", "def", "get_structures", "(", "vaspruns", ")", ":", "for", "i", ",", "vr", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
DiffusionAnalyzer.from_files
Convenient constructor that takes in a list of vasprun.xml paths to perform diffusion analysis. Args: filepaths ([str]): List of paths to vasprun.xml files of runs. ( must be ordered in sequence of MD simulation). For example, you may have done sequential VAS...
pymatgen/analysis/diffusion_analyzer.py
def from_files(cls, filepaths, specie, step_skip=10, ncores=None, initial_disp=None, initial_structure=None, **kwargs): """ Convenient constructor that takes in a list of vasprun.xml paths to perform diffusion analysis. Args: filepaths ([str]): List of pat...
def from_files(cls, filepaths, specie, step_skip=10, ncores=None, initial_disp=None, initial_structure=None, **kwargs): """ Convenient constructor that takes in a list of vasprun.xml paths to perform diffusion analysis. Args: filepaths ([str]): List of pat...
[ "Convenient", "constructor", "that", "takes", "in", "a", "list", "of", "vasprun", ".", "xml", "paths", "to", "perform", "diffusion", "analysis", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/diffusion_analyzer.py#L677-L737
[ "def", "from_files", "(", "cls", ",", "filepaths", ",", "specie", ",", "step_skip", "=", "10", ",", "ncores", "=", "None", ",", "initial_disp", "=", "None", ",", "initial_structure", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "ncores", "is",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AbstractChemenvStrategy.get_site_coordination_environments_fractions
Applies the strategy to the structure_environments object in order to define the coordination environment of a given site. :param site: Site for which the coordination environment is looked for :return: The coordination environment of the site. For complex strategies, where one allows multiple ...
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def get_site_coordination_environments_fractions(self, site, isite=None, dequivsite=None, dthissite=None, mysym=None, ordered=True, min_fraction=0.0, return_maps=True, return_strategy_dict_info=False): """ ...
def get_site_coordination_environments_fractions(self, site, isite=None, dequivsite=None, dthissite=None, mysym=None, ordered=True, min_fraction=0.0, return_maps=True, return_strategy_dict_info=False): """ ...
[ "Applies", "the", "strategy", "to", "the", "structure_environments", "object", "in", "order", "to", "define", "the", "coordination", "environment", "of", "a", "given", "site", ".", ":", "param", "site", ":", "Site", "for", "which", "the", "coordination", "envi...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L279-L289
[ "def", "get_site_coordination_environments_fractions", "(", "self", ",", "site", ",", "isite", "=", "None", ",", "dequivsite", "=", "None", ",", "dthissite", "=", "None", ",", "mysym", "=", "None", ",", "ordered", "=", "True", ",", "min_fraction", "=", "0.0"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AbstractChemenvStrategy.get_site_ce_fractions_and_neighbors
Applies the strategy to the structure_environments object in order to get coordination environments, their fraction, csm, geometry_info, and neighbors :param site: Site for which the above information is seeked :return: The list of neighbors of the site. For complex strategies, where one allows ...
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def get_site_ce_fractions_and_neighbors(self, site, full_ce_info=False, strategy_info=False): """ Applies the strategy to the structure_environments object in order to get coordination environments, their fraction, csm, geometry_info, and neighbors :param site: Site for which the above i...
def get_site_ce_fractions_and_neighbors(self, site, full_ce_info=False, strategy_info=False): """ Applies the strategy to the structure_environments object in order to get coordination environments, their fraction, csm, geometry_info, and neighbors :param site: Site for which the above i...
[ "Applies", "the", "strategy", "to", "the", "structure_environments", "object", "in", "order", "to", "get", "coordination", "environments", "their", "fraction", "csm", "geometry_info", "and", "neighbors", ":", "param", "site", ":", "Site", "for", "which", "the", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L291-L317
[ "def", "get_site_ce_fractions_and_neighbors", "(", "self", ",", "site", ",", "full_ce_info", "=", "False", ",", "strategy_info", "=", "False", ")", ":", "[", "isite", ",", "dequivsite", ",", "dthissite", ",", "mysym", "]", "=", "self", ".", "equivalent_site_in...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SimplestChemenvStrategy.as_dict
Bson-serializable dict representation of the SimplestChemenvStrategy object. :return: Bson-serializable dict representation of the SimplestChemenvStrategy object.
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def as_dict(self): """ Bson-serializable dict representation of the SimplestChemenvStrategy object. :return: Bson-serializable dict representation of the SimplestChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self.__class__.__n...
def as_dict(self): """ Bson-serializable dict representation of the SimplestChemenvStrategy object. :return: Bson-serializable dict representation of the SimplestChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self.__class__.__n...
[ "Bson", "-", "serializable", "dict", "representation", "of", "the", "SimplestChemenvStrategy", "object", ".", ":", "return", ":", "Bson", "-", "serializable", "dict", "representation", "of", "the", "SimplestChemenvStrategy", "object", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L561-L572
[ "def", "as_dict", "(", "self", ")", ":", "return", "{", "\"@module\"", ":", "self", ".", "__class__", ".", "__module__", ",", "\"@class\"", ":", "self", ".", "__class__", ".", "__name__", ",", "\"distance_cutoff\"", ":", "float", "(", "self", ".", "_distan...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SimplestChemenvStrategy.from_dict
Reconstructs the SimplestChemenvStrategy object from a dict representation of the SimplestChemenvStrategy object created using the as_dict method. :param d: dict representation of the SimplestChemenvStrategy object :return: StructureEnvironments object
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def from_dict(cls, d): """ Reconstructs the SimplestChemenvStrategy object from a dict representation of the SimplestChemenvStrategy object created using the as_dict method. :param d: dict representation of the SimplestChemenvStrategy object :return: StructureEnvironments object ...
def from_dict(cls, d): """ Reconstructs the SimplestChemenvStrategy object from a dict representation of the SimplestChemenvStrategy object created using the as_dict method. :param d: dict representation of the SimplestChemenvStrategy object :return: StructureEnvironments object ...
[ "Reconstructs", "the", "SimplestChemenvStrategy", "object", "from", "a", "dict", "representation", "of", "the", "SimplestChemenvStrategy", "object", "created", "using", "the", "as_dict", "method", ".", ":", "param", "d", ":", "dict", "representation", "of", "the", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L575-L585
[ "def", "from_dict", "(", "cls", ",", "d", ")", ":", "return", "cls", "(", "distance_cutoff", "=", "d", "[", "\"distance_cutoff\"", "]", ",", "angle_cutoff", "=", "d", "[", "\"angle_cutoff\"", "]", ",", "additional_condition", "=", "d", "[", "\"additional_con...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SimpleAbundanceChemenvStrategy.as_dict
Bson-serializable dict representation of the SimpleAbundanceChemenvStrategy object. :return: Bson-serializable dict representation of the SimpleAbundanceChemenvStrategy object.
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def as_dict(self): """ Bson-serializable dict representation of the SimpleAbundanceChemenvStrategy object. :return: Bson-serializable dict representation of the SimpleAbundanceChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self...
def as_dict(self): """ Bson-serializable dict representation of the SimpleAbundanceChemenvStrategy object. :return: Bson-serializable dict representation of the SimpleAbundanceChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self...
[ "Bson", "-", "serializable", "dict", "representation", "of", "the", "SimpleAbundanceChemenvStrategy", "object", ".", ":", "return", ":", "Bson", "-", "serializable", "dict", "representation", "of", "the", "SimpleAbundanceChemenvStrategy", "object", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L682-L689
[ "def", "as_dict", "(", "self", ")", ":", "return", "{", "\"@module\"", ":", "self", ".", "__class__", ".", "__module__", ",", "\"@class\"", ":", "self", ".", "__class__", ".", "__name__", ",", "\"additional_condition\"", ":", "self", ".", "_additional_conditio...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
TargettedPenaltiedAbundanceChemenvStrategy.as_dict
Bson-serializable dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object. :return: Bson-serializable dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object.
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def as_dict(self): """ Bson-serializable dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object. :return: Bson-serializable dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object. """ return {"@module": self.__class__.__module__, ...
def as_dict(self): """ Bson-serializable dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object. :return: Bson-serializable dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object. """ return {"@module": self.__class__.__module__, ...
[ "Bson", "-", "serializable", "dict", "representation", "of", "the", "TargettedPenaltiedAbundanceChemenvStrategy", "object", ".", ":", "return", ":", "Bson", "-", "serializable", "dict", "representation", "of", "the", "TargettedPenaltiedAbundanceChemenvStrategy", "object", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L779-L790
[ "def", "as_dict", "(", "self", ")", ":", "return", "{", "\"@module\"", ":", "self", ".", "__class__", ".", "__module__", ",", "\"@class\"", ":", "self", ".", "__class__", ".", "__name__", ",", "\"additional_condition\"", ":", "self", ".", "_additional_conditio...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
TargettedPenaltiedAbundanceChemenvStrategy.from_dict
Reconstructs the TargettedPenaltiedAbundanceChemenvStrategy object from a dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object created using the as_dict method. :param d: dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object :return: TargettedPenalt...
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def from_dict(cls, d): """ Reconstructs the TargettedPenaltiedAbundanceChemenvStrategy object from a dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object created using the as_dict method. :param d: dict representation of the TargettedPenaltiedAbundanceChemenvStrat...
def from_dict(cls, d): """ Reconstructs the TargettedPenaltiedAbundanceChemenvStrategy object from a dict representation of the TargettedPenaltiedAbundanceChemenvStrategy object created using the as_dict method. :param d: dict representation of the TargettedPenaltiedAbundanceChemenvStrat...
[ "Reconstructs", "the", "TargettedPenaltiedAbundanceChemenvStrategy", "object", "from", "a", "dict", "representation", "of", "the", "TargettedPenaltiedAbundanceChemenvStrategy", "object", "created", "using", "the", "as_dict", "method", ".", ":", "param", "d", ":", "dict", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L801-L812
[ "def", "from_dict", "(", "cls", ",", "d", ")", ":", "return", "cls", "(", "additional_condition", "=", "d", "[", "\"additional_condition\"", "]", ",", "max_nabundant", "=", "d", "[", "\"max_nabundant\"", "]", ",", "target_environments", "=", "d", "[", "\"tar...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
WeightedNbSetChemenvStrategy.as_dict
Bson-serializable dict representation of the WeightedNbSetChemenvStrategy object. :return: Bson-serializable dict representation of the WeightedNbSetChemenvStrategy object.
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def as_dict(self): """ Bson-serializable dict representation of the WeightedNbSetChemenvStrategy object. :return: Bson-serializable dict representation of the WeightedNbSetChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self.__c...
def as_dict(self): """ Bson-serializable dict representation of the WeightedNbSetChemenvStrategy object. :return: Bson-serializable dict representation of the WeightedNbSetChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self.__c...
[ "Bson", "-", "serializable", "dict", "representation", "of", "the", "WeightedNbSetChemenvStrategy", "object", ".", ":", "return", ":", "Bson", "-", "serializable", "dict", "representation", "of", "the", "WeightedNbSetChemenvStrategy", "object", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L1776-L1787
[ "def", "as_dict", "(", "self", ")", ":", "return", "{", "\"@module\"", ":", "self", ".", "__class__", ".", "__module__", ",", "\"@class\"", ":", "self", ".", "__class__", ".", "__name__", ",", "\"additional_condition\"", ":", "self", ".", "_additional_conditio...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
WeightedNbSetChemenvStrategy.from_dict
Reconstructs the WeightedNbSetChemenvStrategy object from a dict representation of the WeightedNbSetChemenvStrategy object created using the as_dict method. :param d: dict representation of the WeightedNbSetChemenvStrategy object :return: WeightedNbSetChemenvStrategy object
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def from_dict(cls, d): """ Reconstructs the WeightedNbSetChemenvStrategy object from a dict representation of the WeightedNbSetChemenvStrategy object created using the as_dict method. :param d: dict representation of the WeightedNbSetChemenvStrategy object :return: WeightedNbSetC...
def from_dict(cls, d): """ Reconstructs the WeightedNbSetChemenvStrategy object from a dict representation of the WeightedNbSetChemenvStrategy object created using the as_dict method. :param d: dict representation of the WeightedNbSetChemenvStrategy object :return: WeightedNbSetC...
[ "Reconstructs", "the", "WeightedNbSetChemenvStrategy", "object", "from", "a", "dict", "representation", "of", "the", "WeightedNbSetChemenvStrategy", "object", "created", "using", "the", "as_dict", "method", ".", ":", "param", "d", ":", "dict", "representation", "of", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L1790-L1800
[ "def", "from_dict", "(", "cls", ",", "d", ")", ":", "return", "cls", "(", "additional_condition", "=", "d", "[", "\"additional_condition\"", "]", ",", "symmetry_measure_type", "=", "d", "[", "\"symmetry_measure_type\"", "]", ",", "nb_set_weights", "=", "d", "[...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
MultiWeightsChemenvStrategy.as_dict
Bson-serializable dict representation of the MultiWeightsChemenvStrategy object. :return: Bson-serializable dict representation of the MultiWeightsChemenvStrategy object.
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def as_dict(self): """ Bson-serializable dict representation of the MultiWeightsChemenvStrategy object. :return: Bson-serializable dict representation of the MultiWeightsChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self.__cla...
def as_dict(self): """ Bson-serializable dict representation of the MultiWeightsChemenvStrategy object. :return: Bson-serializable dict representation of the MultiWeightsChemenvStrategy object. """ return {"@module": self.__class__.__module__, "@class": self.__cla...
[ "Bson", "-", "serializable", "dict", "representation", "of", "the", "MultiWeightsChemenvStrategy", "object", ".", ":", "return", ":", "Bson", "-", "serializable", "dict", "representation", "of", "the", "MultiWeightsChemenvStrategy", "object", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L1915-L1937
[ "def", "as_dict", "(", "self", ")", ":", "return", "{", "\"@module\"", ":", "self", ".", "__class__", ".", "__module__", ",", "\"@class\"", ":", "self", ".", "__class__", ".", "__name__", ",", "\"additional_condition\"", ":", "self", ".", "_additional_conditio...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
MultiWeightsChemenvStrategy.from_dict
Reconstructs the MultiWeightsChemenvStrategy object from a dict representation of the MultipleAbundanceChemenvStrategy object created using the as_dict method. :param d: dict representation of the MultiWeightsChemenvStrategy object :return: MultiWeightsChemenvStrategy object
pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py
def from_dict(cls, d): """ Reconstructs the MultiWeightsChemenvStrategy object from a dict representation of the MultipleAbundanceChemenvStrategy object created using the as_dict method. :param d: dict representation of the MultiWeightsChemenvStrategy object :return: MultiWeights...
def from_dict(cls, d): """ Reconstructs the MultiWeightsChemenvStrategy object from a dict representation of the MultipleAbundanceChemenvStrategy object created using the as_dict method. :param d: dict representation of the MultiWeightsChemenvStrategy object :return: MultiWeights...
[ "Reconstructs", "the", "MultiWeightsChemenvStrategy", "object", "from", "a", "dict", "representation", "of", "the", "MultipleAbundanceChemenvStrategy", "object", "created", "using", "the", "as_dict", "method", ".", ":", "param", "d", ":", "dict", "representation", "of...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/chemenv_strategies.py#L1940-L1964
[ "def", "from_dict", "(", "cls", ",", "d", ")", ":", "if", "d", "[", "\"normalized_angle_distance_weight\"", "]", "is", "not", "None", ":", "nad_w", "=", "NormalizedAngleDistanceNbSetWeight", ".", "from_dict", "(", "d", "[", "\"normalized_angle_distance_weight\"", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CoordinationGeometry.pauling_stability_ratio
Returns the theoretical Pauling stability ratio (rC/rA) for this environment.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def pauling_stability_ratio(self): """ Returns the theoretical Pauling stability ratio (rC/rA) for this environment. """ if self._pauling_stability_ratio is None: if self.ce_symbol in ['S:1', 'L:2']: self._pauling_stability_ratio = 0.0 else: ...
def pauling_stability_ratio(self): """ Returns the theoretical Pauling stability ratio (rC/rA) for this environment. """ if self._pauling_stability_ratio is None: if self.ce_symbol in ['S:1', 'L:2']: self._pauling_stability_ratio = 0.0 else: ...
[ "Returns", "the", "theoretical", "Pauling", "stability", "ratio", "(", "rC", "/", "rA", ")", "for", "this", "environment", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L575-L596
[ "def", "pauling_stability_ratio", "(", "self", ")", ":", "if", "self", ".", "_pauling_stability_ratio", "is", "None", ":", "if", "self", ".", "ce_symbol", "in", "[", "'S:1'", ",", "'L:2'", "]", ":", "self", ".", "_pauling_stability_ratio", "=", "0.0", "else"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CoordinationGeometry.number_of_permutations
Returns the number of permutations of this coordination geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def number_of_permutations(self): """ Returns the number of permutations of this coordination geometry. """ if self.permutations_safe_override: return factorial(self.coordination) elif self.permutations is None: return factorial(self.coordination) ...
def number_of_permutations(self): """ Returns the number of permutations of this coordination geometry. """ if self.permutations_safe_override: return factorial(self.coordination) elif self.permutations is None: return factorial(self.coordination) ...
[ "Returns", "the", "number", "of", "permutations", "of", "this", "coordination", "geometry", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L659-L667
[ "def", "number_of_permutations", "(", "self", ")", ":", "if", "self", ".", "permutations_safe_override", ":", "return", "factorial", "(", "self", ".", "coordination", ")", "elif", "self", ".", "permutations", "is", "None", ":", "return", "factorial", "(", "sel...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CoordinationGeometry.faces
Returns the list of faces of this coordination geometry. Each face is given as a list of its vertices coordinates.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def faces(self, sites, permutation=None): """ Returns the list of faces of this coordination geometry. Each face is given as a list of its vertices coordinates. """ if permutation is None: coords = [site.coords for site in sites] else: coords = [si...
def faces(self, sites, permutation=None): """ Returns the list of faces of this coordination geometry. Each face is given as a list of its vertices coordinates. """ if permutation is None: coords = [site.coords for site in sites] else: coords = [si...
[ "Returns", "the", "list", "of", "faces", "of", "this", "coordination", "geometry", ".", "Each", "face", "is", "given", "as", "a", "list", "of", "its", "vertices", "coordinates", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L689-L698
[ "def", "faces", "(", "self", ",", "sites", ",", "permutation", "=", "None", ")", ":", "if", "permutation", "is", "None", ":", "coords", "=", "[", "site", ".", "coords", "for", "site", "in", "sites", "]", "else", ":", "coords", "=", "[", "sites", "[...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CoordinationGeometry.edges
Returns the list of edges of this coordination geometry. Each edge is given as a list of its end vertices coordinates.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def edges(self, sites, permutation=None, input='sites'): """ Returns the list of edges of this coordination geometry. Each edge is given as a list of its end vertices coordinates. """ if input == 'sites': coords = [site.coords for site in sites] elif input == ...
def edges(self, sites, permutation=None, input='sites'): """ Returns the list of edges of this coordination geometry. Each edge is given as a list of its end vertices coordinates. """ if input == 'sites': coords = [site.coords for site in sites] elif input == ...
[ "Returns", "the", "list", "of", "edges", "of", "this", "coordination", "geometry", ".", "Each", "edge", "is", "given", "as", "a", "list", "of", "its", "end", "vertices", "coordinates", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L700-L715
[ "def", "edges", "(", "self", ",", "sites", ",", "permutation", "=", "None", ",", "input", "=", "'sites'", ")", ":", "if", "input", "==", "'sites'", ":", "coords", "=", "[", "site", ".", "coords", "for", "site", "in", "sites", "]", "elif", "input", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CoordinationGeometry.solid_angles
Returns the list of "perfect" solid angles Each edge is given as a list of its end vertices coordinates.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def solid_angles(self, permutation=None): """ Returns the list of "perfect" solid angles Each edge is given as a list of its end vertices coordinates. """ if permutation is None: return self._solid_angles else: return [self._solid_angles[ii] for ii...
def solid_angles(self, permutation=None): """ Returns the list of "perfect" solid angles Each edge is given as a list of its end vertices coordinates. """ if permutation is None: return self._solid_angles else: return [self._solid_angles[ii] for ii...
[ "Returns", "the", "list", "of", "perfect", "solid", "angles", "Each", "edge", "is", "given", "as", "a", "list", "of", "its", "end", "vertices", "coordinates", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L717-L725
[ "def", "solid_angles", "(", "self", ",", "permutation", "=", "None", ")", ":", "if", "permutation", "is", "None", ":", "return", "self", ".", "_solid_angles", "else", ":", "return", "[", "self", ".", "_solid_angles", "[", "ii", "]", "for", "ii", "in", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CoordinationGeometry.get_pmeshes
Returns the pmesh strings used for jmol to show this geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_pmeshes(self, sites, permutation=None): """ Returns the pmesh strings used for jmol to show this geometry. """ pmeshes = [] # _vertices = [site.coords for site in sites] if permutation is None: _vertices = [site.coords for site in sites] else: ...
def get_pmeshes(self, sites, permutation=None): """ Returns the pmesh strings used for jmol to show this geometry. """ pmeshes = [] # _vertices = [site.coords for site in sites] if permutation is None: _vertices = [site.coords for site in sites] else: ...
[ "Returns", "the", "pmesh", "strings", "used", "for", "jmol", "to", "show", "this", "geometry", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L727-L772
[ "def", "get_pmeshes", "(", "self", ",", "sites", ",", "permutation", "=", "None", ")", ":", "pmeshes", "=", "[", "]", "# _vertices = [site.coords for site in sites]", "if", "permutation", "is", "None", ":", "_vertices", "=", "[", "site", ".", "coords", "for", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_geometries
Returns a list of coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of coordination geometries are returned.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_geometries(self, coordination=None, returned='cg'): """ Returns a list of coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of coordination geometries are returned. """ geom = list() if coord...
def get_geometries(self, coordination=None, returned='cg'): """ Returns a list of coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of coordination geometries are returned. """ geom = list() if coord...
[ "Returns", "a", "list", "of", "coordination", "geometries", "with", "the", "given", "coordination", "number", ".", ":", "param", "coordination", ":", "The", "coordination", "number", "of", "which", "the", "list", "of", "coordination", "geometries", "are", "retur...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L870-L889
[ "def", "get_geometries", "(", "self", ",", "coordination", "=", "None", ",", "returned", "=", "'cg'", ")", ":", "geom", "=", "list", "(", ")", "if", "coordination", "is", "None", ":", "for", "gg", "in", "self", ".", "cg_list", ":", "if", "returned", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_implemented_geometries
Returns a list of the implemented coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of implemented coordination geometries are returned.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_implemented_geometries(self, coordination=None, returned='cg', include_deactivated=False): """ Returns a list of the implemented coordination geometries with the given coordination number. :param coordination: The coordination number of which the list o...
def get_implemented_geometries(self, coordination=None, returned='cg', include_deactivated=False): """ Returns a list of the implemented coordination geometries with the given coordination number. :param coordination: The coordination number of which the list o...
[ "Returns", "a", "list", "of", "the", "implemented", "coordination", "geometries", "with", "the", "given", "coordination", "number", ".", ":", "param", "coordination", ":", "The", "coordination", "number", "of", "which", "the", "list", "of", "implemented", "coord...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L913-L937
[ "def", "get_implemented_geometries", "(", "self", ",", "coordination", "=", "None", ",", "returned", "=", "'cg'", ",", "include_deactivated", "=", "False", ")", ":", "geom", "=", "list", "(", ")", "if", "coordination", "is", "None", ":", "for", "gg", "in",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_not_implemented_geometries
Returns a list of the implemented coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of implemented coordination geometries are returned.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_not_implemented_geometries(self, coordination=None, returned='mp_symbol'): """ Returns a list of the implemented coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of implemente...
def get_not_implemented_geometries(self, coordination=None, returned='mp_symbol'): """ Returns a list of the implemented coordination geometries with the given coordination number. :param coordination: The coordination number of which the list of implemente...
[ "Returns", "a", "list", "of", "the", "implemented", "coordination", "geometries", "with", "the", "given", "coordination", "number", ".", ":", "param", "coordination", ":", "The", "coordination", "number", "of", "which", "the", "list", "of", "implemented", "coord...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L939-L961
[ "def", "get_not_implemented_geometries", "(", "self", ",", "coordination", "=", "None", ",", "returned", "=", "'mp_symbol'", ")", ":", "geom", "=", "list", "(", ")", "if", "coordination", "is", "None", ":", "for", "gg", "in", "self", ".", "cg_list", ":", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_geometry_from_name
Returns the coordination geometry of the given name. :param name: The name of the coordination geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_geometry_from_name(self, name): """ Returns the coordination geometry of the given name. :param name: The name of the coordination geometry. """ for gg in self.cg_list: if gg.name == name or name in gg.alternative_names: return gg raise...
def get_geometry_from_name(self, name): """ Returns the coordination geometry of the given name. :param name: The name of the coordination geometry. """ for gg in self.cg_list: if gg.name == name or name in gg.alternative_names: return gg raise...
[ "Returns", "the", "coordination", "geometry", "of", "the", "given", "name", ".", ":", "param", "name", ":", "The", "name", "of", "the", "coordination", "geometry", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L963-L973
[ "def", "get_geometry_from_name", "(", "self", ",", "name", ")", ":", "for", "gg", "in", "self", ".", "cg_list", ":", "if", "gg", ".", "name", "==", "name", "or", "name", "in", "gg", ".", "alternative_names", ":", "return", "gg", "raise", "LookupError", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_geometry_from_IUPAC_symbol
Returns the coordination geometry of the given IUPAC symbol. :param IUPAC_symbol: The IUPAC symbol of the coordination geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_geometry_from_IUPAC_symbol(self, IUPAC_symbol): """ Returns the coordination geometry of the given IUPAC symbol. :param IUPAC_symbol: The IUPAC symbol of the coordination geometry. """ for gg in self.cg_list: if gg.IUPAC_symbol == IUPAC_symbol: ...
def get_geometry_from_IUPAC_symbol(self, IUPAC_symbol): """ Returns the coordination geometry of the given IUPAC symbol. :param IUPAC_symbol: The IUPAC symbol of the coordination geometry. """ for gg in self.cg_list: if gg.IUPAC_symbol == IUPAC_symbol: ...
[ "Returns", "the", "coordination", "geometry", "of", "the", "given", "IUPAC", "symbol", ".", ":", "param", "IUPAC_symbol", ":", "The", "IUPAC", "symbol", "of", "the", "coordination", "geometry", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L975-L985
[ "def", "get_geometry_from_IUPAC_symbol", "(", "self", ",", "IUPAC_symbol", ")", ":", "for", "gg", "in", "self", ".", "cg_list", ":", "if", "gg", ".", "IUPAC_symbol", "==", "IUPAC_symbol", ":", "return", "gg", "raise", "LookupError", "(", "'No coordination geomet...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_geometry_from_IUCr_symbol
Returns the coordination geometry of the given IUCr symbol. :param IUCr_symbol: The IUCr symbol of the coordination geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_geometry_from_IUCr_symbol(self, IUCr_symbol): """ Returns the coordination geometry of the given IUCr symbol. :param IUCr_symbol: The IUCr symbol of the coordination geometry. """ for gg in self.cg_list: if gg.IUCr_symbol == IUCr_symbol: return...
def get_geometry_from_IUCr_symbol(self, IUCr_symbol): """ Returns the coordination geometry of the given IUCr symbol. :param IUCr_symbol: The IUCr symbol of the coordination geometry. """ for gg in self.cg_list: if gg.IUCr_symbol == IUCr_symbol: return...
[ "Returns", "the", "coordination", "geometry", "of", "the", "given", "IUCr", "symbol", ".", ":", "param", "IUCr_symbol", ":", "The", "IUCr", "symbol", "of", "the", "coordination", "geometry", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L987-L997
[ "def", "get_geometry_from_IUCr_symbol", "(", "self", ",", "IUCr_symbol", ")", ":", "for", "gg", "in", "self", ".", "cg_list", ":", "if", "gg", ".", "IUCr_symbol", "==", "IUCr_symbol", ":", "return", "gg", "raise", "LookupError", "(", "'No coordination geometry f...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.get_geometry_from_mp_symbol
Returns the coordination geometry of the given mp_symbol. :param mp_symbol: The mp_symbol of the coordination geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def get_geometry_from_mp_symbol(self, mp_symbol): """ Returns the coordination geometry of the given mp_symbol. :param mp_symbol: The mp_symbol of the coordination geometry. """ for gg in self.cg_list: if gg.mp_symbol == mp_symbol: return gg ra...
def get_geometry_from_mp_symbol(self, mp_symbol): """ Returns the coordination geometry of the given mp_symbol. :param mp_symbol: The mp_symbol of the coordination geometry. """ for gg in self.cg_list: if gg.mp_symbol == mp_symbol: return gg ra...
[ "Returns", "the", "coordination", "geometry", "of", "the", "given", "mp_symbol", ".", ":", "param", "mp_symbol", ":", "The", "mp_symbol", "of", "the", "coordination", "geometry", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L999-L1009
[ "def", "get_geometry_from_mp_symbol", "(", "self", ",", "mp_symbol", ")", ":", "for", "gg", "in", "self", ".", "cg_list", ":", "if", "gg", ".", "mp_symbol", "==", "mp_symbol", ":", "return", "gg", "raise", "LookupError", "(", "'No coordination geometry found wit...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
AllCoordinationGeometries.is_a_valid_coordination_geometry
Checks whether a given coordination geometry is valid (exists) and whether the parameters are coherent with each other. :param IUPAC_symbol: :param IUCr_symbol: :param name: :param cn: :param mp_symbol: The mp_symbol of the coordination geometry.
pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py
def is_a_valid_coordination_geometry(self, mp_symbol=None, IUPAC_symbol=None, IUCr_symbol=None, name=None, cn=None): """ Checks whether a given coordination geometry is valid (exists) and whether the parameters are coheren...
def is_a_valid_coordination_geometry(self, mp_symbol=None, IUPAC_symbol=None, IUCr_symbol=None, name=None, cn=None): """ Checks whether a given coordination geometry is valid (exists) and whether the parameters are coheren...
[ "Checks", "whether", "a", "given", "coordination", "geometry", "is", "valid", "(", "exists", ")", "and", "whether", "the", "parameters", "are", "coherent", "with", "each", "other", ".", ":", "param", "IUPAC_symbol", ":", ":", "param", "IUCr_symbol", ":", ":"...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/chemenv/coordination_environments/coordination_geometries.py#L1011-L1066
[ "def", "is_a_valid_coordination_geometry", "(", "self", ",", "mp_symbol", "=", "None", ",", "IUPAC_symbol", "=", "None", ",", "IUCr_symbol", "=", "None", ",", "name", "=", "None", ",", "cn", "=", "None", ")", ":", "if", "name", "is", "not", "None", ":", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
SpinComparator.are_equal
True if species are exactly the same, i.e., Fe2+ == Fe2+ but not Fe3+. and the spins are reversed. i.e., spin up maps to spin down, and vice versa. Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. s...
pymatgen/analysis/structure_matcher.py
def are_equal(self, sp1, sp2): """ True if species are exactly the same, i.e., Fe2+ == Fe2+ but not Fe3+. and the spins are reversed. i.e., spin up maps to spin down, and vice versa. Args: sp1: First species. A dict of {specie/element: amt} as per the ...
def are_equal(self, sp1, sp2): """ True if species are exactly the same, i.e., Fe2+ == Fe2+ but not Fe3+. and the spins are reversed. i.e., spin up maps to spin down, and vice versa. Args: sp1: First species. A dict of {specie/element: amt} as per the ...
[ "True", "if", "species", "are", "exactly", "the", "same", "i", ".", "e", ".", "Fe2", "+", "==", "Fe2", "+", "but", "not", "Fe3", "+", ".", "and", "the", "spins", "are", "reversed", ".", "i", ".", "e", ".", "spin", "up", "maps", "to", "spin", "d...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L132-L158
[ "def", "are_equal", "(", "self", ",", "sp1", ",", "sp2", ")", ":", "for", "s1", "in", "sp1", ".", "keys", "(", ")", ":", "spin1", "=", "getattr", "(", "s1", ",", "\"spin\"", ",", "0", ")", "oxi1", "=", "getattr", "(", "s1", ",", "\"oxi_state\"", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ElementComparator.are_equal
True if element:amounts are exactly the same, i.e., oxidation state is not considered. Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: amt} as per the ...
pymatgen/analysis/structure_matcher.py
def are_equal(self, sp1, sp2): """ True if element:amounts are exactly the same, i.e., oxidation state is not considered. Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species...
def are_equal(self, sp1, sp2): """ True if element:amounts are exactly the same, i.e., oxidation state is not considered. Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species...
[ "True", "if", "element", ":", "amounts", "are", "exactly", "the", "same", "i", ".", "e", ".", "oxidation", "state", "is", "not", "considered", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L173-L190
[ "def", "are_equal", "(", "self", ",", "sp1", ",", "sp2", ")", ":", "comp1", "=", "Composition", "(", "sp1", ")", "comp2", "=", "Composition", "(", "sp2", ")", "return", "comp1", ".", "get_el_amt_dict", "(", ")", "==", "comp2", ".", "get_el_amt_dict", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
OrderDisorderElementComparator.are_equal
True if there is some overlap in composition between the species Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: amt} as per the definition in Site a...
pymatgen/analysis/structure_matcher.py
def are_equal(self, sp1, sp2): """ True if there is some overlap in composition between the species Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: a...
def are_equal(self, sp1, sp2): """ True if there is some overlap in composition between the species Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: a...
[ "True", "if", "there", "is", "some", "overlap", "in", "composition", "between", "the", "species" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L232-L247
[ "def", "are_equal", "(", "self", ",", "sp1", ",", "sp2", ")", ":", "set1", "=", "set", "(", "sp1", ".", "elements", ")", "set2", "=", "set", "(", "sp2", ".", "elements", ")", "return", "set1", ".", "issubset", "(", "set2", ")", "or", "set2", ".",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
OccupancyComparator.are_equal
Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. Returns: True if sets of occupancies...
pymatgen/analysis/structure_matcher.py
def are_equal(self, sp1, sp2): """ Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. ...
def are_equal(self, sp1, sp2): """ Args: sp1: First species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. sp2: Second species. A dict of {specie/element: amt} as per the definition in Site and PeriodicSite. ...
[ "Args", ":", "sp1", ":", "First", "species", ".", "A", "dict", "of", "{", "specie", "/", "element", ":", "amt", "}", "as", "per", "the", "definition", "in", "Site", "and", "PeriodicSite", ".", "sp2", ":", "Second", "species", ".", "A", "dict", "of", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L262-L278
[ "def", "are_equal", "(", "self", ",", "sp1", ",", "sp2", ")", ":", "set1", "=", "set", "(", "sp1", ".", "element_composition", ".", "values", "(", ")", ")", "set2", "=", "set", "(", "sp2", ".", "element_composition", ".", "values", "(", ")", ")", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._get_supercell_size
Returns the supercell size, and whether the supercell should be applied to s1. If fu == 1, s1_supercell is returned as true, to avoid ambiguity.
pymatgen/analysis/structure_matcher.py
def _get_supercell_size(self, s1, s2): """ Returns the supercell size, and whether the supercell should be applied to s1. If fu == 1, s1_supercell is returned as true, to avoid ambiguity. """ if self._supercell_size == 'num_sites': fu = s2.num_sites / s1.num_s...
def _get_supercell_size(self, s1, s2): """ Returns the supercell size, and whether the supercell should be applied to s1. If fu == 1, s1_supercell is returned as true, to avoid ambiguity. """ if self._supercell_size == 'num_sites': fu = s2.num_sites / s1.num_s...
[ "Returns", "the", "supercell", "size", "and", "whether", "the", "supercell", "should", "be", "applied", "to", "s1", ".", "If", "fu", "==", "1", "s1_supercell", "is", "returned", "as", "true", "to", "avoid", "ambiguity", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L387-L409
[ "def", "_get_supercell_size", "(", "self", ",", "s1", ",", "s2", ")", ":", "if", "self", ".", "_supercell_size", "==", "'num_sites'", ":", "fu", "=", "s2", ".", "num_sites", "/", "s1", ".", "num_sites", "elif", "self", ".", "_supercell_size", "==", "'num...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._get_lattices
Yields lattices for s with lengths and angles close to the lattice of target_s. If supercell_size is specified, the returned lattice will have that number of primitive cells in it Args: s, target_s: Structure objects
pymatgen/analysis/structure_matcher.py
def _get_lattices(self, target_lattice, s, supercell_size=1): """ Yields lattices for s with lengths and angles close to the lattice of target_s. If supercell_size is specified, the returned lattice will have that number of primitive cells in it Args: s, targ...
def _get_lattices(self, target_lattice, s, supercell_size=1): """ Yields lattices for s with lengths and angles close to the lattice of target_s. If supercell_size is specified, the returned lattice will have that number of primitive cells in it Args: s, targ...
[ "Yields", "lattices", "for", "s", "with", "lengths", "and", "angles", "close", "to", "the", "lattice", "of", "target_s", ".", "If", "supercell_size", "is", "specified", "the", "returned", "lattice", "will", "have", "that", "number", "of", "primitive", "cells",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L411-L426
[ "def", "_get_lattices", "(", "self", ",", "target_lattice", ",", "s", ",", "supercell_size", "=", "1", ")", ":", "lattices", "=", "s", ".", "lattice", ".", "find_all_mappings", "(", "target_lattice", ",", "ltol", "=", "self", ".", "ltol", ",", "atol", "=...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._get_supercells
Computes all supercells of one structure close to the lattice of the other if s1_supercell == True, it makes the supercells of struct1, otherwise it makes them of s2 yields: s1, s2, supercell_matrix, average_lattice, supercell_matrix
pymatgen/analysis/structure_matcher.py
def _get_supercells(self, struct1, struct2, fu, s1_supercell): """ Computes all supercells of one structure close to the lattice of the other if s1_supercell == True, it makes the supercells of struct1, otherwise it makes them of s2 yields: s1, s2, supercell_matrix, aver...
def _get_supercells(self, struct1, struct2, fu, s1_supercell): """ Computes all supercells of one structure close to the lattice of the other if s1_supercell == True, it makes the supercells of struct1, otherwise it makes them of s2 yields: s1, s2, supercell_matrix, aver...
[ "Computes", "all", "supercells", "of", "one", "structure", "close", "to", "the", "lattice", "of", "the", "other", "if", "s1_supercell", "==", "True", "it", "makes", "the", "supercells", "of", "struct1", "otherwise", "it", "makes", "them", "of", "s2" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L428-L464
[ "def", "_get_supercells", "(", "self", ",", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", ")", ":", "def", "av_lat", "(", "l1", ",", "l2", ")", ":", "params", "=", "(", "np", ".", "array", "(", "l1", ".", "lengths_and_angles", ")", "+", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._cmp_fstruct
Returns true if a matching exists between s2 and s2 under frac_tol. s2 should be a subset of s1
pymatgen/analysis/structure_matcher.py
def _cmp_fstruct(self, s1, s2, frac_tol, mask): """ Returns true if a matching exists between s2 and s2 under frac_tol. s2 should be a subset of s1 """ if len(s2) > len(s1): raise ValueError("s1 must be larger than s2") if mask.shape != (len(s2), len(s1)): ...
def _cmp_fstruct(self, s1, s2, frac_tol, mask): """ Returns true if a matching exists between s2 and s2 under frac_tol. s2 should be a subset of s1 """ if len(s2) > len(s1): raise ValueError("s1 must be larger than s2") if mask.shape != (len(s2), len(s1)): ...
[ "Returns", "true", "if", "a", "matching", "exists", "between", "s2", "and", "s2", "under", "frac_tol", ".", "s2", "should", "be", "a", "subset", "of", "s1" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L466-L476
[ "def", "_cmp_fstruct", "(", "self", ",", "s1", ",", "s2", ",", "frac_tol", ",", "mask", ")", ":", "if", "len", "(", "s2", ")", ">", "len", "(", "s1", ")", ":", "raise", "ValueError", "(", "\"s1 must be larger than s2\"", ")", "if", "mask", ".", "shap...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._cart_dists
Finds a matching in cartesian space. Finds an additional fractional translation vector to minimize RMS distance Args: s1, s2: numpy arrays of fractional coordinates. len(s1) >= len(s2) avg_lattice: Lattice on which to calculate distances mask: numpy array of booleans...
pymatgen/analysis/structure_matcher.py
def _cart_dists(self, s1, s2, avg_lattice, mask, normalization, lll_frac_tol=None): """ Finds a matching in cartesian space. Finds an additional fractional translation vector to minimize RMS distance Args: s1, s2: numpy arrays of fractional coordinates. len(s1) >= len(s2) ...
def _cart_dists(self, s1, s2, avg_lattice, mask, normalization, lll_frac_tol=None): """ Finds a matching in cartesian space. Finds an additional fractional translation vector to minimize RMS distance Args: s1, s2: numpy arrays of fractional coordinates. len(s1) >= len(s2) ...
[ "Finds", "a", "matching", "in", "cartesian", "space", ".", "Finds", "an", "additional", "fractional", "translation", "vector", "to", "minimize", "RMS", "distance" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L478-L511
[ "def", "_cart_dists", "(", "self", ",", "s1", ",", "s2", ",", "avg_lattice", ",", "mask", ",", "normalization", ",", "lll_frac_tol", "=", "None", ")", ":", "if", "len", "(", "s2", ")", ">", "len", "(", "s1", ")", ":", "raise", "ValueError", "(", "\...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._get_mask
Returns mask for matching struct2 to struct1. If struct1 has sites a b c, and fu = 2, assumes supercells of struct2 will be ordered aabbcc (rather than abcabc) Returns: mask, struct1 translation indices, struct2 translation index
pymatgen/analysis/structure_matcher.py
def _get_mask(self, struct1, struct2, fu, s1_supercell): """ Returns mask for matching struct2 to struct1. If struct1 has sites a b c, and fu = 2, assumes supercells of struct2 will be ordered aabbcc (rather than abcabc) Returns: mask, struct1 translation indices, struct...
def _get_mask(self, struct1, struct2, fu, s1_supercell): """ Returns mask for matching struct2 to struct1. If struct1 has sites a b c, and fu = 2, assumes supercells of struct2 will be ordered aabbcc (rather than abcabc) Returns: mask, struct1 translation indices, struct...
[ "Returns", "mask", "for", "matching", "struct2", "to", "struct1", ".", "If", "struct1", "has", "sites", "a", "b", "c", "and", "fu", "=", "2", "assumes", "supercells", "of", "struct2", "will", "be", "ordered", "aabbcc", "(", "rather", "than", "abcabc", ")...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L513-L551
[ "def", "_get_mask", "(", "self", ",", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", ")", ":", "mask", "=", "np", ".", "zeros", "(", "(", "len", "(", "struct2", ")", ",", "len", "(", "struct1", ")", ",", "fu", ")", ",", "dtype", "=", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.fit
Fit two structures. Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: True or False.
pymatgen/analysis/structure_matcher.py
def fit(self, struct1, struct2): """ Fit two structures. Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: True or False. """ struct1, struct2 = self._process_species([struct1, struct2]) if ...
def fit(self, struct1, struct2): """ Fit two structures. Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: True or False. """ struct1, struct2 = self._process_species([struct1, struct2]) if ...
[ "Fit", "two", "structures", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L553-L577
[ "def", "fit", "(", "self", ",", "struct1", ",", "struct2", ")", ":", "struct1", ",", "struct2", "=", "self", ".", "_process_species", "(", "[", "struct1", ",", "struct2", "]", ")", "if", "not", "self", ".", "_subset", "and", "self", ".", "_comparator",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.get_rms_dist
Calculate RMS displacement between two structures Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: rms displacement normalized by (Vol / nsites) ** (1/3) and maximum distance between paired sites. If no matching ...
pymatgen/analysis/structure_matcher.py
def get_rms_dist(self, struct1, struct2): """ Calculate RMS displacement between two structures Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: rms displacement normalized by (Vol / nsites) ** (1/3) an...
def get_rms_dist(self, struct1, struct2): """ Calculate RMS displacement between two structures Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: rms displacement normalized by (Vol / nsites) ** (1/3) an...
[ "Calculate", "RMS", "displacement", "between", "two", "structures" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L579-L600
[ "def", "get_rms_dist", "(", "self", ",", "struct1", ",", "struct2", ")", ":", "struct1", ",", "struct2", "=", "self", ".", "_process_species", "(", "[", "struct1", ",", "struct2", "]", ")", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", "=", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._preprocess
Rescales, finds the reduced structures (primitive and niggli), and finds fu, the supercell size to make struct1 comparable to s2
pymatgen/analysis/structure_matcher.py
def _preprocess(self, struct1, struct2, niggli=True): """ Rescales, finds the reduced structures (primitive and niggli), and finds fu, the supercell size to make struct1 comparable to s2 """ struct1 = struct1.copy() struct2 = struct2.copy() if niggli: ...
def _preprocess(self, struct1, struct2, niggli=True): """ Rescales, finds the reduced structures (primitive and niggli), and finds fu, the supercell size to make struct1 comparable to s2 """ struct1 = struct1.copy() struct2 = struct2.copy() if niggli: ...
[ "Rescales", "finds", "the", "reduced", "structures", "(", "primitive", "and", "niggli", ")", "and", "finds", "fu", "the", "supercell", "size", "to", "make", "struct1", "comparable", "to", "s2" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L614-L646
[ "def", "_preprocess", "(", "self", ",", "struct1", ",", "struct2", ",", "niggli", "=", "True", ")", ":", "struct1", "=", "struct1", ".", "copy", "(", ")", "struct2", "=", "struct2", ".", "copy", "(", ")", "if", "niggli", ":", "struct1", "=", "struct1...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._match
Matches one struct onto the other
pymatgen/analysis/structure_matcher.py
def _match(self, struct1, struct2, fu, s1_supercell=True, use_rms=False, break_on_match=False): """ Matches one struct onto the other """ ratio = fu if s1_supercell else 1/fu if len(struct1) * ratio >= len(struct2): return self._strict_match( ...
def _match(self, struct1, struct2, fu, s1_supercell=True, use_rms=False, break_on_match=False): """ Matches one struct onto the other """ ratio = fu if s1_supercell else 1/fu if len(struct1) * ratio >= len(struct2): return self._strict_match( ...
[ "Matches", "one", "struct", "onto", "the", "other" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L648-L661
[ "def", "_match", "(", "self", ",", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", "=", "True", ",", "use_rms", "=", "False", ",", "break_on_match", "=", "False", ")", ":", "ratio", "=", "fu", "if", "s1_supercell", "else", "1", "/", "fu", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._strict_match
Matches struct2 onto struct1 (which should contain all sites in struct2). Args: struct1, struct2 (Structure): structures to be matched fu (int): size of supercell to create s1_supercell (bool): whether to create the supercell of struct1 (vs struct2) ...
pymatgen/analysis/structure_matcher.py
def _strict_match(self, struct1, struct2, fu, s1_supercell=True, use_rms=False, break_on_match=False): """ Matches struct2 onto struct1 (which should contain all sites in struct2). Args: struct1, struct2 (Structure): structures to be matched ...
def _strict_match(self, struct1, struct2, fu, s1_supercell=True, use_rms=False, break_on_match=False): """ Matches struct2 onto struct1 (which should contain all sites in struct2). Args: struct1, struct2 (Structure): structures to be matched ...
[ "Matches", "struct2", "onto", "struct1", "(", "which", "should", "contain", "all", "sites", "in", "struct2", ")", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L663-L724
[ "def", "_strict_match", "(", "self", ",", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", "=", "True", ",", "use_rms", "=", "False", ",", "break_on_match", "=", "False", ")", ":", "if", "fu", "<", "1", ":", "raise", "ValueError", "(", "\"fu ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.group_structures
Given a list of structures, use fit to group them by structural equality. Args: s_list ([Structure]): List of structures to be grouped anonymous (bool): Wheher to use anonymous mode. Returns: A list of lists of matched structures Assumption: if s...
pymatgen/analysis/structure_matcher.py
def group_structures(self, s_list, anonymous=False): """ Given a list of structures, use fit to group them by structural equality. Args: s_list ([Structure]): List of structures to be grouped anonymous (bool): Wheher to use anonymous mode. Returns: ...
def group_structures(self, s_list, anonymous=False): """ Given a list of structures, use fit to group them by structural equality. Args: s_list ([Structure]): List of structures to be grouped anonymous (bool): Wheher to use anonymous mode. Returns: ...
[ "Given", "a", "list", "of", "structures", "use", "fit", "to", "group", "them", "by", "structural", "equality", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L726-L774
[ "def", "group_structures", "(", "self", ",", "s_list", ",", "anonymous", "=", "False", ")", ":", "if", "self", ".", "_subset", ":", "raise", "ValueError", "(", "\"allow_subset cannot be used with\"", "\" group_structures\"", ")", "original_s_list", "=", "list", "(...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher._anonymous_match
Tries all permutations of matching struct1 to struct2. Args: struct1, struct2 (Structure): Preprocessed input structures Returns: List of (mapping, match)
pymatgen/analysis/structure_matcher.py
def _anonymous_match(self, struct1, struct2, fu, s1_supercell=True, use_rms=False, break_on_match=False, single_match=False): """ Tries all permutations of matching struct1 to struct2. Args: struct1, struct2 (Structure): Preprocessed input structures ...
def _anonymous_match(self, struct1, struct2, fu, s1_supercell=True, use_rms=False, break_on_match=False, single_match=False): """ Tries all permutations of matching struct1 to struct2. Args: struct1, struct2 (Structure): Preprocessed input structures ...
[ "Tries", "all", "permutations", "of", "matching", "struct1", "to", "struct2", ".", "Args", ":", "struct1", "struct2", "(", "Structure", ")", ":", "Preprocessed", "input", "structures", "Returns", ":", "List", "of", "(", "mapping", "match", ")" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L793-L841
[ "def", "_anonymous_match", "(", "self", ",", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", "=", "True", ",", "use_rms", "=", "False", ",", "break_on_match", "=", "False", ",", "single_match", "=", "False", ")", ":", "if", "not", "isinstance", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.get_rms_anonymous
Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: (min_r...
pymatgen/analysis/structure_matcher.py
def get_rms_anonymous(self, struct1, struct2): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. Args: struct1 (Structure): 1st structure stru...
def get_rms_anonymous(self, struct1, struct2): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. Args: struct1 (Structure): 1st structure stru...
[ "Performs", "an", "anonymous", "fitting", "which", "allows", "distinct", "species", "in", "one", "structure", "to", "map", "to", "another", ".", "E", ".", "g", ".", "to", "compare", "if", "the", "Li2O", "and", "Na2O", "structures", "are", "similar", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L843-L869
[ "def", "get_rms_anonymous", "(", "self", ",", "struct1", ",", "struct2", ")", ":", "struct1", ",", "struct2", "=", "self", ".", "_process_species", "(", "[", "struct1", ",", "struct2", "]", ")", "struct1", ",", "struct2", ",", "fu", ",", "s1_supercell", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.get_best_electronegativity_anonymous_mapping
Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. If multiple substitutions are within tolerance this will return the one which minimizes the difference in electronegativity betwe...
pymatgen/analysis/structure_matcher.py
def get_best_electronegativity_anonymous_mapping(self, struct1, struct2): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. If multiple substitutions are within tolerance ...
def get_best_electronegativity_anonymous_mapping(self, struct1, struct2): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. If multiple substitutions are within tolerance ...
[ "Performs", "an", "anonymous", "fitting", "which", "allows", "distinct", "species", "in", "one", "structure", "to", "map", "to", "another", ".", "E", ".", "g", ".", "to", "compare", "if", "the", "Li2O", "and", "Na2O", "structures", "are", "similar", ".", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L871-L901
[ "def", "get_best_electronegativity_anonymous_mapping", "(", "self", ",", "struct1", ",", "struct2", ")", ":", "struct1", ",", "struct2", "=", "self", ".", "_process_species", "(", "[", "struct1", ",", "struct2", "]", ")", "struct1", ",", "struct2", ",", "fu", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.get_all_anonymous_mappings
Performs an anonymous fitting, which allows distinct species in one structure to map to another. Returns a dictionary of species substitutions that are within tolerance Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure niggli (bool):...
pymatgen/analysis/structure_matcher.py
def get_all_anonymous_mappings(self, struct1, struct2, niggli=True, include_dist=False): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. Returns a dictionary of species substitutions that are within t...
def get_all_anonymous_mappings(self, struct1, struct2, niggli=True, include_dist=False): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. Returns a dictionary of species substitutions that are within t...
[ "Performs", "an", "anonymous", "fitting", "which", "allows", "distinct", "species", "in", "one", "structure", "to", "map", "to", "another", ".", "Returns", "a", "dictionary", "of", "species", "substitutions", "that", "are", "within", "tolerance" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L903-L929
[ "def", "get_all_anonymous_mappings", "(", "self", ",", "struct1", ",", "struct2", ",", "niggli", "=", "True", ",", "include_dist", "=", "False", ")", ":", "struct1", ",", "struct2", "=", "self", ".", "_process_species", "(", "[", "struct1", ",", "struct2", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
StructureMatcher.fit_anonymous
Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. Args: struct1 (Structure): 1st structure struct2 (Structure): 2nd structure Returns: True/F...
pymatgen/analysis/structure_matcher.py
def fit_anonymous(self, struct1, struct2, niggli=True): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. Args: struct1 (Structure): 1st structure ...
def fit_anonymous(self, struct1, struct2, niggli=True): """ Performs an anonymous fitting, which allows distinct species in one structure to map to another. E.g., to compare if the Li2O and Na2O structures are similar. Args: struct1 (Structure): 1st structure ...
[ "Performs", "an", "anonymous", "fitting", "which", "allows", "distinct", "species", "in", "one", "structure", "to", "map", "to", "another", ".", "E", ".", "g", ".", "to", "compare", "if", "the", "Li2O", "and", "Na2O", "structures", "are", "similar", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_matcher.py#L931-L954
[ "def", "fit_anonymous", "(", "self", ",", "struct1", ",", "struct2", ",", "niggli", "=", "True", ")", ":", "struct1", ",", "struct2", "=", "self", ".", "_process_species", "(", "[", "struct1", ",", "struct2", "]", ")", "struct1", ",", "struct2", ",", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da