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
BoltztrapPlotter.plot_seebeck_eff_mass_mu
Plot respect to the chemical potential of the Seebeck effective mass calculated as explained in Ref. Gibbs, Z. M. et al., Effective mass and fermi surface complexity factor from ab initio band structure calculations. npj Computational Materials 3, 8 (2017). Args: o...
pymatgen/electronic_structure/plotter.py
def plot_seebeck_eff_mass_mu(self, temps=[300], output='average', Lambda=0.5): """ Plot respect to the chemical potential of the Seebeck effective mass calculated as explained in Ref. Gibbs, Z. M. et al., Effective mass and fermi surface complexity factor...
def plot_seebeck_eff_mass_mu(self, temps=[300], output='average', Lambda=0.5): """ Plot respect to the chemical potential of the Seebeck effective mass calculated as explained in Ref. Gibbs, Z. M. et al., Effective mass and fermi surface complexity factor...
[ "Plot", "respect", "to", "the", "chemical", "potential", "of", "the", "Seebeck", "effective", "mass", "calculated", "as", "explained", "in", "Ref", ".", "Gibbs", "Z", ".", "M", ".", "et", "al", ".", "Effective", "mass", "and", "fermi", "surface", "complexi...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2603-L2663
[ "def", "plot_seebeck_eff_mass_mu", "(", "self", ",", "temps", "=", "[", "300", "]", ",", "output", "=", "'average'", ",", "Lambda", "=", "0.5", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "plt", ".", "figure", "(", "figsize", "=", "("...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_complexity_factor_mu
Plot respect to the chemical potential of the Fermi surface complexity factor calculated as explained in Ref. Gibbs, Z. M. et al., Effective mass and fermi surface complexity factor from ab initio band structure calculations. npj Computational Materials 3, 8 (2017). A...
pymatgen/electronic_structure/plotter.py
def plot_complexity_factor_mu(self, temps=[300], output='average', Lambda=0.5): """ Plot respect to the chemical potential of the Fermi surface complexity factor calculated as explained in Ref. Gibbs, Z. M. et al., Effective mass and fermi surface compl...
def plot_complexity_factor_mu(self, temps=[300], output='average', Lambda=0.5): """ Plot respect to the chemical potential of the Fermi surface complexity factor calculated as explained in Ref. Gibbs, Z. M. et al., Effective mass and fermi surface compl...
[ "Plot", "respect", "to", "the", "chemical", "potential", "of", "the", "Fermi", "surface", "complexity", "factor", "calculated", "as", "explained", "in", "Ref", ".", "Gibbs", "Z", ".", "M", ".", "et", "al", ".", "Effective", "mass", "and", "fermi", "surface...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2665-L2724
[ "def", "plot_complexity_factor_mu", "(", "self", ",", "temps", "=", "[", "300", "]", ",", "output", "=", "'average'", ",", "Lambda", "=", "0.5", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "plt", ".", "figure", "(", "figsize", "=", "(...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_seebeck_mu
Plot the seebeck coefficient in function of Fermi level Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) Returns: a matplotlib object
pymatgen/electronic_structure/plotter.py
def plot_seebeck_mu(self, temp=600, output='eig', xlim=None): """ Plot the seebeck coefficient in function of Fermi level Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) Returns: ...
def plot_seebeck_mu(self, temp=600, output='eig', xlim=None): """ Plot the seebeck coefficient in function of Fermi level Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) Returns: ...
[ "Plot", "the", "seebeck", "coefficient", "in", "function", "of", "Fermi", "level" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2726-L2758
[ "def", "plot_seebeck_mu", "(", "self", ",", "temp", "=", "600", ",", "output", "=", "'eig'", ",", "xlim", "=", "None", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "plt", ".", "figure", "(", "figsize", "=", "(", "9", ",", "7", ")",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_conductivity_mu
Plot the conductivity in function of Fermi level. Semi-log plot Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) tau: A relaxation time in s. By default none and the plot is by units of relaxatio...
pymatgen/electronic_structure/plotter.py
def plot_conductivity_mu(self, temp=600, output='eig', relaxation_time=1e-14, xlim=None): """ Plot the conductivity in function of Fermi level. Semi-log plot Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, ...
def plot_conductivity_mu(self, temp=600, output='eig', relaxation_time=1e-14, xlim=None): """ Plot the conductivity in function of Fermi level. Semi-log plot Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, ...
[ "Plot", "the", "conductivity", "in", "function", "of", "Fermi", "level", ".", "Semi", "-", "log", "plot" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2760-L2795
[ "def", "plot_conductivity_mu", "(", "self", ",", "temp", "=", "600", ",", "output", "=", "'eig'", ",", "relaxation_time", "=", "1e-14", ",", "xlim", "=", "None", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "cond", "=", "self", ".", "_...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_power_factor_mu
Plot the power factor in function of Fermi level. Semi-log plot Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) tau: A relaxation time in s. By default none and the plot is by units of relaxatio...
pymatgen/electronic_structure/plotter.py
def plot_power_factor_mu(self, temp=600, output='eig', relaxation_time=1e-14, xlim=None): """ Plot the power factor in function of Fermi level. Semi-log plot Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, ...
def plot_power_factor_mu(self, temp=600, output='eig', relaxation_time=1e-14, xlim=None): """ Plot the power factor in function of Fermi level. Semi-log plot Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, ...
[ "Plot", "the", "power", "factor", "in", "function", "of", "Fermi", "level", ".", "Semi", "-", "log", "plot" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2797-L2831
[ "def", "plot_power_factor_mu", "(", "self", ",", "temp", "=", "600", ",", "output", "=", "'eig'", ",", "relaxation_time", "=", "1e-14", ",", "xlim", "=", "None", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "plt", ".", "figure", "(", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_zt_mu
Plot the ZT in function of Fermi level. Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) tau: A relaxation time in s. By default none and the plot is by units of relaxation time Returns:...
pymatgen/electronic_structure/plotter.py
def plot_zt_mu(self, temp=600, output='eig', relaxation_time=1e-14, xlim=None): """ Plot the ZT in function of Fermi level. Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) ta...
def plot_zt_mu(self, temp=600, output='eig', relaxation_time=1e-14, xlim=None): """ Plot the ZT in function of Fermi level. Args: temp: the temperature xlim: a list of min and max fermi energy by default (0, and band gap) ta...
[ "Plot", "the", "ZT", "in", "function", "of", "Fermi", "level", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2833-L2866
[ "def", "plot_zt_mu", "(", "self", ",", "temp", "=", "600", ",", "output", "=", "'eig'", ",", "relaxation_time", "=", "1e-14", ",", "xlim", "=", "None", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "plt", ".", "figure", "(", "figsize", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_seebeck_temp
Plot the Seebeck coefficient in function of temperature for different doping levels. Args: dopings: the default 'all' plots all the doping levels in the analyzer. Specify a list of doping levels if you want to plot only some. output: with 'average' you get ...
pymatgen/electronic_structure/plotter.py
def plot_seebeck_temp(self, doping='all', output='average'): """ Plot the Seebeck coefficient in function of temperature for different doping levels. Args: dopings: the default 'all' plots all the doping levels in the analyzer. Specify a list of doping ...
def plot_seebeck_temp(self, doping='all', output='average'): """ Plot the Seebeck coefficient in function of temperature for different doping levels. Args: dopings: the default 'all' plots all the doping levels in the analyzer. Specify a list of doping ...
[ "Plot", "the", "Seebeck", "coefficient", "in", "function", "of", "temperature", "for", "different", "doping", "levels", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L2868-L2918
[ "def", "plot_seebeck_temp", "(", "self", ",", "doping", "=", "'all'", ",", "output", "=", "'average'", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "if", "output", "==", "'average'", ":", "sbk", "=", "self", ".", "_bz", ".", "get_seebeck...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_power_factor_dop
Plot the Power Factor in function of doping levels for different temperatures. Args: temps: the default 'all' plots all the temperatures in the analyzer. Specify a list of temperatures if you want to plot only some. output: with 'average' you get an average of the thr...
pymatgen/electronic_structure/plotter.py
def plot_power_factor_dop(self, temps='all', output='average', relaxation_time=1e-14): """ Plot the Power Factor in function of doping levels for different temperatures. Args: temps: the default 'all' plots all the temperatures in the analyzer. ...
def plot_power_factor_dop(self, temps='all', output='average', relaxation_time=1e-14): """ Plot the Power Factor in function of doping levels for different temperatures. Args: temps: the default 'all' plots all the temperatures in the analyzer. ...
[ "Plot", "the", "Power", "Factor", "in", "function", "of", "doping", "levels", "for", "different", "temperatures", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3243-L3293
[ "def", "plot_power_factor_dop", "(", "self", ",", "temps", "=", "'all'", ",", "output", "=", "'average'", ",", "relaxation_time", "=", "1e-14", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "if", "output", "==", "'average'", ":", "pf", "=",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_zt_dop
Plot the figure of merit zT in function of doping levels for different temperatures. Args: temps: the default 'all' plots all the temperatures in the analyzer. Specify a list of temperatures if you want to plot only some. output: with 'average' you get an aver...
pymatgen/electronic_structure/plotter.py
def plot_zt_dop(self, temps='all', output='average', relaxation_time=1e-14): """ Plot the figure of merit zT in function of doping levels for different temperatures. Args: temps: the default 'all' plots all the temperatures in the analyzer. Specify a list ...
def plot_zt_dop(self, temps='all', output='average', relaxation_time=1e-14): """ Plot the figure of merit zT in function of doping levels for different temperatures. Args: temps: the default 'all' plots all the temperatures in the analyzer. Specify a list ...
[ "Plot", "the", "figure", "of", "merit", "zT", "in", "function", "of", "doping", "levels", "for", "different", "temperatures", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3295-L3344
[ "def", "plot_zt_dop", "(", "self", ",", "temps", "=", "'all'", ",", "output", "=", "'average'", ",", "relaxation_time", "=", "1e-14", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "if", "output", "==", "'average'", ":", "zt", "=", "self",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_dos
plot dos Args: sigma: a smearing Returns: a matplotlib object
pymatgen/electronic_structure/plotter.py
def plot_dos(self, sigma=0.05): """ plot dos Args: sigma: a smearing Returns: a matplotlib object """ plotter = DosPlotter(sigma=sigma) plotter.add_dos("t", self._bz.dos) return plotter.get_plot()
def plot_dos(self, sigma=0.05): """ plot dos Args: sigma: a smearing Returns: a matplotlib object """ plotter = DosPlotter(sigma=sigma) plotter.add_dos("t", self._bz.dos) return plotter.get_plot()
[ "plot", "dos" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3397-L3409
[ "def", "plot_dos", "(", "self", ",", "sigma", "=", "0.05", ")", ":", "plotter", "=", "DosPlotter", "(", "sigma", "=", "sigma", ")", "plotter", ".", "add_dos", "(", "\"t\"", ",", "self", ".", "_bz", ".", "dos", ")", "return", "plotter", ".", "get_plot...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_carriers
Plot the carrier concentration in function of Fermi level Args: temp: the temperature Returns: a matplotlib object
pymatgen/electronic_structure/plotter.py
def plot_carriers(self, temp=300): """ Plot the carrier concentration in function of Fermi level Args: temp: the temperature Returns: a matplotlib object """ import matplotlib.pyplot as plt plt.semilogy(self._bz.mu_steps, ...
def plot_carriers(self, temp=300): """ Plot the carrier concentration in function of Fermi level Args: temp: the temperature Returns: a matplotlib object """ import matplotlib.pyplot as plt plt.semilogy(self._bz.mu_steps, ...
[ "Plot", "the", "carrier", "concentration", "in", "function", "of", "Fermi", "level" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3411-L3433
[ "def", "plot_carriers", "(", "self", ",", "temp", "=", "300", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "plt", ".", "semilogy", "(", "self", ".", "_bz", ".", "mu_steps", ",", "abs", "(", "self", ".", "_bz", ".", "_carrier_conc", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
BoltztrapPlotter.plot_hall_carriers
Plot the Hall carrier concentration in function of Fermi level Args: temp: the temperature Returns: a matplotlib object
pymatgen/electronic_structure/plotter.py
def plot_hall_carriers(self, temp=300): """ Plot the Hall carrier concentration in function of Fermi level Args: temp: the temperature Returns: a matplotlib object """ import matplotlib.pyplot as plt hall_carriers = [abs(i) for i in ...
def plot_hall_carriers(self, temp=300): """ Plot the Hall carrier concentration in function of Fermi level Args: temp: the temperature Returns: a matplotlib object """ import matplotlib.pyplot as plt hall_carriers = [abs(i) for i in ...
[ "Plot", "the", "Hall", "carrier", "concentration", "in", "function", "of", "Fermi", "level" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3435-L3459
[ "def", "plot_hall_carriers", "(", "self", ",", "temp", "=", "300", ")", ":", "import", "matplotlib", ".", "pyplot", "as", "plt", "hall_carriers", "=", "[", "abs", "(", "i", ")", "for", "i", "in", "self", ".", "_bz", ".", "get_hall_carrier_concentration", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CohpPlotter.add_cohp
Adds a COHP for plotting. Args: label: Label for the COHP. Must be unique. cohp: COHP object.
pymatgen/electronic_structure/plotter.py
def add_cohp(self, label, cohp): """ Adds a COHP for plotting. Args: label: Label for the COHP. Must be unique. cohp: COHP object. """ energies = cohp.energies - cohp.efermi if self.zero_at_efermi \ else cohp.energies populations = co...
def add_cohp(self, label, cohp): """ Adds a COHP for plotting. Args: label: Label for the COHP. Must be unique. cohp: COHP object. """ energies = cohp.energies - cohp.efermi if self.zero_at_efermi \ else cohp.energies populations = co...
[ "Adds", "a", "COHP", "for", "plotting", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3481-L3495
[ "def", "add_cohp", "(", "self", ",", "label", ",", "cohp", ")", ":", "energies", "=", "cohp", ".", "energies", "-", "cohp", ".", "efermi", "if", "self", ".", "zero_at_efermi", "else", "cohp", ".", "energies", "populations", "=", "cohp", ".", "get_cohp", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CohpPlotter.add_cohp_dict
Adds a dictionary of COHPs with an optional sorting function for the keys. Args: cohp_dict: dict of the form {label: Cohp} key_sort_func: function used to sort the cohp_dict keys.
pymatgen/electronic_structure/plotter.py
def add_cohp_dict(self, cohp_dict, key_sort_func=None): """ Adds a dictionary of COHPs with an optional sorting function for the keys. Args: cohp_dict: dict of the form {label: Cohp} key_sort_func: function used to sort the cohp_dict keys. """ if...
def add_cohp_dict(self, cohp_dict, key_sort_func=None): """ Adds a dictionary of COHPs with an optional sorting function for the keys. Args: cohp_dict: dict of the form {label: Cohp} key_sort_func: function used to sort the cohp_dict keys. """ if...
[ "Adds", "a", "dictionary", "of", "COHPs", "with", "an", "optional", "sorting", "function", "for", "the", "keys", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3497-L3512
[ "def", "add_cohp_dict", "(", "self", ",", "cohp_dict", ",", "key_sort_func", "=", "None", ")", ":", "if", "key_sort_func", ":", "keys", "=", "sorted", "(", "cohp_dict", ".", "keys", "(", ")", ",", "key", "=", "key_sort_func", ")", "else", ":", "keys", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CohpPlotter.get_plot
Get a matplotlib plot showing the COHP. Args: xlim: Specifies the x-axis limits. Defaults to None for automatic determination. ylim: Specifies the y-axis limits. Defaults to None for automatic determination. plot_negative: It is common to pl...
pymatgen/electronic_structure/plotter.py
def get_plot(self, xlim=None, ylim=None, plot_negative=None, integrated=False, invert_axes=True): """ Get a matplotlib plot showing the COHP. Args: xlim: Specifies the x-axis limits. Defaults to None for automatic determination. ylim: Sp...
def get_plot(self, xlim=None, ylim=None, plot_negative=None, integrated=False, invert_axes=True): """ Get a matplotlib plot showing the COHP. Args: xlim: Specifies the x-axis limits. Defaults to None for automatic determination. ylim: Sp...
[ "Get", "a", "matplotlib", "plot", "showing", "the", "COHP", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/electronic_structure/plotter.py#L3526-L3647
[ "def", "get_plot", "(", "self", ",", "xlim", "=", "None", ",", "ylim", "=", "None", ",", "plot_negative", "=", "None", ",", "integrated", "=", "False", ",", "invert_axes", "=", "True", ")", ":", "if", "self", ".", "are_coops", ":", "cohp_label", "=", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_dopants_from_substitution_probabilities
Get dopant suggestions based on substitution probabilities. Args: structure (Structure): A pymatgen structure decorated with oxidation states. num_dopants (int): The number of suggestions to return for n- and p-type dopants. threshold (float): Probability threshold f...
pymatgen/analysis/structure_prediction/dopant_predictor.py
def get_dopants_from_substitution_probabilities(structure, num_dopants=5, threshold=0.001, match_oxi_sign=False): """ Get dopant suggestions based on substitution probabilities. Args: structure (Structur...
def get_dopants_from_substitution_probabilities(structure, num_dopants=5, threshold=0.001, match_oxi_sign=False): """ Get dopant suggestions based on substitution probabilities. Args: structure (Structur...
[ "Get", "dopant", "suggestions", "based", "on", "substitution", "probabilities", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_prediction/dopant_predictor.py#L10-L51
[ "def", "get_dopants_from_substitution_probabilities", "(", "structure", ",", "num_dopants", "=", "5", ",", "threshold", "=", "0.001", ",", "match_oxi_sign", "=", "False", ")", ":", "els_have_oxi_states", "=", "[", "hasattr", "(", "s", ",", "\"oxi_state\"", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_dopants_from_shannon_radii
Get dopant suggestions based on Shannon radii differences. Args: bonded_structure (StructureGraph): A pymatgen structure graph decorated with oxidation states. For example, generated using the CrystalNN.get_bonded_structure() method. num_dopants (int): The nummber of suggest...
pymatgen/analysis/structure_prediction/dopant_predictor.py
def get_dopants_from_shannon_radii(bonded_structure, num_dopants=5, match_oxi_sign=False): """ Get dopant suggestions based on Shannon radii differences. Args: bonded_structure (StructureGraph): A pymatgen structure graph decorated with oxidation state...
def get_dopants_from_shannon_radii(bonded_structure, num_dopants=5, match_oxi_sign=False): """ Get dopant suggestions based on Shannon radii differences. Args: bonded_structure (StructureGraph): A pymatgen structure graph decorated with oxidation state...
[ "Get", "dopant", "suggestions", "based", "on", "Shannon", "radii", "differences", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_prediction/dopant_predictor.py#L54-L114
[ "def", "get_dopants_from_shannon_radii", "(", "bonded_structure", ",", "num_dopants", "=", "5", ",", "match_oxi_sign", "=", "False", ")", ":", "# get a list of all Specie for all elements in all their common oxid states", "all_species", "=", "[", "Specie", "(", "el", ",", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
_get_dopants
Utility method to get n- and p-type dopants from a list of substitutions.
pymatgen/analysis/structure_prediction/dopant_predictor.py
def _get_dopants(substitutions, num_dopants, match_oxi_sign): """ Utility method to get n- and p-type dopants from a list of substitutions. """ n_type = [pred for pred in substitutions if pred['dopant_species'].oxi_state > pred['original_species'].oxi_state and ...
def _get_dopants(substitutions, num_dopants, match_oxi_sign): """ Utility method to get n- and p-type dopants from a list of substitutions. """ n_type = [pred for pred in substitutions if pred['dopant_species'].oxi_state > pred['original_species'].oxi_state and ...
[ "Utility", "method", "to", "get", "n", "-", "and", "p", "-", "type", "dopants", "from", "a", "list", "of", "substitutions", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_prediction/dopant_predictor.py#L117-L134
[ "def", "_get_dopants", "(", "substitutions", ",", "num_dopants", ",", "match_oxi_sign", ")", ":", "n_type", "=", "[", "pred", "for", "pred", "in", "substitutions", "if", "pred", "[", "'dopant_species'", "]", ".", "oxi_state", ">", "pred", "[", "'original_speci...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
_shannon_radii_from_cn
Utility func to get Shannon radii for a particular coordination number. As the Shannon radii depends on charge state and coordination number, species without an entry for a particular coordination number will be skipped. Args: species_list (list): A list of Species to get the Shannon radii for...
pymatgen/analysis/structure_prediction/dopant_predictor.py
def _shannon_radii_from_cn(species_list, cn_roman, radius_to_compare=0): """ Utility func to get Shannon radii for a particular coordination number. As the Shannon radii depends on charge state and coordination number, species without an entry for a particular coordination number will be skipped. ...
def _shannon_radii_from_cn(species_list, cn_roman, radius_to_compare=0): """ Utility func to get Shannon radii for a particular coordination number. As the Shannon radii depends on charge state and coordination number, species without an entry for a particular coordination number will be skipped. ...
[ "Utility", "func", "to", "get", "Shannon", "radii", "for", "a", "particular", "coordination", "number", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_prediction/dopant_predictor.py#L137-L173
[ "def", "_shannon_radii_from_cn", "(", "species_list", ",", "cn_roman", ",", "radius_to_compare", "=", "0", ")", ":", "shannon_radii", "=", "[", "]", "for", "s", "in", "species_list", ":", "try", ":", "radius", "=", "s", ".", "get_shannon_radius", "(", "cn_ro...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
_int_to_roman
Utility method to convert an int (less than 20) to a roman numeral.
pymatgen/analysis/structure_prediction/dopant_predictor.py
def _int_to_roman(number): """Utility method to convert an int (less than 20) to a roman numeral.""" roman_conv = [(10, "X"), (9, "IX"), (5, "V"), (4, "IV"), (1, "I")] result = [] for (arabic, roman) in roman_conv: (factor, number) = divmod(number, arabic) result.append(roman * factor) ...
def _int_to_roman(number): """Utility method to convert an int (less than 20) to a roman numeral.""" roman_conv = [(10, "X"), (9, "IX"), (5, "V"), (4, "IV"), (1, "I")] result = [] for (arabic, roman) in roman_conv: (factor, number) = divmod(number, arabic) result.append(roman * factor) ...
[ "Utility", "method", "to", "convert", "an", "int", "(", "less", "than", "20", ")", "to", "a", "roman", "numeral", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/structure_prediction/dopant_predictor.py#L176-L186
[ "def", "_int_to_roman", "(", "number", ")", ":", "roman_conv", "=", "[", "(", "10", ",", "\"X\"", ")", ",", "(", "9", ",", "\"IX\"", ")", ",", "(", "5", ",", "\"V\"", ")", ",", "(", "4", ",", "\"IV\"", ")", ",", "(", "1", ",", "\"I\"", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
solid_angle
Helper method to calculate the solid angle of a set of coords from the center. Args: center (3x1 array): Center to measure solid angle from. coords (Nx3 array): List of coords to determine solid angle. Returns: The solid angle.
pymatgen/analysis/local_env.py
def solid_angle(center, coords): """ Helper method to calculate the solid angle of a set of coords from the center. Args: center (3x1 array): Center to measure solid angle from. coords (Nx3 array): List of coords to determine solid angle. Returns: The solid angle. """ ...
def solid_angle(center, coords): """ Helper method to calculate the solid angle of a set of coords from the center. Args: center (3x1 array): Center to measure solid angle from. coords (Nx3 array): List of coords to determine solid angle. Returns: The solid angle. """ ...
[ "Helper", "method", "to", "calculate", "the", "solid", "angle", "of", "a", "set", "of", "coords", "from", "the", "center", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1553-L1588
[ "def", "solid_angle", "(", "center", ",", "coords", ")", ":", "# Compute the displacement from the center", "r", "=", "[", "np", ".", "subtract", "(", "c", ",", "center", ")", "for", "c", "in", "coords", "]", "# Compute the magnitude of each vector", "r_norm", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
vol_tetra
Calculate the volume of a tetrahedron, given the four vertices of vt1, vt2, vt3 and vt4. Args: vt1 (array-like): coordinates of vertex 1. vt2 (array-like): coordinates of vertex 2. vt3 (array-like): coordinates of vertex 3. vt4 (array-like): coordinates of vertex 4. Returns: ...
pymatgen/analysis/local_env.py
def vol_tetra(vt1, vt2, vt3, vt4): """ Calculate the volume of a tetrahedron, given the four vertices of vt1, vt2, vt3 and vt4. Args: vt1 (array-like): coordinates of vertex 1. vt2 (array-like): coordinates of vertex 2. vt3 (array-like): coordinates of vertex 3. vt4 (arra...
def vol_tetra(vt1, vt2, vt3, vt4): """ Calculate the volume of a tetrahedron, given the four vertices of vt1, vt2, vt3 and vt4. Args: vt1 (array-like): coordinates of vertex 1. vt2 (array-like): coordinates of vertex 2. vt3 (array-like): coordinates of vertex 3. vt4 (arra...
[ "Calculate", "the", "volume", "of", "a", "tetrahedron", "given", "the", "four", "vertices", "of", "vt1", "vt2", "vt3", "and", "vt4", ".", "Args", ":", "vt1", "(", "array", "-", "like", ")", ":", "coordinates", "of", "vertex", "1", ".", "vt2", "(", "a...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1591-L1605
[ "def", "vol_tetra", "(", "vt1", ",", "vt2", ",", "vt3", ",", "vt4", ")", ":", "vol_tetra", "=", "np", ".", "abs", "(", "np", ".", "dot", "(", "(", "vt1", "-", "vt4", ")", ",", "np", ".", "cross", "(", "(", "vt2", "-", "vt4", ")", ",", "(", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_okeeffe_params
Returns the elemental parameters related to atom size and electronegativity which are used for estimating bond-valence parameters (bond length) of pairs of atoms on the basis of data provided in 'Atoms Sizes and Bond Lengths in Molecules and Crystals' (O'Keeffe & Brese, 1991). Args: el_symb...
pymatgen/analysis/local_env.py
def get_okeeffe_params(el_symbol): """ Returns the elemental parameters related to atom size and electronegativity which are used for estimating bond-valence parameters (bond length) of pairs of atoms on the basis of data provided in 'Atoms Sizes and Bond Lengths in Molecules and Crystals' (O'Ke...
def get_okeeffe_params(el_symbol): """ Returns the elemental parameters related to atom size and electronegativity which are used for estimating bond-valence parameters (bond length) of pairs of atoms on the basis of data provided in 'Atoms Sizes and Bond Lengths in Molecules and Crystals' (O'Ke...
[ "Returns", "the", "elemental", "parameters", "related", "to", "atom", "size", "and", "electronegativity", "which", "are", "used", "for", "estimating", "bond", "-", "valence", "parameters", "(", "bond", "length", ")", "of", "pairs", "of", "atoms", "on", "the", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1608-L1629
[ "def", "get_okeeffe_params", "(", "el_symbol", ")", ":", "el", "=", "Element", "(", "el_symbol", ")", "if", "el", "not", "in", "list", "(", "BV_PARAMS", ".", "keys", "(", ")", ")", ":", "raise", "RuntimeError", "(", "\"Could not find O'Keeffe parameters for el...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_okeeffe_distance_prediction
Returns an estimate of the bond valence parameter (bond length) using the derived parameters from 'Atoms Sizes and Bond Lengths in Molecules and Crystals' (O'Keeffe & Brese, 1991). The estimate is based on two experimental parameters: r and c. The value for r is based off radius, while c is (usually) t...
pymatgen/analysis/local_env.py
def get_okeeffe_distance_prediction(el1, el2): """ Returns an estimate of the bond valence parameter (bond length) using the derived parameters from 'Atoms Sizes and Bond Lengths in Molecules and Crystals' (O'Keeffe & Brese, 1991). The estimate is based on two experimental parameters: r and c. The v...
def get_okeeffe_distance_prediction(el1, el2): """ Returns an estimate of the bond valence parameter (bond length) using the derived parameters from 'Atoms Sizes and Bond Lengths in Molecules and Crystals' (O'Keeffe & Brese, 1991). The estimate is based on two experimental parameters: r and c. The v...
[ "Returns", "an", "estimate", "of", "the", "bond", "valence", "parameter", "(", "bond", "length", ")", "using", "the", "derived", "parameters", "from", "Atoms", "Sizes", "and", "Bond", "Lengths", "in", "Molecules", "and", "Crystals", "(", "O", "Keeffe", "&", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1632-L1656
[ "def", "get_okeeffe_distance_prediction", "(", "el1", ",", "el2", ")", ":", "el1_okeeffe_params", "=", "get_okeeffe_params", "(", "el1", ")", "el2_okeeffe_params", "=", "get_okeeffe_params", "(", "el2", ")", "r1", "=", "el1_okeeffe_params", "[", "'r'", "]", "r2", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_neighbors_of_site_with_index
Returns the neighbors of a given site using a specific neighbor-finding method. Args: struct (Structure): input structure. n (int): index of site in Structure object for which motif type is to be determined. approach (str): type of neighbor-finding approach, where ...
pymatgen/analysis/local_env.py
def get_neighbors_of_site_with_index(struct, n, approach="min_dist", delta=0.1, \ cutoff=10.0): """ Returns the neighbors of a given site using a specific neighbor-finding method. Args: struct (Structure): input structure. n (int): index of site in S...
def get_neighbors_of_site_with_index(struct, n, approach="min_dist", delta=0.1, \ cutoff=10.0): """ Returns the neighbors of a given site using a specific neighbor-finding method. Args: struct (Structure): input structure. n (int): index of site in S...
[ "Returns", "the", "neighbors", "of", "a", "given", "site", "using", "a", "specific", "neighbor", "-", "finding", "method", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1659-L1693
[ "def", "get_neighbors_of_site_with_index", "(", "struct", ",", "n", ",", "approach", "=", "\"min_dist\"", ",", "delta", "=", "0.1", ",", "cutoff", "=", "10.0", ")", ":", "if", "approach", "==", "\"min_dist\"", ":", "return", "MinimumDistanceNN", "(", "tol", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
site_is_of_motif_type
Returns the motif type of the site with index n in structure struct; currently featuring "tetrahedral", "octahedral", "bcc", and "cp" (close-packed: fcc and hcp) as well as "square pyramidal" and "trigonal bipyramidal". If the site is not recognized, "unrecognized" is returned. If a site should be ass...
pymatgen/analysis/local_env.py
def site_is_of_motif_type(struct, n, approach="min_dist", delta=0.1, \ cutoff=10.0, thresh=None): """ Returns the motif type of the site with index n in structure struct; currently featuring "tetrahedral", "octahedral", "bcc", and "cp" (close-packed: fcc and hcp) as well as "sq...
def site_is_of_motif_type(struct, n, approach="min_dist", delta=0.1, \ cutoff=10.0, thresh=None): """ Returns the motif type of the site with index n in structure struct; currently featuring "tetrahedral", "octahedral", "bcc", and "cp" (close-packed: fcc and hcp) as well as "sq...
[ "Returns", "the", "motif", "type", "of", "the", "site", "with", "index", "n", "in", "structure", "struct", ";", "currently", "featuring", "tetrahedral", "octahedral", "bcc", "and", "cp", "(", "close", "-", "packed", ":", "fcc", "and", "hcp", ")", "as", "...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1696-L1764
[ "def", "site_is_of_motif_type", "(", "struct", ",", "n", ",", "approach", "=", "\"min_dist\"", ",", "delta", "=", "0.1", ",", "cutoff", "=", "10.0", ",", "thresh", "=", "None", ")", ":", "if", "thresh", "is", "None", ":", "thresh", "=", "{", "\"qtet\""...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
gramschmidt
Returns that part of the first input vector that is orthogonal to the second input vector. The output vector is not normalized. Args: vin (numpy array): first input vector uin (numpy array): second input vector
pymatgen/analysis/local_env.py
def gramschmidt(vin, uin): """ Returns that part of the first input vector that is orthogonal to the second input vector. The output vector is not normalized. Args: vin (numpy array): first input vector uin (numpy array): second input vector """ vin_...
def gramschmidt(vin, uin): """ Returns that part of the first input vector that is orthogonal to the second input vector. The output vector is not normalized. Args: vin (numpy array): first input vector uin (numpy array): second input vector """ vin_...
[ "Returns", "that", "part", "of", "the", "first", "input", "vector", "that", "is", "orthogonal", "to", "the", "second", "input", "vector", ".", "The", "output", "vector", "is", "not", "normalized", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1767-L1784
[ "def", "gramschmidt", "(", "vin", ",", "uin", ")", ":", "vin_uin", "=", "np", ".", "inner", "(", "vin", ",", "uin", ")", "uin_uin", "=", "np", ".", "inner", "(", "uin", ",", "uin", ")", "if", "uin_uin", "<=", "0.0", ":", "raise", "ValueError", "(...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
calculate_weighted_avg
Returns the weighted average bond length given by Hoppe's effective coordination number formula. Args: bonds (list): list of floats that are the bond distances between a cation and its peripheral ions
pymatgen/analysis/local_env.py
def calculate_weighted_avg(bonds): """ Returns the weighted average bond length given by Hoppe's effective coordination number formula. Args: bonds (list): list of floats that are the bond distances between a cation and its peripheral ions """ minimum_bond = min(bonds) ...
def calculate_weighted_avg(bonds): """ Returns the weighted average bond length given by Hoppe's effective coordination number formula. Args: bonds (list): list of floats that are the bond distances between a cation and its peripheral ions """ minimum_bond = min(bonds) ...
[ "Returns", "the", "weighted", "average", "bond", "length", "given", "by", "Hoppe", "s", "effective", "coordination", "number", "formula", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3573-L3589
[ "def", "calculate_weighted_avg", "(", "bonds", ")", ":", "minimum_bond", "=", "min", "(", "bonds", ")", "weighted_sum", "=", "0.0", "total_sum", "=", "0.0", "for", "entry", "in", "bonds", ":", "weighted_sum", "+=", "entry", "*", "exp", "(", "1", "-", "("...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ValenceIonicRadiusEvaluator.radii
List of ionic radii of elements in the order of sites.
pymatgen/analysis/local_env.py
def radii(self): """ List of ionic radii of elements in the order of sites. """ el = [site.species_string for site in self._structure.sites] radii_dict = dict(zip(el, self._ionic_radii)) # print radii_dict return radii_dict
def radii(self): """ List of ionic radii of elements in the order of sites. """ el = [site.species_string for site in self._structure.sites] radii_dict = dict(zip(el, self._ionic_radii)) # print radii_dict return radii_dict
[ "List", "of", "ionic", "radii", "of", "elements", "in", "the", "order", "of", "sites", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L81-L88
[ "def", "radii", "(", "self", ")", ":", "el", "=", "[", "site", ".", "species_string", "for", "site", "in", "self", ".", "_structure", ".", "sites", "]", "radii_dict", "=", "dict", "(", "zip", "(", "el", ",", "self", ".", "_ionic_radii", ")", ")", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ValenceIonicRadiusEvaluator.valences
List of oxidation states of elements in the order of sites.
pymatgen/analysis/local_env.py
def valences(self): """ List of oxidation states of elements in the order of sites. """ el = [site.species_string for site in self._structure.sites] valence_dict = dict(zip(el, self._valences)) return valence_dict
def valences(self): """ List of oxidation states of elements in the order of sites. """ el = [site.species_string for site in self._structure.sites] valence_dict = dict(zip(el, self._valences)) return valence_dict
[ "List", "of", "oxidation", "states", "of", "elements", "in", "the", "order", "of", "sites", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L91-L97
[ "def", "valences", "(", "self", ")", ":", "el", "=", "[", "site", ".", "species_string", "for", "site", "in", "self", ".", "_structure", ".", "sites", "]", "valence_dict", "=", "dict", "(", "zip", "(", "el", ",", "self", ".", "_valences", ")", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ValenceIonicRadiusEvaluator._get_ionic_radii
Computes ionic radii of elements for all sites in the structure. If valence is zero, atomic radius is used.
pymatgen/analysis/local_env.py
def _get_ionic_radii(self): """ Computes ionic radii of elements for all sites in the structure. If valence is zero, atomic radius is used. """ radii = [] vnn = VoronoiNN() def nearest_key(sorted_vals, key): i = bisect_left(sorted_vals, key) ...
def _get_ionic_radii(self): """ Computes ionic radii of elements for all sites in the structure. If valence is zero, atomic radius is used. """ radii = [] vnn = VoronoiNN() def nearest_key(sorted_vals, key): i = bisect_left(sorted_vals, key) ...
[ "Computes", "ionic", "radii", "of", "elements", "for", "all", "sites", "in", "the", "structure", ".", "If", "valence", "is", "zero", "atomic", "radius", "is", "used", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L106-L181
[ "def", "_get_ionic_radii", "(", "self", ")", ":", "radii", "=", "[", "]", "vnn", "=", "VoronoiNN", "(", ")", "def", "nearest_key", "(", "sorted_vals", ",", "key", ")", ":", "i", "=", "bisect_left", "(", "sorted_vals", ",", "key", ")", "if", "i", "=="...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ValenceIonicRadiusEvaluator._get_valences
Computes ionic valences of elements for all sites in the structure.
pymatgen/analysis/local_env.py
def _get_valences(self): """ Computes ionic valences of elements for all sites in the structure. """ try: bv = BVAnalyzer() self._structure = bv.get_oxi_state_decorated_structure( self._structure) valences = bv.get_valences(self._struct...
def _get_valences(self): """ Computes ionic valences of elements for all sites in the structure. """ try: bv = BVAnalyzer() self._structure = bv.get_oxi_state_decorated_structure( self._structure) valences = bv.get_valences(self._struct...
[ "Computes", "ionic", "valences", "of", "elements", "for", "all", "sites", "in", "the", "structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L183-L218
[ "def", "_get_valences", "(", "self", ")", ":", "try", ":", "bv", "=", "BVAnalyzer", "(", ")", "self", ".", "_structure", "=", "bv", ".", "get_oxi_state_decorated_structure", "(", "self", ".", "_structure", ")", "valences", "=", "bv", ".", "get_valences", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_cn
Get coordination number, CN, of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating whether (True) to use weights for computing the coordina...
pymatgen/analysis/local_env.py
def get_cn(self, structure, n, use_weights=False): """ Get coordination number, CN, of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating w...
def get_cn(self, structure, n, use_weights=False): """ Get coordination number, CN, of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating w...
[ "Get", "coordination", "number", "CN", "of", "site", "with", "index", "n", "in", "structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L235-L251
[ "def", "get_cn", "(", "self", ",", "structure", ",", "n", ",", "use_weights", "=", "False", ")", ":", "siw", "=", "self", ".", "get_nn_info", "(", "structure", ",", "n", ")", "return", "sum", "(", "[", "e", "[", "'weight'", "]", "for", "e", "in", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_cn_dict
Get coordination number, CN, of each element bonded to site with index n in structure Args: structure (Structure): input structure n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating whether (True) to use weights for c...
pymatgen/analysis/local_env.py
def get_cn_dict(self, structure, n, use_weights=False): """ Get coordination number, CN, of each element bonded to site with index n in structure Args: structure (Structure): input structure n (integer): index of site for which to determine CN. use_weights (b...
def get_cn_dict(self, structure, n, use_weights=False): """ Get coordination number, CN, of each element bonded to site with index n in structure Args: structure (Structure): input structure n (integer): index of site for which to determine CN. use_weights (b...
[ "Get", "coordination", "number", "CN", "of", "each", "element", "bonded", "to", "site", "with", "index", "n", "in", "structure" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L253-L284
[ "def", "get_cn_dict", "(", "self", ",", "structure", ",", "n", ",", "use_weights", "=", "False", ")", ":", "siw", "=", "self", ".", "get_nn_info", "(", "structure", ",", "n", ")", "cn_dict", "=", "{", "}", "for", "i", "in", "siw", ":", "site_element"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_nn
Get near neighbors of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site in structure for which to determine neighbors. Returns: sites (list of Site objects): near neighbors.
pymatgen/analysis/local_env.py
def get_nn(self, structure, n): """ Get near neighbors of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site in structure for which to determine neighbors. Returns: sites (list ...
def get_nn(self, structure, n): """ Get near neighbors of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site in structure for which to determine neighbors. Returns: sites (list ...
[ "Get", "near", "neighbors", "of", "site", "with", "index", "n", "in", "structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L286-L298
[ "def", "get_nn", "(", "self", ",", "structure", ",", "n", ")", ":", "return", "[", "e", "[", "'site'", "]", "for", "e", "in", "self", ".", "get_nn_info", "(", "structure", ",", "n", ")", "]" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_weights_of_nn_sites
Get weight associated with each near neighbor of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine the weights. Returns: weights (list of floats): near-neighbor weights.
pymatgen/analysis/local_env.py
def get_weights_of_nn_sites(self, structure, n): """ Get weight associated with each near neighbor of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine the weights. Returns: ...
def get_weights_of_nn_sites(self, structure, n): """ Get weight associated with each near neighbor of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine the weights. Returns: ...
[ "Get", "weight", "associated", "with", "each", "near", "neighbor", "of", "site", "with", "index", "n", "in", "structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L300-L312
[ "def", "get_weights_of_nn_sites", "(", "self", ",", "structure", ",", "n", ")", ":", "return", "[", "e", "[", "'weight'", "]", "for", "e", "in", "self", ".", "get_nn_info", "(", "structure", ",", "n", ")", "]" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_nn_images
Get image location of all near neighbors of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine the image location of near neighbors. Returns: images (list of 3D integ...
pymatgen/analysis/local_env.py
def get_nn_images(self, structure, n): """ Get image location of all near neighbors of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine the image location of near neigh...
def get_nn_images(self, structure, n): """ Get image location of all near neighbors of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine the image location of near neigh...
[ "Get", "image", "location", "of", "all", "near", "neighbors", "of", "site", "with", "index", "n", "in", "structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L314-L328
[ "def", "get_nn_images", "(", "self", ",", "structure", ",", "n", ")", ":", "return", "[", "e", "[", "'image'", "]", "for", "e", "in", "self", ".", "get_nn_info", "(", "structure", ",", "n", ")", "]" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_all_nn_info
Get a listing of all neighbors for all sites in a structure Args: structure (Structure): Input structure Return: List of NN site information for each site in the structure. Each entry has the same format as `get_nn_info`
pymatgen/analysis/local_env.py
def get_all_nn_info(self, structure): """Get a listing of all neighbors for all sites in a structure Args: structure (Structure): Input structure Return: List of NN site information for each site in the structure. Each entry has the same format as `get_nn...
def get_all_nn_info(self, structure): """Get a listing of all neighbors for all sites in a structure Args: structure (Structure): Input structure Return: List of NN site information for each site in the structure. Each entry has the same format as `get_nn...
[ "Get", "a", "listing", "of", "all", "neighbors", "for", "all", "sites", "in", "a", "structure" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L354-L364
[ "def", "get_all_nn_info", "(", "self", ",", "structure", ")", ":", "return", "[", "self", ".", "get_nn_info", "(", "structure", ",", "n", ")", "for", "n", "in", "range", "(", "len", "(", "structure", ")", ")", "]" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_nn_shell_info
Get a certain nearest neighbor shell for a certain site. Determines all non-backtracking paths through the neighbor network computed by `get_nn_info`. The weight is determined by multiplying the weight of the neighbor at each hop through the network. For example, a 2nd-nearest-neighbor ...
pymatgen/analysis/local_env.py
def get_nn_shell_info(self, structure, site_idx, shell): """Get a certain nearest neighbor shell for a certain site. Determines all non-backtracking paths through the neighbor network computed by `get_nn_info`. The weight is determined by multiplying the weight of the neighbor at each h...
def get_nn_shell_info(self, structure, site_idx, shell): """Get a certain nearest neighbor shell for a certain site. Determines all non-backtracking paths through the neighbor network computed by `get_nn_info`. The weight is determined by multiplying the weight of the neighbor at each h...
[ "Get", "a", "certain", "nearest", "neighbor", "shell", "for", "a", "certain", "site", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L366-L407
[ "def", "get_nn_shell_info", "(", "self", ",", "structure", ",", "site_idx", ",", "shell", ")", ":", "all_nn_info", "=", "self", ".", "get_all_nn_info", "(", "structure", ")", "sites", "=", "self", ".", "_get_nn_shell_info", "(", "structure", ",", "all_nn_info"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors._get_nn_shell_info
Private method for computing the neighbor shell information Args: structure (Structure) - Structure being assessed all_nn_info ([[dict]]) - Results from `get_all_nn_info` site_idx (int) - index of site for which to determine neighbor information. ...
pymatgen/analysis/local_env.py
def _get_nn_shell_info(self, structure, all_nn_info, site_idx, shell, _previous_steps=frozenset(), _cur_image=(0, 0, 0)): """Private method for computing the neighbor shell information Args: structure (Structure) - Structure being assessed all_nn_info ...
def _get_nn_shell_info(self, structure, all_nn_info, site_idx, shell, _previous_steps=frozenset(), _cur_image=(0, 0, 0)): """Private method for computing the neighbor shell information Args: structure (Structure) - Structure being assessed all_nn_info ...
[ "Private", "method", "for", "computing", "the", "neighbor", "shell", "information" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L409-L484
[ "def", "_get_nn_shell_info", "(", "self", ",", "structure", ",", "all_nn_info", ",", "site_idx", ",", "shell", ",", "_previous_steps", "=", "frozenset", "(", ")", ",", "_cur_image", "=", "(", "0", ",", "0", ",", "0", ")", ")", ":", "if", "shell", "<=",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors._get_image
Private convenience method for get_nn_info, gives lattice image from provided PeriodicSite and Structure. Image is defined as displacement from original site in structure to a given site. i.e. if structure has a site at (-0.1, 1.0, 0.3), then (0.9, 0, 2.3) -> jimage = (1, -1, 2). Note t...
pymatgen/analysis/local_env.py
def _get_image(structure, site): """Private convenience method for get_nn_info, gives lattice image from provided PeriodicSite and Structure. Image is defined as displacement from original site in structure to a given site. i.e. if structure has a site at (-0.1, 1.0, 0.3), then (0.9, 0,...
def _get_image(structure, site): """Private convenience method for get_nn_info, gives lattice image from provided PeriodicSite and Structure. Image is defined as displacement from original site in structure to a given site. i.e. if structure has a site at (-0.1, 1.0, 0.3), then (0.9, 0,...
[ "Private", "convenience", "method", "for", "get_nn_info", "gives", "lattice", "image", "from", "provided", "PeriodicSite", "and", "Structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L487-L507
[ "def", "_get_image", "(", "structure", ",", "site", ")", ":", "original_site", "=", "structure", "[", "NearNeighbors", ".", "_get_original_site", "(", "structure", ",", "site", ")", "]", "image", "=", "np", ".", "around", "(", "np", ".", "subtract", "(", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors._get_original_site
Private convenience method for get_nn_info, gives original site index from ProvidedPeriodicSite.
pymatgen/analysis/local_env.py
def _get_original_site(structure, site): """Private convenience method for get_nn_info, gives original site index from ProvidedPeriodicSite.""" for i, s in enumerate(structure): if site.is_periodic_image(s): return i raise Exception('Site not found!')
def _get_original_site(structure, site): """Private convenience method for get_nn_info, gives original site index from ProvidedPeriodicSite.""" for i, s in enumerate(structure): if site.is_periodic_image(s): return i raise Exception('Site not found!')
[ "Private", "convenience", "method", "for", "get_nn_info", "gives", "original", "site", "index", "from", "ProvidedPeriodicSite", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L510-L516
[ "def", "_get_original_site", "(", "structure", ",", "site", ")", ":", "for", "i", ",", "s", "in", "enumerate", "(", "structure", ")", ":", "if", "site", ".", "is_periodic_image", "(", "s", ")", ":", "return", "i", "raise", "Exception", "(", "'Site not fo...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_bonded_structure
Obtain a StructureGraph object using this NearNeighbor class. Requires the optional dependency networkx (pip install networkx). Args: structure: Structure object. decorate (bool): whether to annotate site properties with order parameters using neighbors deter...
pymatgen/analysis/local_env.py
def get_bonded_structure(self, structure, decorate=False): """ Obtain a StructureGraph object using this NearNeighbor class. Requires the optional dependency networkx (pip install networkx). Args: structure: Structure object. decorate (bool): whether to a...
def get_bonded_structure(self, structure, decorate=False): """ Obtain a StructureGraph object using this NearNeighbor class. Requires the optional dependency networkx (pip install networkx). Args: structure: Structure object. decorate (bool): whether to a...
[ "Obtain", "a", "StructureGraph", "object", "using", "this", "NearNeighbor", "class", ".", "Requires", "the", "optional", "dependency", "networkx", "(", "pip", "install", "networkx", ")", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L518-L547
[ "def", "get_bonded_structure", "(", "self", ",", "structure", ",", "decorate", "=", "False", ")", ":", "# requires optional dependency which is why it's not a top-level import", "from", "pymatgen", ".", "analysis", ".", "graphs", "import", "StructureGraph", "if", "decorat...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
NearNeighbors.get_local_order_parameters
Calculate those local structure order parameters for the given site whose ideal CN corresponds to the underlying motif (e.g., CN=4, then calculate the square planar, tetrahedral, see-saw-like, rectangular see-saw-like order paramters). Args: structure: Structure obje...
pymatgen/analysis/local_env.py
def get_local_order_parameters(self, structure, n): """ Calculate those local structure order parameters for the given site whose ideal CN corresponds to the underlying motif (e.g., CN=4, then calculate the square planar, tetrahedral, see-saw-like, rectangular see-saw-lik...
def get_local_order_parameters(self, structure, n): """ Calculate those local structure order parameters for the given site whose ideal CN corresponds to the underlying motif (e.g., CN=4, then calculate the square planar, tetrahedral, see-saw-like, rectangular see-saw-lik...
[ "Calculate", "those", "local", "structure", "order", "parameters", "for", "the", "given", "site", "whose", "ideal", "CN", "corresponds", "to", "the", "underlying", "motif", "(", "e", ".", "g", ".", "CN", "=", "4", "then", "calculate", "the", "square", "pla...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L549-L587
[ "def", "get_local_order_parameters", "(", "self", ",", "structure", ",", "n", ")", ":", "# code from @nisse3000, moved here from graphs to avoid circular", "# import, also makes sense to have this as a general NN method", "cn", "=", "self", ".", "get_cn", "(", "structure", ",",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN.get_voronoi_polyhedra
Gives a weighted polyhedra around a site. See ref: A Proposed Rigorous Definition of Coordination Number, M. O'Keeffe, Acta Cryst. (1979). A35, 772-775 Args: structure (Structure): structure for which to evaluate the coordination environment. n (integer)...
pymatgen/analysis/local_env.py
def get_voronoi_polyhedra(self, structure, n): """ Gives a weighted polyhedra around a site. See ref: A Proposed Rigorous Definition of Coordination Number, M. O'Keeffe, Acta Cryst. (1979). A35, 772-775 Args: structure (Structure): structure for which to evaluate th...
def get_voronoi_polyhedra(self, structure, n): """ Gives a weighted polyhedra around a site. See ref: A Proposed Rigorous Definition of Coordination Number, M. O'Keeffe, Acta Cryst. (1979). A35, 772-775 Args: structure (Structure): structure for which to evaluate th...
[ "Gives", "a", "weighted", "polyhedra", "around", "a", "site", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L623-L691
[ "def", "get_voronoi_polyhedra", "(", "self", ",", "structure", ",", "n", ")", ":", "# Assemble the list of neighbors used in the tessellation", "# Gets all atoms within a certain radius", "if", "self", ".", "targets", "is", "None", ":", "targets", "=", "structure", ".",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN.get_all_voronoi_polyhedra
Get the Voronoi polyhedra for all site in a simulation cell Args: structure (Structure): Structure to be evaluated Returns: A dict of sites sharing a common Voronoi facet with the site n mapped to a directory containing statistics about the facet: - s...
pymatgen/analysis/local_env.py
def get_all_voronoi_polyhedra(self, structure): """Get the Voronoi polyhedra for all site in a simulation cell Args: structure (Structure): Structure to be evaluated Returns: A dict of sites sharing a common Voronoi facet with the site n mapped to a directory...
def get_all_voronoi_polyhedra(self, structure): """Get the Voronoi polyhedra for all site in a simulation cell Args: structure (Structure): Structure to be evaluated Returns: A dict of sites sharing a common Voronoi facet with the site n mapped to a directory...
[ "Get", "the", "Voronoi", "polyhedra", "for", "all", "site", "in", "a", "simulation", "cell" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L693-L760
[ "def", "get_all_voronoi_polyhedra", "(", "self", ",", "structure", ")", ":", "# Special case: For atoms with 1 site, the atom in the root image is not included", "# in the get_all_neighbors output. Rather than creating logic to add that atom", "# to the neighbor list, which requires detectin...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN._get_elements
Get the list of elements for a Site Args: site (Site): Site to assess Returns: [Element]: List of elements
pymatgen/analysis/local_env.py
def _get_elements(self, site): """ Get the list of elements for a Site Args: site (Site): Site to assess Returns: [Element]: List of elements """ try: if isinstance(site.specie, Element): return [site.specie] ...
def _get_elements(self, site): """ Get the list of elements for a Site Args: site (Site): Site to assess Returns: [Element]: List of elements """ try: if isinstance(site.specie, Element): return [site.specie] ...
[ "Get", "the", "list", "of", "elements", "for", "a", "Site" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L762-L776
[ "def", "_get_elements", "(", "self", ",", "site", ")", ":", "try", ":", "if", "isinstance", "(", "site", ".", "specie", ",", "Element", ")", ":", "return", "[", "site", ".", "specie", "]", "return", "[", "Element", "(", "site", ".", "specie", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN._is_in_targets
Test whether a site contains elements in the target list Args: site (Site): Site to assess targets ([Element]) List of elements Returns: (boolean) Whether this site contains a certain list of elements
pymatgen/analysis/local_env.py
def _is_in_targets(self, site, targets): """ Test whether a site contains elements in the target list Args: site (Site): Site to assess targets ([Element]) List of elements Returns: (boolean) Whether this site contains a certain list of elements ...
def _is_in_targets(self, site, targets): """ Test whether a site contains elements in the target list Args: site (Site): Site to assess targets ([Element]) List of elements Returns: (boolean) Whether this site contains a certain list of elements ...
[ "Test", "whether", "a", "site", "contains", "elements", "in", "the", "target", "list" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L778-L792
[ "def", "_is_in_targets", "(", "self", ",", "site", ",", "targets", ")", ":", "elems", "=", "self", ".", "_get_elements", "(", "site", ")", "for", "elem", "in", "elems", ":", "if", "elem", "not", "in", "targets", ":", "return", "False", "return", "True"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN._extract_cell_info
Get the information about a certain atom from the results of a tessellation Args: structure (Structure) - Structure being assessed site_idx (int) - Index of the atom in question sites ([Site]) - List of all sites in the tessellation targets ([Element]) - Target e...
pymatgen/analysis/local_env.py
def _extract_cell_info(self, structure, site_idx, sites, targets, voro, compute_adj_neighbors=False): """Get the information about a certain atom from the results of a tessellation Args: structure (Structure) - Structure being assessed site_idx (int) -...
def _extract_cell_info(self, structure, site_idx, sites, targets, voro, compute_adj_neighbors=False): """Get the information about a certain atom from the results of a tessellation Args: structure (Structure) - Structure being assessed site_idx (int) -...
[ "Get", "the", "information", "about", "a", "certain", "atom", "from", "the", "results", "of", "a", "tessellation" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L794-L920
[ "def", "_extract_cell_info", "(", "self", ",", "structure", ",", "site_idx", ",", "sites", ",", "targets", ",", "voro", ",", "compute_adj_neighbors", "=", "False", ")", ":", "# Get the coordinates of every vertex", "all_vertices", "=", "voro", ".", "vertices", "# ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN.get_nn_info
Get all near-neighbor sites as well as the associated image locations and weights of the site with index n in structure using Voronoi decomposition. Args: structure (Structure): input structure. n (integer): index of site for which to determine near-neighbor ...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """" Get all near-neighbor sites as well as the associated image locations and weights of the site with index n in structure using Voronoi decomposition. Args: structure (Structure): input structure. n (integer): index...
def get_nn_info(self, structure, n): """" Get all near-neighbor sites as well as the associated image locations and weights of the site with index n in structure using Voronoi decomposition. Args: structure (Structure): input structure. n (integer): index...
[ "Get", "all", "near", "-", "neighbor", "sites", "as", "well", "as", "the", "associated", "image", "locations", "and", "weights", "of", "the", "site", "with", "index", "n", "in", "structure", "using", "Voronoi", "decomposition", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L922-L943
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "# Run the tessellation", "nns", "=", "self", ".", "get_voronoi_polyhedra", "(", "structure", ",", "n", ")", "# Extract the NN info", "return", "self", ".", "_extract_nn_info", "(", "struct...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
VoronoiNN._extract_nn_info
Given Voronoi NNs, extract the NN info in the form needed by NearestNeighbors Args: structure (Structure): Structure being evaluated nns ([dicts]): Nearest neighbor information for a structure Returns: (list of tuples (Site, array, float)): See nn_info
pymatgen/analysis/local_env.py
def _extract_nn_info(self, structure, nns): """Given Voronoi NNs, extract the NN info in the form needed by NearestNeighbors Args: structure (Structure): Structure being evaluated nns ([dicts]): Nearest neighbor information for a structure Returns: (list of t...
def _extract_nn_info(self, structure, nns): """Given Voronoi NNs, extract the NN info in the form needed by NearestNeighbors Args: structure (Structure): Structure being evaluated nns ([dicts]): Nearest neighbor information for a structure Returns: (list of t...
[ "Given", "Voronoi", "NNs", "extract", "the", "NN", "info", "in", "the", "form", "needed", "by", "NearestNeighbors" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L950-L985
[ "def", "_extract_nn_info", "(", "self", ",", "structure", ",", "nns", ")", ":", "# Get the target information", "if", "self", ".", "targets", "is", "None", ":", "targets", "=", "structure", ".", "composition", ".", "elements", "else", ":", "targets", "=", "s...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JmolNN.get_max_bond_distance
Use Jmol algorithm to determine bond length from atomic parameters Args: el1_sym: (str) symbol of atom 1 el2_sym: (str) symbol of atom 2 Returns: (float) max bond length
pymatgen/analysis/local_env.py
def get_max_bond_distance(self, el1_sym, el2_sym): """ Use Jmol algorithm to determine bond length from atomic parameters Args: el1_sym: (str) symbol of atom 1 el2_sym: (str) symbol of atom 2 Returns: (float) max bond length """ return sqrt( ...
def get_max_bond_distance(self, el1_sym, el2_sym): """ Use Jmol algorithm to determine bond length from atomic parameters Args: el1_sym: (str) symbol of atom 1 el2_sym: (str) symbol of atom 2 Returns: (float) max bond length """ return sqrt( ...
[ "Use", "Jmol", "algorithm", "to", "determine", "bond", "length", "from", "atomic", "parameters", "Args", ":", "el1_sym", ":", "(", "str", ")", "symbol", "of", "atom", "1", "el2_sym", ":", "(", "str", ")", "symbol", "of", "atom", "2" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1041-L1052
[ "def", "get_max_bond_distance", "(", "self", ",", "el1_sym", ",", "el2_sym", ")", ":", "return", "sqrt", "(", "(", "self", ".", "el_radius", "[", "el1_sym", "]", "+", "self", ".", "el_radius", "[", "el2_sym", "]", "+", "self", ".", "tol", ")", "**", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
JmolNN.get_nn_info
Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the bond identification algorithm underlying Jmol. Args: structure (Structure): input structure. n (integer): index of site for which to determine near ...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the bond identification algorithm underlying Jmol. Args: structure (Structure): input structure. n (i...
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the bond identification algorithm underlying Jmol. Args: structure (Structure): input structure. n (i...
[ "Get", "all", "near", "-", "neighbor", "sites", "as", "well", "as", "the", "associated", "image", "locations", "and", "weights", "of", "the", "site", "with", "index", "n", "using", "the", "bond", "identification", "algorithm", "underlying", "Jmol", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1054-L1094
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "site", "=", "structure", "[", "n", "]", "# Determine relevant bond lengths based on atomic radii table", "bonds", "=", "{", "}", "for", "el", "in", "structure", ".", "composition", ".", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
MinimumDistanceNN.get_nn_info
Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest neighbor distance-based method. Args: structure (Structure): input structure. n (integer): index of site for which to determine near ...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest neighbor distance-based method. Args: structure (Structure): input structure. n (integer)...
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest neighbor distance-based method. Args: structure (Structure): input structure. n (integer)...
[ "Get", "all", "near", "-", "neighbor", "sites", "as", "well", "as", "the", "associated", "image", "locations", "and", "weights", "of", "the", "site", "with", "index", "n", "using", "the", "closest", "neighbor", "distance", "-", "based", "method", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1119-L1158
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "site", "=", "structure", "[", "n", "]", "neighs_dists", "=", "structure", ".", "get_neighbors", "(", "site", ",", "self", ".", "cutoff", ")", "siw", "=", "[", "]", "if", "self"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
OpenBabelNN.get_nn_info
Get all near-neighbor sites and weights (orders) of bonds for a given atom. :param molecule: input Molecule. :param n: index of site for which to determine near neighbors. :return: [dict] representing a neighboring site and the type of bond present between site n and the neighbo...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor sites and weights (orders) of bonds for a given atom. :param molecule: input Molecule. :param n: index of site for which to determine near neighbors. :return: [dict] representing a neighboring site and the ty...
def get_nn_info(self, structure, n): """ Get all near-neighbor sites and weights (orders) of bonds for a given atom. :param molecule: input Molecule. :param n: index of site for which to determine near neighbors. :return: [dict] representing a neighboring site and the ty...
[ "Get", "all", "near", "-", "neighbor", "sites", "and", "weights", "(", "orders", ")", "of", "bonds", "for", "a", "given", "atom", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1180-L1220
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "from", "pymatgen", ".", "io", ".", "babel", "import", "BabelMolAdaptor", "obmol", "=", "BabelMolAdaptor", "(", "structure", ")", ".", "openbabel_mol", "siw", "=", "[", "]", "# Get on...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
OpenBabelNN.get_bonded_structure
Obtain a MoleculeGraph object using this NearNeighbor class. Requires the optional dependency networkx (pip install networkx). Args: structure: Molecule object. decorate (bool): whether to annotate site properties with order parameters using neighbors determi...
pymatgen/analysis/local_env.py
def get_bonded_structure(self, structure, decorate=False): """ Obtain a MoleculeGraph object using this NearNeighbor class. Requires the optional dependency networkx (pip install networkx). Args: structure: Molecule object. decorate (bool): whether to ann...
def get_bonded_structure(self, structure, decorate=False): """ Obtain a MoleculeGraph object using this NearNeighbor class. Requires the optional dependency networkx (pip install networkx). Args: structure: Molecule object. decorate (bool): whether to ann...
[ "Obtain", "a", "MoleculeGraph", "object", "using", "this", "NearNeighbor", "class", ".", "Requires", "the", "optional", "dependency", "networkx", "(", "pip", "install", "networkx", ")", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1222-L1251
[ "def", "get_bonded_structure", "(", "self", ",", "structure", ",", "decorate", "=", "False", ")", ":", "# requires optional dependency which is why it's not a top-level import", "from", "pymatgen", ".", "analysis", ".", "graphs", "import", "MoleculeGraph", "if", "decorate...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
OpenBabelNN.get_nn_shell_info
Get a certain nearest neighbor shell for a certain site. Determines all non-backtracking paths through the neighbor network computed by `get_nn_info`. The weight is determined by multiplying the weight of the neighbor at each hop through the network. For example, a 2nd-nearest-neighbor ...
pymatgen/analysis/local_env.py
def get_nn_shell_info(self, structure, site_idx, shell): """Get a certain nearest neighbor shell for a certain site. Determines all non-backtracking paths through the neighbor network computed by `get_nn_info`. The weight is determined by multiplying the weight of the neighbor at each h...
def get_nn_shell_info(self, structure, site_idx, shell): """Get a certain nearest neighbor shell for a certain site. Determines all non-backtracking paths through the neighbor network computed by `get_nn_info`. The weight is determined by multiplying the weight of the neighbor at each h...
[ "Get", "a", "certain", "nearest", "neighbor", "shell", "for", "a", "certain", "site", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1253-L1292
[ "def", "get_nn_shell_info", "(", "self", ",", "structure", ",", "site_idx", ",", "shell", ")", ":", "all_nn_info", "=", "self", ".", "get_all_nn_info", "(", "structure", ")", "sites", "=", "self", ".", "_get_nn_shell_info", "(", "structure", ",", "all_nn_info"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CovalentBondNN.get_nn_info
Get all near-neighbor sites and weights (orders) of bonds for a given atom. :param structure: input Molecule. :param n: index of site for which to determine near neighbors. :return: [dict] representing a neighboring site and the type of bond present between site n and the neighb...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor sites and weights (orders) of bonds for a given atom. :param structure: input Molecule. :param n: index of site for which to determine near neighbors. :return: [dict] representing a neighboring site and the t...
def get_nn_info(self, structure, n): """ Get all near-neighbor sites and weights (orders) of bonds for a given atom. :param structure: input Molecule. :param n: index of site for which to determine near neighbors. :return: [dict] representing a neighboring site and the t...
[ "Get", "all", "near", "-", "neighbor", "sites", "and", "weights", "(", "orders", ")", "of", "bonds", "for", "a", "given", "atom", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1315-L1353
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "# This is unfortunately inefficient, but is the best way to fit the", "# current NearNeighbors scheme", "self", ".", "bonds", "=", "structure", ".", "get_covalent_bonds", "(", "tol", "=", "self", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
MinimumOKeeffeNN.get_nn_info
Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with O'Keeffe parameters. Args: structure (Structure): input structure. n (integer): index of site for whi...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with O'Keeffe parameters. Args: structure (Structure): input ...
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with O'Keeffe parameters. Args: structure (Structure): input ...
[ "Get", "all", "near", "-", "neighbor", "sites", "as", "well", "as", "the", "associated", "image", "locations", "and", "weights", "of", "the", "site", "with", "index", "n", "using", "the", "closest", "relative", "neighbor", "distance", "-", "based", "method",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1446-L1490
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "site", "=", "structure", "[", "n", "]", "neighs_dists", "=", "structure", ".", "get_neighbors", "(", "site", ",", "self", ".", "cutoff", ")", "try", ":", "eln", "=", "site", "....
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
MinimumVIRENN.get_nn_info
Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with VIRE atomic/ionic radii. Args: structure (Structure): input structure. n (integer): index of site for...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with VIRE atomic/ionic radii. Args: structure (Structure): in...
def get_nn_info(self, structure, n): """ Get all near-neighbor sites as well as the associated image locations and weights of the site with index n using the closest relative neighbor distance-based method with VIRE atomic/ionic radii. Args: structure (Structure): in...
[ "Get", "all", "near", "-", "neighbor", "sites", "as", "well", "as", "the", "associated", "image", "locations", "and", "weights", "of", "the", "site", "with", "index", "n", "using", "the", "closest", "relative", "neighbor", "distance", "-", "based", "method",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1512-L1550
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "vire", "=", "ValenceIonicRadiusEvaluator", "(", "structure", ")", "site", "=", "vire", ".", "structure", "[", "n", "]", "neighs_dists", "=", "vire", ".", "structure", ".", "get_neigh...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.compute_trigonometric_terms
Computes trigonometric terms that are required to calculate bond orientational order parameters using internal variables. Args: thetas ([float]): polar angles of all neighbors in radians. phis ([float]): azimuth angles of all neighbors in radians. The lis...
pymatgen/analysis/local_env.py
def compute_trigonometric_terms(self, thetas, phis): """" Computes trigonometric terms that are required to calculate bond orientational order parameters using internal variables. Args: thetas ([float]): polar angles of all neighbors in radians. phis ([f...
def compute_trigonometric_terms(self, thetas, phis): """" Computes trigonometric terms that are required to calculate bond orientational order parameters using internal variables. Args: thetas ([float]): polar angles of all neighbors in radians. phis ([f...
[ "Computes", "trigonometric", "terms", "that", "are", "required", "to", "calculate", "bond", "orientational", "order", "parameters", "using", "internal", "variables", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L1996-L2040
[ "def", "compute_trigonometric_terms", "(", "self", ",", "thetas", ",", "phis", ")", ":", "if", "len", "(", "thetas", ")", "!=", "len", "(", "phis", ")", ":", "raise", "ValueError", "(", "\"List of polar and azimuthal angles have to be\"", "\" equal!\"", ")", "se...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.get_q2
Calculates the value of the bond orientational order parameter of weight l=2. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is expected that the compute_trigonometric_terms function ...
pymatgen/analysis/local_env.py
def get_q2(self, thetas=None, phis=None): """ Calculates the value of the bond orientational order parameter of weight l=2. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is ...
def get_q2(self, thetas=None, phis=None): """ Calculates the value of the bond orientational order parameter of weight l=2. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is ...
[ "Calculates", "the", "value", "of", "the", "bond", "orientational", "order", "parameter", "of", "weight", "l", "=", "2", ".", "If", "the", "function", "is", "called", "with", "non", "-", "empty", "lists", "of", "polar", "and", "azimuthal", "angles", "the",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L2042-L2109
[ "def", "get_q2", "(", "self", ",", "thetas", "=", "None", ",", "phis", "=", "None", ")", ":", "if", "thetas", "is", "not", "None", "and", "phis", "is", "not", "None", ":", "self", ".", "compute_trigonometric_terms", "(", "thetas", ",", "phis", ")", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.get_q4
Calculates the value of the bond orientational order parameter of weight l=4. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is expected that the compute_trigonometric_terms function ...
pymatgen/analysis/local_env.py
def get_q4(self, thetas=None, phis=None): """ Calculates the value of the bond orientational order parameter of weight l=4. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is ...
def get_q4(self, thetas=None, phis=None): """ Calculates the value of the bond orientational order parameter of weight l=4. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is ...
[ "Calculates", "the", "value", "of", "the", "bond", "orientational", "order", "parameter", "of", "weight", "l", "=", "4", ".", "If", "the", "function", "is", "called", "with", "non", "-", "empty", "lists", "of", "polar", "and", "azimuthal", "angles", "the",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L2111-L2218
[ "def", "get_q4", "(", "self", ",", "thetas", "=", "None", ",", "phis", "=", "None", ")", ":", "if", "thetas", "is", "not", "None", "and", "phis", "is", "not", "None", ":", "self", ".", "compute_trigonometric_terms", "(", "thetas", ",", "phis", ")", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.get_q6
Calculates the value of the bond orientational order parameter of weight l=6. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is expected that the compute_trigonometric_terms function ...
pymatgen/analysis/local_env.py
def get_q6(self, thetas=None, phis=None): """ Calculates the value of the bond orientational order parameter of weight l=6. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is ...
def get_q6(self, thetas=None, phis=None): """ Calculates the value of the bond orientational order parameter of weight l=6. If the function is called with non-empty lists of polar and azimuthal angles the corresponding trigonometric terms are computed afresh. Otherwise, it is ...
[ "Calculates", "the", "value", "of", "the", "bond", "orientational", "order", "parameter", "of", "weight", "l", "=", "6", ".", "If", "the", "function", "is", "called", "with", "non", "-", "empty", "lists", "of", "polar", "and", "azimuthal", "angles", "the",...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L2220-L2383
[ "def", "get_q6", "(", "self", ",", "thetas", "=", "None", ",", "phis", "=", "None", ")", ":", "if", "thetas", "is", "not", "None", "and", "phis", "is", "not", "None", ":", "self", ".", "compute_trigonometric_terms", "(", "thetas", ",", "phis", ")", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.get_type
Return type of order parameter at the index provided and represented by a short string. Args: index (int): index of order parameter for which type is to be returned. Returns: str: OP type.
pymatgen/analysis/local_env.py
def get_type(self, index): """ Return type of order parameter at the index provided and represented by a short string. Args: index (int): index of order parameter for which type is to be returned. Returns: str: OP type. """ ...
def get_type(self, index): """ Return type of order parameter at the index provided and represented by a short string. Args: index (int): index of order parameter for which type is to be returned. Returns: str: OP type. """ ...
[ "Return", "type", "of", "order", "parameter", "at", "the", "index", "provided", "and", "represented", "by", "a", "short", "string", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L2385-L2400
[ "def", "get_type", "(", "self", ",", "index", ")", ":", "if", "index", "<", "0", "or", "index", ">=", "len", "(", "self", ".", "_types", ")", ":", "raise", "ValueError", "(", "\"Index for getting order parameter type\"", "\" out-of-bounds!\"", ")", "return", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.get_parameters
Returns list of floats that represents the parameters associated with calculation of the order parameter that was defined at the index provided. Attention: the parameters do not need to equal those originally inputted because of processing out of efficiency reasons. Args...
pymatgen/analysis/local_env.py
def get_parameters(self, index): """ Returns list of floats that represents the parameters associated with calculation of the order parameter that was defined at the index provided. Attention: the parameters do not need to equal those originally inputted because ...
def get_parameters(self, index): """ Returns list of floats that represents the parameters associated with calculation of the order parameter that was defined at the index provided. Attention: the parameters do not need to equal those originally inputted because ...
[ "Returns", "list", "of", "floats", "that", "represents", "the", "parameters", "associated", "with", "calculation", "of", "the", "order", "parameter", "that", "was", "defined", "at", "the", "index", "provided", ".", "Attention", ":", "the", "parameters", "do", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L2402-L2422
[ "def", "get_parameters", "(", "self", ",", "index", ")", ":", "if", "index", "<", "0", "or", "index", ">=", "len", "(", "self", ".", "_types", ")", ":", "raise", "ValueError", "(", "\"Index for getting parameters associated with\"", "\" order parameter calculation...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
LocalStructOrderParams.get_order_parameters
Compute all order parameters of site n. Args: structure (Structure): input structure. n (int): index of site in input structure, for which OPs are to be calculated. Note that we do not use the sites iterator here, but directly access site...
pymatgen/analysis/local_env.py
def get_order_parameters(self, structure, n, indices_neighs=None, \ tol=0.0, target_spec=None): """ Compute all order parameters of site n. Args: structure (Structure): input structure. n (int): index of site in input structure, ...
def get_order_parameters(self, structure, n, indices_neighs=None, \ tol=0.0, target_spec=None): """ Compute all order parameters of site n. Args: structure (Structure): input structure. n (int): index of site in input structure, ...
[ "Compute", "all", "order", "parameters", "of", "site", "n", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L2424-L3028
[ "def", "get_order_parameters", "(", "self", ",", "structure", ",", "n", ",", "indices_neighs", "=", "None", ",", "tol", "=", "0.0", ",", "target_spec", "=", "None", ")", ":", "# Do error-checking and initialization.", "if", "n", "<", "0", ":", "raise", "Valu...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN.get_nn_info
Get all near-neighbor information. Args: structure: (Structure) pymatgen Structure n: (int) index of target site Returns: siw (list of dicts): each dictionary provides information about a single near neighbor, where key 'site' gives ac...
pymatgen/analysis/local_env.py
def get_nn_info(self, structure, n): """ Get all near-neighbor information. Args: structure: (Structure) pymatgen Structure n: (int) index of target site Returns: siw (list of dicts): each dictionary provides information about a single...
def get_nn_info(self, structure, n): """ Get all near-neighbor information. Args: structure: (Structure) pymatgen Structure n: (int) index of target site Returns: siw (list of dicts): each dictionary provides information about a single...
[ "Get", "all", "near", "-", "neighbor", "information", ".", "Args", ":", "structure", ":", "(", "Structure", ")", "pymatgen", "Structure", "n", ":", "(", "int", ")", "index", "of", "target", "site" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3246-L3283
[ "def", "get_nn_info", "(", "self", ",", "structure", ",", "n", ")", ":", "nndata", "=", "self", ".", "get_nn_data", "(", "structure", ",", "n", ")", "if", "not", "self", ".", "weighted_cn", ":", "max_key", "=", "max", "(", "nndata", ".", "cn_weights", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN.get_nn_data
The main logic of the method to compute near neighbor. Args: structure: (Structure) enclosing structure object n: (int) index of target site to get NN info for length: (int) if set, will return a fixed range of CN numbers Returns: a namedtuple (NNData) o...
pymatgen/analysis/local_env.py
def get_nn_data(self, structure, n, length=None): """ The main logic of the method to compute near neighbor. Args: structure: (Structure) enclosing structure object n: (int) index of target site to get NN info for length: (int) if set, will return a fixed ran...
def get_nn_data(self, structure, n, length=None): """ The main logic of the method to compute near neighbor. Args: structure: (Structure) enclosing structure object n: (int) index of target site to get NN info for length: (int) if set, will return a fixed ran...
[ "The", "main", "logic", "of", "the", "method", "to", "compute", "near", "neighbor", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3285-L3422
[ "def", "get_nn_data", "(", "self", ",", "structure", ",", "n", ",", "length", "=", "None", ")", ":", "length", "=", "length", "or", "self", ".", "fingerprint_length", "# determine possible bond targets", "target", "=", "None", "if", "self", ".", "cation_anion"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN.get_cn
Get coordination number, CN, of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating whether (True) to use weights for computing the coordina...
pymatgen/analysis/local_env.py
def get_cn(self, structure, n, use_weights=False): """ Get coordination number, CN, of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating w...
def get_cn(self, structure, n, use_weights=False): """ Get coordination number, CN, of site with index n in structure. Args: structure (Structure): input structure. n (integer): index of site for which to determine CN. use_weights (boolean): flag indicating w...
[ "Get", "coordination", "number", "CN", "of", "site", "with", "index", "n", "in", "structure", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3424-L3442
[ "def", "get_cn", "(", "self", ",", "structure", ",", "n", ",", "use_weights", "=", "False", ")", ":", "if", "self", ".", "weighted_cn", "!=", "use_weights", ":", "raise", "ValueError", "(", "\"The weighted_cn parameter and use_weights \"", "\"parameter should match!...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN._semicircle_integral
An internal method to get an integral between two bounds of a unit semicircle. Used in algorithm to determine bond probabilities. Args: dist_bins: (float) list of all possible bond weights idx: (float) index of starting bond weight Returns: (float) integral o...
pymatgen/analysis/local_env.py
def _semicircle_integral(dist_bins, idx): """ An internal method to get an integral between two bounds of a unit semicircle. Used in algorithm to determine bond probabilities. Args: dist_bins: (float) list of all possible bond weights idx: (float) index of startin...
def _semicircle_integral(dist_bins, idx): """ An internal method to get an integral between two bounds of a unit semicircle. Used in algorithm to determine bond probabilities. Args: dist_bins: (float) list of all possible bond weights idx: (float) index of startin...
[ "An", "internal", "method", "to", "get", "an", "integral", "between", "two", "bounds", "of", "a", "unit", "semicircle", ".", "Used", "in", "algorithm", "to", "determine", "bond", "probabilities", ".", "Args", ":", "dist_bins", ":", "(", "float", ")", "list...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3466-L3492
[ "def", "_semicircle_integral", "(", "dist_bins", ",", "idx", ")", ":", "r", "=", "1", "x1", "=", "dist_bins", "[", "idx", "]", "x2", "=", "dist_bins", "[", "idx", "+", "1", "]", "if", "dist_bins", "[", "idx", "]", "==", "1", ":", "area1", "=", "0...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN._get_default_radius
An internal method to get a "default" covalent/element radius Args: site: (Site) Returns: Covalent radius of element on site, or Atomic radius if unavailable
pymatgen/analysis/local_env.py
def _get_default_radius(site): """ An internal method to get a "default" covalent/element radius Args: site: (Site) Returns: Covalent radius of element on site, or Atomic radius if unavailable """ try: return CovalentRadius.radius[sit...
def _get_default_radius(site): """ An internal method to get a "default" covalent/element radius Args: site: (Site) Returns: Covalent radius of element on site, or Atomic radius if unavailable """ try: return CovalentRadius.radius[sit...
[ "An", "internal", "method", "to", "get", "a", "default", "covalent", "/", "element", "radius" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3495-L3508
[ "def", "_get_default_radius", "(", "site", ")", ":", "try", ":", "return", "CovalentRadius", ".", "radius", "[", "site", ".", "specie", ".", "symbol", "]", "except", ":", "return", "site", ".", "specie", ".", "atomic_radius" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN._get_radius
An internal method to get the expected radius for a site with oxidation state. Args: site: (Site) Returns: Oxidation-state dependent radius: ionic, covalent, or atomic. Returns 0 if no oxidation state or appropriate radius is found.
pymatgen/analysis/local_env.py
def _get_radius(site): """ An internal method to get the expected radius for a site with oxidation state. Args: site: (Site) Returns: Oxidation-state dependent radius: ionic, covalent, or atomic. Returns 0 if no oxidation state or appropriate ...
def _get_radius(site): """ An internal method to get the expected radius for a site with oxidation state. Args: site: (Site) Returns: Oxidation-state dependent radius: ionic, covalent, or atomic. Returns 0 if no oxidation state or appropriate ...
[ "An", "internal", "method", "to", "get", "the", "expected", "radius", "for", "a", "site", "with", "oxidation", "state", ".", "Args", ":", "site", ":", "(", "Site", ")" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3511-L3550
[ "def", "_get_radius", "(", "site", ")", ":", "if", "hasattr", "(", "site", ".", "specie", ",", "'oxi_state'", ")", ":", "el", "=", "site", ".", "specie", ".", "element", "oxi", "=", "site", ".", "specie", ".", "oxi_state", "if", "oxi", "==", "0", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CrystalNN.transform_to_length
Given NNData, transforms data to the specified fingerprint length Args: nndata: (NNData) length: (int) desired length of NNData
pymatgen/analysis/local_env.py
def transform_to_length(nndata, length): """ Given NNData, transforms data to the specified fingerprint length Args: nndata: (NNData) length: (int) desired length of NNData """ if length is None: return nndata if length: f...
def transform_to_length(nndata, length): """ Given NNData, transforms data to the specified fingerprint length Args: nndata: (NNData) length: (int) desired length of NNData """ if length is None: return nndata if length: f...
[ "Given", "NNData", "transforms", "data", "to", "the", "specified", "fingerprint", "length", "Args", ":", "nndata", ":", "(", "NNData", ")", "length", ":", "(", "int", ")", "desired", "length", "of", "NNData" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3553-L3570
[ "def", "transform_to_length", "(", "nndata", ",", "length", ")", ":", "if", "length", "is", "None", ":", "return", "nndata", "if", "length", ":", "for", "cn", "in", "range", "(", "length", ")", ":", "if", "cn", "not", "in", "nndata", ".", "cn_weights",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CutOffDictNN.from_preset
Initialise a CutOffDictNN according to a preset set of cut-offs. Args: preset (str): A preset name. The list of supported presets are: - "vesta_2019": The distance cut-offs used by the VESTA visualisation program. Returns: A CutOffDictNN using...
pymatgen/analysis/local_env.py
def from_preset(preset): """ Initialise a CutOffDictNN according to a preset set of cut-offs. Args: preset (str): A preset name. The list of supported presets are: - "vesta_2019": The distance cut-offs used by the VESTA visualisation program. ...
def from_preset(preset): """ Initialise a CutOffDictNN according to a preset set of cut-offs. Args: preset (str): A preset name. The list of supported presets are: - "vesta_2019": The distance cut-offs used by the VESTA visualisation program. ...
[ "Initialise", "a", "CutOffDictNN", "according", "to", "a", "preset", "set", "of", "cut", "-", "offs", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/local_env.py#L3624-L3641
[ "def", "from_preset", "(", "preset", ")", ":", "if", "preset", "==", "'vesta_2019'", ":", "cut_offs", "=", "loadfn", "(", "os", ".", "path", ".", "join", "(", "_directory", ",", "'vesta_cutoffs.yaml'", ")", ")", "return", "CutOffDictNN", "(", "cut_off_dict",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
Mcsqs.to_string
Returns a structure in mcsqs rndstr.in format. :return (str):
pymatgen/io/atat.py
def to_string(self): """ Returns a structure in mcsqs rndstr.in format. :return (str): """ # define coord system, use Cartesian output = ["1.0 0.0 0.0", "0.0 1.0 0.0", "0.0 0.0 1.0"] # add lattice vectors m = self.struct...
def to_string(self): """ Returns a structure in mcsqs rndstr.in format. :return (str): """ # define coord system, use Cartesian output = ["1.0 0.0 0.0", "0.0 1.0 0.0", "0.0 0.0 1.0"] # add lattice vectors m = self.struct...
[ "Returns", "a", "structure", "in", "mcsqs", "rndstr", ".", "in", "format", ".", ":", "return", "(", "str", ")", ":" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/atat.py#L32-L59
[ "def", "to_string", "(", "self", ")", ":", "# define coord system, use Cartesian", "output", "=", "[", "\"1.0 0.0 0.0\"", ",", "\"0.0 1.0 0.0\"", ",", "\"0.0 0.0 1.0\"", "]", "# add lattice vectors", "m", "=", "self", ".", "structure", ".", "lattice", ".", "matrix",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
Mcsqs.structure_from_string
Parses a rndstr.in or lat.in file into pymatgen's Structure format. :param data: contents of a rndstr.in or lat.in file :return: Structure object
pymatgen/io/atat.py
def structure_from_string(data): """ Parses a rndstr.in or lat.in file into pymatgen's Structure format. :param data: contents of a rndstr.in or lat.in file :return: Structure object """ data = data.splitlines() data = [x.split() for x in data if x] # r...
def structure_from_string(data): """ Parses a rndstr.in or lat.in file into pymatgen's Structure format. :param data: contents of a rndstr.in or lat.in file :return: Structure object """ data = data.splitlines() data = [x.split() for x in data if x] # r...
[ "Parses", "a", "rndstr", ".", "in", "or", "lat", ".", "in", "file", "into", "pymatgen", "s", "Structure", "format", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/atat.py#L62-L125
[ "def", "structure_from_string", "(", "data", ")", ":", "data", "=", "data", ".", "splitlines", "(", ")", "data", "=", "[", "x", ".", "split", "(", ")", "for", "x", "in", "data", "if", "x", "]", "# remove empty lines", "# following specification/terminology g...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_voronoi_nodes
Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elements in structure. If not given, Zeo++ default values are used. ...
pymatgen/io/zeopp.py
def get_voronoi_nodes(structure, rad_dict=None, probe_rad=0.1): """ Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elements in...
def get_voronoi_nodes(structure, rad_dict=None, probe_rad=0.1): """ Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elements in...
[ "Analyze", "the", "void", "space", "in", "the", "input", "structure", "using", "voronoi", "decomposition", "Calls", "Zeo", "++", "for", "Voronoi", "decomposition", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/zeopp.py#L262-L336
[ "def", "get_voronoi_nodes", "(", "structure", ",", "rad_dict", "=", "None", ",", "probe_rad", "=", "0.1", ")", ":", "with", "ScratchDir", "(", "'.'", ")", ":", "name", "=", "\"temp_zeo1\"", "zeo_inp_filename", "=", "name", "+", "\".cssr\"", "ZeoCssr", "(", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_high_accuracy_voronoi_nodes
Analyze the void space in the input structure using high accuracy voronoi decomposition. Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elements in structure. If not given, Zeo++ default value...
pymatgen/io/zeopp.py
def get_high_accuracy_voronoi_nodes(structure, rad_dict, probe_rad=0.1): """ Analyze the void space in the input structure using high accuracy voronoi decomposition. Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictio...
def get_high_accuracy_voronoi_nodes(structure, rad_dict, probe_rad=0.1): """ Analyze the void space in the input structure using high accuracy voronoi decomposition. Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictio...
[ "Analyze", "the", "void", "space", "in", "the", "input", "structure", "using", "high", "accuracy", "voronoi", "decomposition", ".", "Calls", "Zeo", "++", "for", "Voronoi", "decomposition", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/zeopp.py#L339-L396
[ "def", "get_high_accuracy_voronoi_nodes", "(", "structure", ",", "rad_dict", ",", "probe_rad", "=", "0.1", ")", ":", "with", "ScratchDir", "(", "'.'", ")", ":", "name", "=", "\"temp_zeo1\"", "zeo_inp_filename", "=", "name", "+", "\".cssr\"", "ZeoCssr", "(", "s...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_free_sphere_params
Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elements in structure. If not given, Zeo++ default values are used. ...
pymatgen/io/zeopp.py
def get_free_sphere_params(structure, rad_dict=None, probe_rad=0.1): """ Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elemen...
def get_free_sphere_params(structure, rad_dict=None, probe_rad=0.1): """ Analyze the void space in the input structure using voronoi decomposition Calls Zeo++ for Voronoi decomposition. Args: structure: pymatgen.core.structure.Structure rad_dict (optional): Dictionary of radii of elemen...
[ "Analyze", "the", "void", "space", "in", "the", "input", "structure", "using", "voronoi", "decomposition", "Calls", "Zeo", "++", "for", "Voronoi", "decomposition", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/zeopp.py#L402-L452
[ "def", "get_free_sphere_params", "(", "structure", ",", "rad_dict", "=", "None", ",", "probe_rad", "=", "0.1", ")", ":", "with", "ScratchDir", "(", "'.'", ")", ":", "name", "=", "\"temp_zeo1\"", "zeo_inp_filename", "=", "name", "+", "\".cssr\"", "ZeoCssr", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
get_void_volume_surfarea
Computes the volume and surface area of isolated void using Zeo++. Useful to compute the volume and surface area of vacant site. Args: structure: pymatgen Structure containing vacancy rad_dict(optional): Dictionary with short name of elements and their radii. chan_rad(option...
pymatgen/io/zeopp.py
def get_void_volume_surfarea(structure, rad_dict=None, chan_rad=0.3, probe_rad=0.1): """ Computes the volume and surface area of isolated void using Zeo++. Useful to compute the volume and surface area of vacant site. Args: structure: pymatgen Structure containing v...
def get_void_volume_surfarea(structure, rad_dict=None, chan_rad=0.3, probe_rad=0.1): """ Computes the volume and surface area of isolated void using Zeo++. Useful to compute the volume and surface area of vacant site. Args: structure: pymatgen Structure containing v...
[ "Computes", "the", "volume", "and", "surface", "area", "of", "isolated", "void", "using", "Zeo", "++", ".", "Useful", "to", "compute", "the", "volume", "and", "surface", "area", "of", "vacant", "site", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/zeopp.py#L456-L513
[ "def", "get_void_volume_surfarea", "(", "structure", ",", "rad_dict", "=", "None", ",", "chan_rad", "=", "0.3", ",", "probe_rad", "=", "0.1", ")", ":", "with", "ScratchDir", "(", "'.'", ")", ":", "name", "=", "\"temp_zeo\"", "zeo_inp_filename", "=", "name", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ZeoCssr.from_string
Reads a string representation to a ZeoCssr object. Args: string: A string representation of a ZeoCSSR. Returns: ZeoCssr object.
pymatgen/io/zeopp.py
def from_string(string): """ Reads a string representation to a ZeoCssr object. Args: string: A string representation of a ZeoCSSR. Returns: ZeoCssr object. """ lines = string.split("\n") toks = lines[0].split() lengths = [float(i...
def from_string(string): """ Reads a string representation to a ZeoCssr object. Args: string: A string representation of a ZeoCSSR. Returns: ZeoCssr object. """ lines = string.split("\n") toks = lines[0].split() lengths = [float(i...
[ "Reads", "a", "string", "representation", "to", "a", "ZeoCssr", "object", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/zeopp.py#L133-L168
[ "def", "from_string", "(", "string", ")", ":", "lines", "=", "string", ".", "split", "(", "\"\\n\"", ")", "toks", "=", "lines", "[", "0", "]", ".", "split", "(", ")", "lengths", "=", "[", "float", "(", "i", ")", "for", "i", "in", "toks", "]", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
ZeoVoronoiXYZ.from_string
Creates Zeo++ Voronoi XYZ object from a string. from_string method of XYZ class is being redefined. Args: contents: String representing Zeo++ Voronoi XYZ file. Returns: ZeoVoronoiXYZ object
pymatgen/io/zeopp.py
def from_string(contents): """ Creates Zeo++ Voronoi XYZ object from a string. from_string method of XYZ class is being redefined. Args: contents: String representing Zeo++ Voronoi XYZ file. Returns: ZeoVoronoiXYZ object """ lines = conte...
def from_string(contents): """ Creates Zeo++ Voronoi XYZ object from a string. from_string method of XYZ class is being redefined. Args: contents: String representing Zeo++ Voronoi XYZ file. Returns: ZeoVoronoiXYZ object """ lines = conte...
[ "Creates", "Zeo", "++", "Voronoi", "XYZ", "object", "from", "a", "string", ".", "from_string", "method", "of", "XYZ", "class", "is", "being", "redefined", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/zeopp.py#L199-L229
[ "def", "from_string", "(", "contents", ")", ":", "lines", "=", "contents", ".", "split", "(", "\"\\n\"", ")", "num_sites", "=", "int", "(", "lines", "[", "0", "]", ")", "coords", "=", "[", "]", "sp", "=", "[", "]", "prop", "=", "[", "]", "coord_p...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.set_velocities
:param velocities (au): list of list of atom velocities :return:
pymatgen/io/qchem_deprecated.py
def set_velocities(self, velocities): """ :param velocities (au): list of list of atom velocities :return: """ assert len(velocities) == len(self.mol) self.params["velocity"] = velocities
def set_velocities(self, velocities): """ :param velocities (au): list of list of atom velocities :return: """ assert len(velocities) == len(self.mol) self.params["velocity"] = velocities
[ ":", "param", "velocities", "(", "au", ")", ":", "list", "of", "list", "of", "atom", "velocities", ":", "return", ":" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L226-L233
[ "def", "set_velocities", "(", "self", ",", "velocities", ")", ":", "assert", "len", "(", "velocities", ")", "==", "len", "(", "self", ".", "mol", ")", "self", ".", "params", "[", "\"velocity\"", "]", "=", "velocities" ]
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.set_memory
Set the maxium allowed memory. Args: total: The total memory. Integer. Unit: MBytes. If set to None, this parameter will be neglected. static: The static memory. Integer. Unit MBytes. If set to None, this parameterwill be neglected.
pymatgen/io/qchem_deprecated.py
def set_memory(self, total=None, static=None): """ Set the maxium allowed memory. Args: total: The total memory. Integer. Unit: MBytes. If set to None, this parameter will be neglected. static: The static memory. Integer. Unit MBytes. If set to None, ...
def set_memory(self, total=None, static=None): """ Set the maxium allowed memory. Args: total: The total memory. Integer. Unit: MBytes. If set to None, this parameter will be neglected. static: The static memory. Integer. Unit MBytes. If set to None, ...
[ "Set", "the", "maxium", "allowed", "memory", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L382-L395
[ "def", "set_memory", "(", "self", ",", "total", "=", "None", ",", "static", "=", "None", ")", ":", "if", "total", ":", "self", ".", "params", "[", "\"rem\"", "]", "[", "\"mem_total\"", "]", "=", "total", "if", "static", ":", "self", ".", "params", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.set_scf_algorithm_and_iterations
Set algorithm used for converging SCF and max number of SCF iterations. Args: algorithm: The algorithm used for converging SCF. (str) iterations: The max number of SCF iterations. (Integer)
pymatgen/io/qchem_deprecated.py
def set_scf_algorithm_and_iterations(self, algorithm="diis", iterations=50): """ Set algorithm used for converging SCF and max number of SCF iterations. Args: algorithm: The algorithm used for converging SCF. (str) iterations: The...
def set_scf_algorithm_and_iterations(self, algorithm="diis", iterations=50): """ Set algorithm used for converging SCF and max number of SCF iterations. Args: algorithm: The algorithm used for converging SCF. (str) iterations: The...
[ "Set", "algorithm", "used", "for", "converging", "SCF", "and", "max", "number", "of", "SCF", "iterations", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L409-L424
[ "def", "set_scf_algorithm_and_iterations", "(", "self", ",", "algorithm", "=", "\"diis\"", ",", "iterations", "=", "50", ")", ":", "available_algorithms", "=", "{", "\"diis\"", ",", "\"dm\"", ",", "\"diis_dm\"", ",", "\"diis_gdm\"", ",", "\"gdm\"", ",", "\"rca\"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.set_dft_grid
Set the grid for DFT numerical integrations. Args: radical_points: Radical points. (Integer) angular_points: Angular points. (Integer) grid_type: The type of of the grid. There are two standard grids: SG-1 and SG-0. The other two supported grids are "Lebedev"...
pymatgen/io/qchem_deprecated.py
def set_dft_grid(self, radical_points=128, angular_points=302, grid_type="Lebedev"): """ Set the grid for DFT numerical integrations. Args: radical_points: Radical points. (Integer) angular_points: Angular points. (Integer) grid_type: The...
def set_dft_grid(self, radical_points=128, angular_points=302, grid_type="Lebedev"): """ Set the grid for DFT numerical integrations. Args: radical_points: Radical points. (Integer) angular_points: Angular points. (Integer) grid_type: The...
[ "Set", "the", "grid", "for", "DFT", "numerical", "integrations", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L453-L485
[ "def", "set_dft_grid", "(", "self", ",", "radical_points", "=", "128", ",", "angular_points", "=", "302", ",", "grid_type", "=", "\"Lebedev\"", ")", ":", "available_lebedev_angular_points", "=", "{", "6", ",", "18", ",", "26", ",", "38", ",", "50", ",", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.set_scf_initial_guess
Set initial guess method to be used for SCF Args: guess: The initial guess method. (str)
pymatgen/io/qchem_deprecated.py
def set_scf_initial_guess(self, guess="SAD"): """ Set initial guess method to be used for SCF Args: guess: The initial guess method. (str) """ availabel_guesses = {"core", "sad", "gwh", "read", "fragmo"} if guess.lower() not in availabel_guesses: ...
def set_scf_initial_guess(self, guess="SAD"): """ Set initial guess method to be used for SCF Args: guess: The initial guess method. (str) """ availabel_guesses = {"core", "sad", "gwh", "read", "fragmo"} if guess.lower() not in availabel_guesses: ...
[ "Set", "initial", "guess", "method", "to", "be", "used", "for", "SCF" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L487-L498
[ "def", "set_scf_initial_guess", "(", "self", ",", "guess", "=", "\"SAD\"", ")", ":", "availabel_guesses", "=", "{", "\"core\"", ",", "\"sad\"", ",", "\"gwh\"", ",", "\"read\"", ",", "\"fragmo\"", "}", "if", "guess", ".", "lower", "(", ")", "not", "in", "...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.set_geom_opt_coords_type
Set the coordinates system used in geometry optimization. "cartesian" --- always cartesian coordinates. "internal" --- always internal coordinates. "internal-switch" --- try internal coordinates first, if fails, switch to cartesian coordinates. "z-matrix" --- ...
pymatgen/io/qchem_deprecated.py
def set_geom_opt_coords_type(self, coords_type="internal_switch"): """ Set the coordinates system used in geometry optimization. "cartesian" --- always cartesian coordinates. "internal" --- always internal coordinates. "internal-switch" --- try internal coordinates f...
def set_geom_opt_coords_type(self, coords_type="internal_switch"): """ Set the coordinates system used in geometry optimization. "cartesian" --- always cartesian coordinates. "internal" --- always internal coordinates. "internal-switch" --- try internal coordinates f...
[ "Set", "the", "coordinates", "system", "used", "in", "geometry", "optimization", ".", "cartesian", "---", "always", "cartesian", "coordinates", ".", "internal", "---", "always", "internal", "coordinates", ".", "internal", "-", "switch", "---", "try", "internal", ...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L510-L531
[ "def", "set_geom_opt_coords_type", "(", "self", ",", "coords_type", "=", "\"internal_switch\"", ")", ":", "coords_map", "=", "{", "\"cartesian\"", ":", "0", ",", "\"internal\"", ":", "1", ",", "\"internal-switch\"", ":", "-", "1", ",", "\"z-matrix\"", ":", "2"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.scale_geom_opt_threshold
Adjust the convergence criteria of geometry optimization. Args: gradient: the scale factor for gradient criteria. If less than 1.0, you are tightening the threshold. The base value is 300 × 10E−6 displacement: the scale factor for atomic displacement. If ...
pymatgen/io/qchem_deprecated.py
def scale_geom_opt_threshold(self, gradient=0.1, displacement=0.1, energy=0.1): """ Adjust the convergence criteria of geometry optimization. Args: gradient: the scale factor for gradient criteria. If less than 1.0, you are tightening...
def scale_geom_opt_threshold(self, gradient=0.1, displacement=0.1, energy=0.1): """ Adjust the convergence criteria of geometry optimization. Args: gradient: the scale factor for gradient criteria. If less than 1.0, you are tightening...
[ "Adjust", "the", "convergence", "criteria", "of", "geometry", "optimization", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L533-L556
[ "def", "scale_geom_opt_threshold", "(", "self", ",", "gradient", "=", "0.1", ",", "displacement", "=", "0.1", ",", "energy", "=", "0.1", ")", ":", "if", "gradient", "<", "1.0", "/", "(", "300", "-", "1", ")", "or", "displacement", "<", "1.0", "/", "(...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.use_pcm
Set the solvent model to PCM. Default parameters are trying to comply to gaussian default value Args: pcm_params (dict): The parameters of "$pcm" section. solvent_key (str): for versions < 4.2 the section name is "pcm_solvent" solvent_params (dict): The parameters of...
pymatgen/io/qchem_deprecated.py
def use_pcm(self, pcm_params=None, solvent_key="solvent", solvent_params=None, radii_force_field=None): """ Set the solvent model to PCM. Default parameters are trying to comply to gaussian default value Args: pcm_params (dict): The parameters of "$pcm" secti...
def use_pcm(self, pcm_params=None, solvent_key="solvent", solvent_params=None, radii_force_field=None): """ Set the solvent model to PCM. Default parameters are trying to comply to gaussian default value Args: pcm_params (dict): The parameters of "$pcm" secti...
[ "Set", "the", "solvent", "model", "to", "PCM", ".", "Default", "parameters", "are", "trying", "to", "comply", "to", "gaussian", "default", "value" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L587-L622
[ "def", "use_pcm", "(", "self", ",", "pcm_params", "=", "None", ",", "solvent_key", "=", "\"solvent\"", ",", "solvent_params", "=", "None", ",", "radii_force_field", "=", "None", ")", ":", "self", ".", "params", "[", "\"pcm\"", "]", "=", "dict", "(", ")",...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
QcTask.from_string
Creates QcInput from a string. Args: contents: String representing a QChem input file. Returns: QcInput object
pymatgen/io/qchem_deprecated.py
def from_string(cls, contents): """ Creates QcInput from a string. Args: contents: String representing a QChem input file. Returns: QcInput object """ mol = None charge = None spin_multiplicity = None params = dict() ...
def from_string(cls, contents): """ Creates QcInput from a string. Args: contents: String representing a QChem input file. Returns: QcInput object """ mol = None charge = None spin_multiplicity = None params = dict() ...
[ "Creates", "QcInput", "from", "a", "string", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/io/qchem_deprecated.py#L920-L998
[ "def", "from_string", "(", "cls", ",", "contents", ")", ":", "mol", "=", "None", "charge", "=", "None", "spin_multiplicity", "=", "None", "params", "=", "dict", "(", ")", "lines", "=", "contents", ".", "split", "(", "'\\n'", ")", "parse_section", "=", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
magnetic_deformation
Calculates 'magnetic deformation proxy', a measure of deformation (norm of finite strain) between 'non-magnetic' (non-spin-polarized) and ferromagnetic structures. Adapted from Bocarsly et al. 2017, doi: 10.1021/acs.chemmater.6b04729 :param structure_A: Structure :param structure_B: Struct...
pymatgen/analysis/magnetism/analyzer.py
def magnetic_deformation(structure_A, structure_B): """ Calculates 'magnetic deformation proxy', a measure of deformation (norm of finite strain) between 'non-magnetic' (non-spin-polarized) and ferromagnetic structures. Adapted from Bocarsly et al. 2017, doi: 10.1021/acs.chemmater.6b04729 ...
def magnetic_deformation(structure_A, structure_B): """ Calculates 'magnetic deformation proxy', a measure of deformation (norm of finite strain) between 'non-magnetic' (non-spin-polarized) and ferromagnetic structures. Adapted from Bocarsly et al. 2017, doi: 10.1021/acs.chemmater.6b04729 ...
[ "Calculates", "magnetic", "deformation", "proxy", "a", "measure", "of", "deformation", "(", "norm", "of", "finite", "strain", ")", "between", "non", "-", "magnetic", "(", "non", "-", "spin", "-", "polarized", ")", "and", "ferromagnetic", "structures", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L1170-L1207
[ "def", "magnetic_deformation", "(", "structure_A", ",", "structure_B", ")", ":", "# retrieve orderings of both input structures", "ordering_a", "=", "CollinearMagneticStructureAnalyzer", "(", "structure_A", ",", "overwrite_magmom_mode", "=", "\"none\"", ")", ".", "ordering", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer._round_magmoms
If round_magmoms_mode is an integer, simply round to that number of decimal places, else if set to a float will try and round intelligently by grouping magmoms.
pymatgen/analysis/magnetism/analyzer.py
def _round_magmoms(magmoms, round_magmoms_mode: Union[int, float]): """ If round_magmoms_mode is an integer, simply round to that number of decimal places, else if set to a float will try and round intelligently by grouping magmoms. """ if isinstance(round_magmoms_mode, ...
def _round_magmoms(magmoms, round_magmoms_mode: Union[int, float]): """ If round_magmoms_mode is an integer, simply round to that number of decimal places, else if set to a float will try and round intelligently by grouping magmoms. """ if isinstance(round_magmoms_mode, ...
[ "If", "round_magmoms_mode", "is", "an", "integer", "simply", "round", "to", "that", "number", "of", "decimal", "places", "else", "if", "set", "to", "a", "float", "will", "try", "and", "round", "intelligently", "by", "grouping", "magmoms", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L299-L346
[ "def", "_round_magmoms", "(", "magmoms", ",", "round_magmoms_mode", ":", "Union", "[", "int", ",", "float", "]", ")", ":", "if", "isinstance", "(", "round_magmoms_mode", ",", "int", ")", ":", "# simple rounding to number of decimal places", "magmoms", "=", "np", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer.get_structure_with_spin
Returns a Structure with species decorated with spin values instead of using magmom site properties. :return: Structure
pymatgen/analysis/magnetism/analyzer.py
def get_structure_with_spin(self): """ Returns a Structure with species decorated with spin values instead of using magmom site properties. :return: Structure """ structure = self.structure.copy() structure.add_spin_by_site(structure.site_properties["magmom"]) ...
def get_structure_with_spin(self): """ Returns a Structure with species decorated with spin values instead of using magmom site properties. :return: Structure """ structure = self.structure.copy() structure.add_spin_by_site(structure.site_properties["magmom"]) ...
[ "Returns", "a", "Structure", "with", "species", "decorated", "with", "spin", "values", "instead", "of", "using", "magmom", "site", "properties", ".", ":", "return", ":", "Structure" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L348-L359
[ "def", "get_structure_with_spin", "(", "self", ")", ":", "structure", "=", "self", ".", "structure", ".", "copy", "(", ")", "structure", ".", "add_spin_by_site", "(", "structure", ".", "site_properties", "[", "\"magmom\"", "]", ")", "structure", ".", "remove_s...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer.get_structure_with_only_magnetic_atoms
Returns a Structure with only magnetic atoms present. :return: Structure
pymatgen/analysis/magnetism/analyzer.py
def get_structure_with_only_magnetic_atoms(self, make_primitive=True): """ Returns a Structure with only magnetic atoms present. :return: Structure """ sites = [site for site in self.structure if abs(site.properties["magmom"]) > 0] structure = Structure.from_sites(sites...
def get_structure_with_only_magnetic_atoms(self, make_primitive=True): """ Returns a Structure with only magnetic atoms present. :return: Structure """ sites = [site for site in self.structure if abs(site.properties["magmom"]) > 0] structure = Structure.from_sites(sites...
[ "Returns", "a", "Structure", "with", "only", "magnetic", "atoms", "present", ".", ":", "return", ":", "Structure" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L361-L374
[ "def", "get_structure_with_only_magnetic_atoms", "(", "self", ",", "make_primitive", "=", "True", ")", ":", "sites", "=", "[", "site", "for", "site", "in", "self", ".", "structure", "if", "abs", "(", "site", ".", "properties", "[", "\"magmom\"", "]", ")", ...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer.get_nonmagnetic_structure
Returns a Structure without magnetic moments defined. :param make_primitive (bool): Return a primitive structure, defaults to True. :return: Structure
pymatgen/analysis/magnetism/analyzer.py
def get_nonmagnetic_structure(self, make_primitive=True): """ Returns a Structure without magnetic moments defined. :param make_primitive (bool): Return a primitive structure, defaults to True. :return: Structure """ structure = self.structure.copy() stru...
def get_nonmagnetic_structure(self, make_primitive=True): """ Returns a Structure without magnetic moments defined. :param make_primitive (bool): Return a primitive structure, defaults to True. :return: Structure """ structure = self.structure.copy() stru...
[ "Returns", "a", "Structure", "without", "magnetic", "moments", "defined", ".", ":", "param", "make_primitive", "(", "bool", ")", ":", "Return", "a", "primitive", "structure", "defaults", "to", "True", ".", ":", "return", ":", "Structure" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L376-L390
[ "def", "get_nonmagnetic_structure", "(", "self", ",", "make_primitive", "=", "True", ")", ":", "structure", "=", "self", ".", "structure", ".", "copy", "(", ")", "structure", ".", "remove_site_property", "(", "\"magmom\"", ")", "if", "make_primitive", ":", "st...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer.get_ferromagnetic_structure
Returns a Structure with all magnetic moments positive or zero. :param make_primitive (bool): Return a primitive structure, defaults to True. :return: Structure
pymatgen/analysis/magnetism/analyzer.py
def get_ferromagnetic_structure(self, make_primitive=True): """ Returns a Structure with all magnetic moments positive or zero. :param make_primitive (bool): Return a primitive structure, defaults to True. :return: Structure """ structure = self.structure...
def get_ferromagnetic_structure(self, make_primitive=True): """ Returns a Structure with all magnetic moments positive or zero. :param make_primitive (bool): Return a primitive structure, defaults to True. :return: Structure """ structure = self.structure...
[ "Returns", "a", "Structure", "with", "all", "magnetic", "moments", "positive", "or", "zero", ".", ":", "param", "make_primitive", "(", "bool", ")", ":", "Return", "a", "primitive", "structure", "defaults", "to", "True", ".", ":", "return", ":", "Structure" ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L392-L408
[ "def", "get_ferromagnetic_structure", "(", "self", ",", "make_primitive", "=", "True", ")", ":", "structure", "=", "self", ".", "structure", ".", "copy", "(", ")", "structure", ".", "add_site_property", "(", "\"magmom\"", ",", "[", "abs", "(", "m", ")", "f...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer.magnetic_species_and_magmoms
Returns a dict of magnetic species and the magnitude of their associated magmoms. Will return a set if there are multiple magmoms per species. :return: dict of magnetic species and magmoms
pymatgen/analysis/magnetism/analyzer.py
def magnetic_species_and_magmoms(self): """ Returns a dict of magnetic species and the magnitude of their associated magmoms. Will return a set if there are multiple magmoms per species. :return: dict of magnetic species and magmoms """ structure = self.get_ferr...
def magnetic_species_and_magmoms(self): """ Returns a dict of magnetic species and the magnitude of their associated magmoms. Will return a set if there are multiple magmoms per species. :return: dict of magnetic species and magmoms """ structure = self.get_ferr...
[ "Returns", "a", "dict", "of", "magnetic", "species", "and", "the", "magnitude", "of", "their", "associated", "magmoms", ".", "Will", "return", "a", "set", "if", "there", "are", "multiple", "magmoms", "per", "species", "." ]
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L441-L468
[ "def", "magnetic_species_and_magmoms", "(", "self", ")", ":", "structure", "=", "self", ".", "get_ferromagnetic_structure", "(", ")", "magtypes", "=", "{", "str", "(", "site", ".", "specie", ")", ":", "set", "(", ")", "for", "site", "in", "structure", "if"...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da
train
CollinearMagneticStructureAnalyzer.number_of_unique_magnetic_sites
:param symprec (float): same as in SpacegroupAnalyzer :param angle_tolerance (float): same as in SpacegroupAnalyzer :return (int): Number of symmetrically-distinct magnetic sites present in structure.
pymatgen/analysis/magnetism/analyzer.py
def number_of_unique_magnetic_sites(self, symprec=1e-3, angle_tolerance=5): """ :param symprec (float): same as in SpacegroupAnalyzer :param angle_tolerance (float): same as in SpacegroupAnalyzer :return (int): Number of symmetrically-distinct magnetic sites present in structure....
def number_of_unique_magnetic_sites(self, symprec=1e-3, angle_tolerance=5): """ :param symprec (float): same as in SpacegroupAnalyzer :param angle_tolerance (float): same as in SpacegroupAnalyzer :return (int): Number of symmetrically-distinct magnetic sites present in structure....
[ ":", "param", "symprec", "(", "float", ")", ":", "same", "as", "in", "SpacegroupAnalyzer", ":", "param", "angle_tolerance", "(", "float", ")", ":", "same", "as", "in", "SpacegroupAnalyzer", ":", "return", "(", "int", ")", ":", "Number", "of", "symmetricall...
materialsproject/pymatgen
python
https://github.com/materialsproject/pymatgen/blob/4ca558cf72f8d5f8a1f21dfdfc0181a971c186da/pymatgen/analysis/magnetism/analyzer.py#L477-L499
[ "def", "number_of_unique_magnetic_sites", "(", "self", ",", "symprec", "=", "1e-3", ",", "angle_tolerance", "=", "5", ")", ":", "structure", "=", "self", ".", "get_nonmagnetic_structure", "(", ")", "sga", "=", "SpacegroupAnalyzer", "(", "structure", ",", "sympre...
4ca558cf72f8d5f8a1f21dfdfc0181a971c186da