The transformations package defines various transformations that can be applied on structures, i.e., converting one structure to another.
This module implements more advanced transformations.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This is a transformation that disorders a structure to make it charge balanced, given an oxidation state-decorated structure.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
Order a disordered structure using enumlib. For complete orderings, this generally produces fewer structures that the OrderDisorderedStructure transformation, and at a much faster speed.
Return either a single ordered structure or a sequence of all ordered structures.
Depending on returned_ranked list, either a transformed structure or a list of dictionaries, where each dictionary is of the form {“structure” = .... , “other_arguments”}
The list of ordered structures is ranked by ewald energy / atom, if the input structure is an oxidation state decorated structure. Otherwise, it is ranked by number of sites, with smallest number of sites first.
Bases: object
Performs multiple substitutions on a structure. For example, can do a fractional replacement of Ge in LiGePS with a list of species, creating one structure for each substitution. Ordering is done using a dummy element so only one ordering must be done per substitution oxidation state. Charge balancing of the structure is optionally performed.
Note
There are no checks to make sure that removal fractions are possible and rounding may occur. Currently charge balancing only works for removal of species.
Performs multiple fractional substitutions on a transmuter.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation takes a structure and uses the structure prediction module to find likely site substitutions.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This is a transformation that is inherently one-to-many. It is constructed from a list of transformations and returns one structure for each transformation. The primary use for this class is extending a transmuter object.
This module defines site transformations which transforms a structure into another structure. Site transformations differ from standard transformations in that they operate in a site-specific manner. All transformations should inherit the AbstractTransformation ABC.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation substitutes certain sites with certain species.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
Remove fraction of specie from a structure. Requires an oxidation state decorated structure for ewald sum to be computed.
Given that the solution to selecting the right removals is NP-hard, there are several algorithms provided with varying degrees of accuracy and speed. The options are as follows:
Apply the transformation.
This method uses the matrix form of ewaldsum to calculate the ewald sums of the potential structures. This is on the order of 4 orders of magnitude faster when there are large numbers of permutations to consider. There are further optimizations possible (doing a smarter search of permutations for example), but this wont make a difference until the number of permutations is on the order of 30,000.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
Remove certain sites in a structure.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation substitutes certain sites with certain species.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This class translates a set of sites by a certain vector.
This module defines standard transformations which transforms a structure into another structure. Standard transformations operate in a structure-wide manner, rather than site-specific manner. All transformations should inherit the AbstractTransformation ABC.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation automatically decorates a structure with oxidation states using a bond valence approach.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This is a demo transformation which does nothing, i.e. just returns a copy of the same structure.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
Order a disordered structure. The disordered structure must be oxidation state decorated for ewald sum to be computed. No attempt is made to perform symmetry determination to reduce the number of combinations.
Hence, attempting to performing ordering on a large number of disordered sites may be extremely expensive. The time scales approximately with the number of possible combinations. The algorithm can currently compute approximately 5,000,000 permutations per minute.
Also, simple rounding of the occupancies are performed, with no attempt made to achieve a target composition. This is usually not a problem for most ordering problems, but there can be times where rounding errors may result in structures that do not have the desired composition. This second step will be implemented in the next iteration of the code.
If multiple fractions for a single species are found for different sites, these will be treated separately if the difference is above a threshold tolerance. currently this is .1
For example, if a fraction of .25 Li is on sites 0,1,2,3 and .5 on sites 4, 5, 6, 7 1 site from [0,1,2,3] will be filled and 2 sites from [4,5,6,7] will be filled, even though a lower energy combination might be found by putting all lithium in sites [4,5,6,7].
USE WITH CARE.
For this transformation, the apply_transformation method will return only the ordered structure with the lowest Ewald energy, to be consistent with the method signature of the other transformations. However, all structures are stored in the all_structures attribute in the transformation object for easy access.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation decorates a structure with oxidation states.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation removes oxidation states from a structure
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
Remove fraction of specie from a structure.
Requires an oxidation state decorated structure for ewald sum to be computed.
Given that the solution to selecting the right removals is NP-hard, there are several algorithms provided with varying degrees of accuracy and speed. Please see pymatgen.transformations.site_transformations.PartialRemoveSitesTransformation.
Apply the transformation.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation perturbs a structure by a specified distance in random directions. Used for breaking symmetries.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This class finds the primitive cell of the input structure. It returns a structure that is not necessarily orthogonalized Author: Will Richards
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
Remove all occurrences of some species from a structure.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
The RotationTransformation applies a rotation to a structure.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
This transformation substitutes species for one another.
Bases: pymatgen.transformations.transformation_abc.AbstractTransformation
The RotationTransformation applies a rotation to a structure.
Convenience method to get a SupercellTransformation from a simple series of three numbers for scaling each lattice vector. Equivalent to calling the normal with [[scale_a, 0, 0], [0, scale_b, 0], [0, 0, scale_c]]
Defines an abstract base class contract for Transformation object.
Bases: pymatgen.serializers.json_coders.MSONable
Abstract transformation class.
Applies the transformation to a structure. Depending on whether a transformation is one-to-many, there may be an option to return a ranked list of structures.