# pymatgen.transformations.defect_transformations module¶

class AntisiteDefectTransformation(supercell_dim, valences=None, radii=None)[source]

Generates antisite defect structures

Parameters: supecell_dim – Supercell scaling matrix
apply_transformation(structure, return_ranked_list=False)[source]
Parameters: structure – (Logical or integer) (return_ranked_list) – Use big enough number to return all defect structures scs: Supercells with one antisite defect in each structure.
inverse

Returns the inverse transformation if available. Otherwise, should return None.

is_one_to_many

Determines if a Transformation is a one-to-many transformation. If a Transformation is a one-to-many transformation, the apply_transformation method should have a keyword arg “return_ranked_list” which allows for the transformed structures to be returned as a ranked list.

class InterstitialTransformation(interstitial_specie, supercell_dim, valences=None, radii=None)[source]

Generates interstitial structures from the input structure

Parameters: supercell_dim – valences – radii –
apply_transformation(structure, return_ranked_list=False)[source]
Parameters: structure – (Logical or integer) (return_ranked_list) – Use big enough number to return all defect structures scs: Supercells with one interstitial defect in each structure.
inverse

Returns the inverse transformation if available. Otherwise, should return None.

is_one_to_many

Determines if a Transformation is a one-to-many transformation. If a Transformation is a one-to-many transformation, the apply_transformation method should have a keyword arg “return_ranked_list” which allows for the transformed structures to be returned as a ranked list.

class SubstitutionDefectTransformation(species_map, supercell_dim, valences=None, radii=None)[source]

Generates substiutional defect structures. The first structure is the supercell of the original structure and is not a defect structure.

Parameters: supecell_dim – Supercell scaling matrix
apply_transformation(structure, return_ranked_list=False)[source]
Parameters: structure – (Logical or integer) (return_ranked_list) – Use big enough number to return all defect structures scs: Supercells with one substitution defect in each structure.
inverse

Returns the inverse transformation if available. Otherwise, should return None.

is_one_to_many

Determines if a Transformation is a one-to-many transformation. If a Transformation is a one-to-many transformation, the apply_transformation method should have a keyword arg “return_ranked_list” which allows for the transformed structures to be returned as a ranked list.

class VacancyTransformation(supercell_dim, species=None, valences=None, radii=None)[source]

Generates vacancy structures

Parameters: supecell_dim – Supercell scaling matrix species – Species in the structure for which vacancy

transformation is applied :return:

apply_transformation(structure, return_ranked_list=False)[source]
Parameters: structure – (Logical or integer) (return_ranked_list) – Use big enough number to return all defect structures scs: Supercells with one vacancy in each structure.
inverse

Returns the inverse transformation if available. Otherwise, should return None.

is_one_to_many

Determines if a Transformation is a one-to-many transformation. If a Transformation is a one-to-many transformation, the apply_transformation method should have a keyword arg “return_ranked_list” which allows for the transformed structures to be returned as a ranked list.