structure_prediction Package

substitution_probability Module

This module provides classes for representing species substitution probabilities.

class SubstitutionPredictor(lambda_table=None, alpha=-5, threshold=0.001)

Bases: object

Predicts likely substitutions either to or from a given composition or species list using the SubstitutionProbability

composition_prediction(composition, to_this_composition=True)

Returns charged balanced substitutions from a starting or ending composition.

Args:
composition:
starting or ending composition
to_this_composition:
If true, substitutions with this as a final composition will be found. If false, substitutions with this as a starting composition will be found (these are slightly different)
Returns:
List of predictions in the form of dictionaries. If to_this_composition is true, the values of the dictionary will be from the list species. If false, the keys will be from that list.
list_prediction(species, to_this_composition=True)
Args:
species:
list of species
to_this_composition:
If true, substitutions with this as a final composition will be found. If false, substitutions with this as a starting composition will be found (these are slightly different)
Returns:
List of predictions in the form of dictionaries. If to_this_composition is true, the values of the dictionary will be from the list species. If false, the keys will be from that list.
class SubstitutionProbability(*args, **kwds)[source]

Bases: pymatgen.structure_prediction.substitution_probability.SubstitutionProbability

This class finds substitution probabilities given lists of atoms to substitute. The inputs make more sense if you look through the from_defaults static method.

The substitution prediction algorithm is presented in: Hautier, G., Fischer, C., Ehrlacher, V., Jain, A., and Ceder, G. (2011) Data Mined Ionic Substitutions for the Discovery of New Compounds. Inorganic Chemistry, 50(2), 656-663. doi:10.1021/ic102031h

Args:
lambda_table:
json table of the weight functions lambda if None, will use the default lambda.json table
alpha:
weight function for never observed substitutions

substitutor Module

This module provides classes for predicting new structures from existing ones.

class Substitutor(threshold=0.001, symprec=0.1, **kwargs)[source]

Bases: pymatgen.serializers.json_coders.MSONable

This object uses a data mined ionic substitution approach to propose compounds likely to be stable. It relies on an algorithm presented in Hautier, G., Fischer, C., Ehrlacher, V., Jain, A., and Ceder, G. (2011). Data Mined Ionic Substitutions for the Discovery of New Compounds. Inorganic Chemistry, 50(2), 656-663. doi:10.1021/ic102031h

This substitutor uses the substitution probability class to find good substitutions for a given chemistry or structure.

Args:
threshold:
probability threshold for predictions
symprec:
symmetry precision to determine if two structures are duplicates
kwargs:
kwargs for the SubstitutionProbability object lambda_table, alpha
classmethod from_dict(d)[source]
get_allowed_species()[source]

returns the species in the domain of the probability function any other specie will not work

pred_from_comp(composition)[source]

Similar to pred_from_list except this method returns a list after checking that compositions are charge balanced.

pred_from_list(species_list)[source]

There are an exceptionally large number of substitutions to look at (260^n), where n is the number of species in the list. We need a more efficient than brute force way of going through these possibilities. The brute force method would be:

output = []
for p in itertools.product(self._sp.species_list
                           , repeat = len(species_list)):
    if self._sp.conditional_probability_list(p, species_list)
                           > self._threshold:
        output.append(dict(zip(species_list,p)))
return output

Instead of that we do a branch and bound.

Args:
species_list:
list of species in the starting structure
Returns:
list of dictionaries, each including a substitutions dictionary, and a probability value
pred_from_structures(target_species, structures_list, remove_duplicates=True)[source]

performs a structure prediction targeting compounds containing the target_species and based on a list of structure (those structures can for instance come from a database like the ICSD). It will return all the structures formed by ionic substitutions with a probability higher than the threshold

Args:
target_species:
a list of species with oxidation states e.g., [Specie(‘Li’,1),Specie(‘Ni’,2), Specie(‘O’,-2)]
structures_list:
a list of dictionnary of the form {‘structure’:Structure object ,’id’:some id where it comes from} the id can for instance refer to an ICSD id
Returns:
a list of TransformedStructure objects.
to_dict[source]

Table Of Contents

This Page