pymatgen.analysis.defects.point_defects module¶

class
Defect
[source]¶ Bases:
object
Abstract class for point defects

get_coordinated_elements
(n)[source]¶ Elements of sites in structure surrounding the defect site.
Parameters: n – Index of defect list

get_coordinated_sites
(n)[source]¶ The sites in structure surrounding the defect site.
Parameters: n – Index of defects list

get_defectsite_coordination_number
(n)[source]¶ Coordination number of interstitial site.
Parameters: n – Index of interstitial list

get_defectsite_multiplicity
(n)[source]¶ Returns the symmtric multiplicity of the defect site at the index.

make_supercells_with_defects
(scaling_matrix)[source]¶ Generate the supercell with input multipliers and create the defect. First supercell has no defects. To create unit cell with defect pass unit matrix.

struct_radii
¶ Radii of elements in the structure

struct_valences
¶ Valence of elements in the structure

structure
¶ Returns the structure without any defects Useful for MottLittleton calculations.


class
Interstitial
(structure, valences, radii, site_type='voronoi_vertex', accuracy='Normal', symmetry_flag=True, oxi_state=False)[source]¶ Bases:
pymatgen.analysis.defects.point_defects.Defect
Subclass of Defect to generate interstitial sites
Given a structure, generate symmetrically distinct interstitial sites. For a nonionic structure, use oxi_state=True and give atomic radii.
Parameters:  structure – pymatgen.core.structure.Structure
 valences – Dictionary of oxidation states of elements in {el:valence} form
 radii – Radii of elemnts in the structure
 site_type – “voronoi_vertex” uses voronoi nodes “voronoi_edgecenter” uses voronoi polyhedra edge centers “voronoi_facecenter” uses voronoi polyhedra face centers “all” combines vertices, edgecenters and facecenters. Default is “voronoi_vertex”
 accuracy – Flag denoting whether to use high accuracy version of Zeo++. Options are “Normal” and “High”. Default is normal.
 symmetry_flag – If True, only returns symmetrically distinct sites
 oxi_state – If False, input structure is considered devoid of oxidationstate decoration. And oxistate for each site is determined. Use True, if input structure is oxistate decorated. This option is useful when the structure is not electroneutral after deleting/adding sites. In that case oxidecorate the structure before deleting/adding the sites.

append_defectsite
(site)[source]¶ Append a site to list of possible interstitials
Parameters: site – pymatgen.core.sites.Site

delete_defectsite
(n)[source]¶ Remove a symmetrically distinct interstitial site
Parameters: n – Index of interstitial site

enumerate_defectsites
()[source]¶ Enumerate all the symmetrically distinct interstitial sites. The defect site has “X” as occupied specie.

get_coordsites_charge_sum
(n)[source]¶ Total charge of the interstitial coordinated sites.
Parameters: n – Index of interstitial list

get_coordsites_min_max_charge
(n)[source]¶ Minimum and maximum charge of sites surrounding the interstitial site.
Parameters: n – Index of symmetrical distinct interstitial site

get_radius
(n)[source]¶ Volume of the nth interstitial
Parameters: n – Index of symmetrically distinct vacancies list Returns: floating number representing radius of interstitial sphere

make_supercells_with_defects
(scaling_matrix, element)[source]¶ Returns sequence of supercells in pymatgen.core.structure.Structure format, with each supercell containing an interstitial. First supercell has no defects.

prune_defectsites
(el='C', oxi_state=4, dlta=0.1)[source]¶ Prune all the defect sites which can’t acoomodate the input elment with the input oxidation state.

class
InterstitialAnalyzer
(inter, el, oxi_state, scd=2)[source]¶ Bases:
object
Use GULP to compute the interstitial formation energy, relaxed structures. Works only for metal oxides due to the use of Buckingham Potentials.
Parameters:  inter – pymatgen.defects.point_defects.Interstitial
 el – Element name in short hand notation (“El”)
 oxi_state – Oxidtation state
 scd – Super cell dimension as number. The scaling is equal along xyz.

get_percentage_bond_distance_change
(n)[source]¶ Bond distance change after the introduction of interstitial
Parameters: n – Symmetrically distinct interstitial index

get_percentage_lattice_parameter_change
(n)[source]¶ Lattice parameter change after the introduction of interstitial
Parameters: n – Symmetrically distinct interstitial index

get_percentage_volume_change
(n)[source]¶ Volume change after the introduction of interstitial
Parameters: n – Symmetrically distinct interstitial index

class
InterstitialStructureRelaxer
(interstitial, el, oxi_state, supercell_dim=2)[source]¶ Bases:
object
Performs structural relaxation for each interstitial supercell.
Parameters:  interstitial – Unrelaxed interstitial
 el – Species string in short notation
 oxi_state – Oxidation state of the element
 supercell_dim – Dimensions of super cell

get_relaxed_energy
(n)[source]¶ Get the relaxed structure of nth symmetrically distinct interstitial.
Parameters: n – Symmetrically distinct interstitial index Note
0 corresponds to relaxed bulk structure

get_relaxed_interstitial
()[source]¶ Get the relaxed structure of nth symmetrically distinct interstitial.
Parameters: n – Symmetrically distinct interstitial index

get_relaxed_structure
(n)[source]¶ Get the relaxed structure of nth symmetrically distinct interstitial.
Parameters: n – Symmetrically distinct interstitial index Note
0 corresponds to relaxed bulk structure

class
RelaxedInterstitial
(struct_list, energy_list, valence_dict)[source]¶ Bases:
object
Stores the relaxed supercell structures for each interstitial Used to compute formation energies, displacement of atoms near the the interstitial.
Parameters:  struct_list – List of structures(supercells). The first structure should represent relaxed bulk structure and the subsequent ones interstitial structures (with the extra interstitial site appended at the end).
 energy_list – List of energies for relaxed interstitial structures. The first energy should correspond to bulk structure
 valence_dict – Valences of elements in dictionary form

formation_energy
(n, chem_pot=0)[source]¶ Compute the interstitial formation energy
Parameters:  n – Index of interstitials
 chem_pot – Chemical potential of interstitial site element. If not given, assumed as zero. The user is strongly urged to supply the chemical potential value

get_charge_coordination_number
(n)[source]¶ Charge coordination number for nth interstitial.
Parameters: n – Index of interstitials

get_coordinated_bulk_sites
(n)[source]¶ Bulk sites corresponding to the coordinated sites for nth interstitial.
Parameters: n – Index of interstitials

get_coordinated_site_displacement
(n)[source]¶ Compute the total displacement of coordinated sites from the interstitial sites during the relaxation
Parameters: n – Index of defect site

get_coordinated_sites
(n)[source]¶ Coordinated sites for nth interstitial.
Parameters: n – Index of interstitials

get_coordination_number
(n)[source]¶ Coordination number for nth interstitial.
Parameters: n – Index of interstitials

get_defectsite
(n)[source]¶ Returns the defect site of nth interstitial.
Parameters: n – Index of interstitial

get_percentage_bond_distance_change
(n)[source]¶ Bond distance change after the introduction of interstitial.
Parameters: n – index of interstitials

class
StructureMotifInterstitial
(structure, inter_elem, motif_types=['tet', 'oct', 'tetoct'], op_targets=[1.0, 1.0, 1.0], op_threshs=[0.5, 0.5, 0.5], dl=0.2, fac_max_radius=4.5, drel_overlap=0.5, write_timings=False)[source]¶ Bases:
pymatgen.analysis.defects.point_defects.Defect
Subclass of Defect to generate interstitial sites at positions where the interstitialcy is coordinated by nearest neighbors in a way that resembles basic structure motifs (tetrahedra, octahedra, bcc) or an overlay of two motifs (tetrahedraloctahedral). The algorithm will be formally introducted in an upcoming publication by Nils E. R. Zimmermann and Maciej Haranczyk, and it is already used by the Python Charged Defect Toolkit (PyCDT, https://arxiv.org/abs/1611.07481).
Generate symmetrically distinct interstitial sites at positions where the interstitial is coordinated by nearest neighbors in a pattern that resembles a supported structure motif (tetrahedra, octahedra, bcc) or an overlay of some motifs (tetrahedraloctahedral).
Parameters:  struct (Structure) – input structure for which symmetrically distinct interstitial sites are to be found.
 inter_elem (string) – element symbol of desired interstitial.
 motif_types ([string]) – list of structure motif types that are to be considered. Permissible types are: tet (tetrahedron), oct (octahedron), tetoct (tetrahedronoctahedron overlay).
 op_targets ([float]) – target values for the underlying order parameters to recognize a given structural motif.
 op_threshs ([float]) – threshold values for the underlying order parameters to still recognize a given structural motif (i.e., for an OP value >= threshold the coordination pattern match is positive, for OP < threshold the match is negative.
 dl (float) – grid fineness in Angstrom. The input structure is divided into a grid of dimension a/dl x b/dl x c/dl along the three crystallographic directions, with a, b, and c being the lengths of the three lattice vectors of the input unit cell.
 fac_max_radius (float) – factor to generate a (large) neighbor list per grid point with a fixed large cutoff distance, d_cutoff. The list is then sorted to give the neighbors in an ascending list in relative distance from the interstitial site. The relative distance between an interstitial trial site and a “bulk” atom is calculated by the distance, d, and the (ionic) radii of the two species involved, (r_inter+r_bulk), yielding d_rel = d / (r_inter+r_bulk). Because d_cutoff = fac_max_radius * r_max, where r_max is the largest site radius encountered in the structure, fac_max_radius should always be larger than 2.
 drel_overlap (float) – relative distance that is considered to flag an overlap between any two atoms. It is used a) to skip a given grid point because of overlap between an interstitial trial site and any one atom from the input structure and b) to remove trial sites that are too close to each other. The latter may or may not be desirable. A future revision should make this step optional.
 write_timings (boolean) – flag indicating whether or not to write out times for sections of the interstitial search (default: False).

enumerate_defectsites
()[source]¶ Get all defect sites.
Returns:  list of periodic sites
 representing the interstitials.
Return type: defect_sites ([PeriodicSite])

get_coordinating_elements_cns
(i)[source]¶ Get elementspecific coordination numbers of defect with index i.
Returns:  dictionary storing the coordination numbers (int)
 with string representation of elements as keys. (i.e., {elem1 (string): cn1 (int), ...}).
Return type: elem_cn (dict)

get_motif_type
(i)[source]¶ Get the motif type of defect with index i (e.g., “tet”).
Returns: motif type. Return type: motif (string)

make_supercells_with_defects
(scaling_matrix)[source]¶ Generate a sequence of supercells in which each supercell contains a single interstitial, except for the first supercell in the sequence which is a copy of the defectfree input structure.
Parameters: scaling_matrix (3x3 integer array) – scaling matrix to transform the lattice vectors. Returns: sequence of supercells. Return type: scs ([Structure])

class
Vacancy
(structure, valences, radii)[source]¶ Bases:
pymatgen.analysis.defects.point_defects.Defect
Subclass of Defect to generate vacancies and their analysis.
Parameters:  structure – pymatgen.core.structure.Structure
 valences – valences of elements as a dictionary
 radii – Radii of elements as a dictionary

get_coordsites_min_max_charge
(n)[source]¶ Minimum and maximum charge of sites surrounding the vacancy site.
Parameters: n – Index of vacancy list

get_defectsite_effective_charge
(n)[source]¶ Effective charge (In KrogerVink notation, cation vacancy has effectively ve charge and anion vacancy has +ve charge.)
Parameters: n – Index of vacancy list Returns: Effective charnge of defect site

get_defectsite_structure_index
(n)[source]¶ index of the vacacy site in the structure.sites list
Parameters: n – Index of vacancy list

get_surface_area
(n)[source]¶ Surface area of the nth vacancy
Parameters: n – Index of symmetrically distinct vacancies list Returns: floating number representing volume of vacancy

get_volume
(n)[source]¶ Volume of the nth vacancy
Parameters: n – Index of symmetrically distinct vacancies list Returns: floating number representing volume of vacancy

make_supercells_with_defects
(scaling_matrix, species=None, limit_return_structures=False)[source]¶ Generate sequence of supercells in pymatgen.core.structure.Structure format, with each supercell containing one vacancy.
Parameters:  scaling_matrix – super cell scale parameters in matrix forms
 species – Species in list format only for which vacancy supercells are required. If not specified all the species are considered.
 limit_return_structures – Boolean or positive number If number, only that many structures are returned.
Returns: Supercells with vacancies. First supercell has no defects.

class
VacancyFormationEnergy
(vacancy)[source]¶ Bases:
object
Using GULP compute the vacancy formation energy. Works only for binary metal oxides due to the use of Buckingham Potentials

class
ValenceIonicRadiusEvaluator
(structure)[source]¶ Bases:
object
Computes site valences and ionic radii for a structure using bond valence analyzer
Parameters: structure – pymatgen.core.structure.Structure 
radii
¶ List of ionic radii of elements in the order of sites.

structure
¶ Returns oxidation state decorated structure.

valences
¶ List of oxidation states of elements in the order of sites.


symmetry_reduced_voronoi_nodes
(structure, rad_dict, high_accuracy_flag=False, symm_flag=True)[source]¶ Obtain symmetry reduced voronoi nodes using Zeo++ and pymatgen.symmetry.finder.SpacegroupAnalyzer
Parameters:  strucutre – pymatgen Structure object
 rad_dict – Dictionary containing radii of spcies in the structure
 high_accuracy_flag – Flag denotting whether to use high accuracy version of Zeo++
 symm_flag – Flag denoting whether to return symmetrically distinct sites only
Returns: Symmetrically distinct voronoi nodes as pymatgen Strucutre