BaseDefectGenerator¶
- class BaseDefectGenerator(host_configuration, symmetry_tolerance=None)¶
The base class for an object which describes the possible defects for a given host material.
- Parameters:
host_configuration (
BulkConfiguration
) – The host configuration.symmetry_tolerance (PhysicalQuantity of type length) – The tolerance to be used when determining the symmetries. Default: 0.1 * Angstrom.
- filterByDefectGenerators(defect_generators)¶
Method for filtering a defect generator by keeping the defects that are in one or more other defect generators.
- Parameters:
defect_generators (list of
BaseDefectGenerator
) – The list of defect generators containing the defects to keep after filtering.- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterByDistinctConfigurations(top_n_configurations)¶
Method for selecting a number of distinct unique defects using the MTP structural descriptor.
- Parameters:
top_n_configurations (int) – Number of most distinct configurations.
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterByPointDefect(point_defects, keep_defects=True)¶
Method for filtering the generator of unique point defects by selecting a specific defects.
- Parameters:
point_defects (Sequence of BasePointDefect) – The sequence of point defects to filter.
keep_defects (bool) – Whether or not the given defects are to be kept and all other removed (True) or removed from the generator and all other defect kept (False). Default: True
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterByPositionInZSlices(start=None, end=None, resolution=None, in_plane_position=None)¶
Select defects along the Z-axis of the cell. This method is intended to be used for configurations that are anisotropic along one direction, such as interfaces or surfaces.
- Parameters:
start (PhysicalQuantity of type length) – The start of the position interval. Default: 0 * Angstrom.
end (PhysicalQuantity of type length) – The end of the position interval. Default: length of the cell in z direction.
resolution (PhysicalQuantity of type length) – The size of each slice of the interface profile. Default:
2.0 * Angstrom
in_plane_position (Sequence (2) of type float) – The selected defect in each slice is as close as possible to this fractional coordinate. Mutually exclusive with parameter select_distinct. Default:
[0.5, 0.5]
select_distinct (bool) – Select the most distinct defects per slice. This can be used to sample a diverse configuration space with a minimal number of defects. Mutually exclusive with parameter in_plane_position. Default:
False
defects_per_slice (int) – The number of defects to select per slice. This parameter is only used together with the parameter select_distinct. Default:
1
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterBySimilarityInZSlices(start=None, end=None, resolution=None, defects_per_slice=None)¶
Select defects along the Z-axis of the cell. This method is intended to be used for configurations that are anisotropic along one direction, such as interfaces or surfaces.
- Parameters:
start (PhysicalQuantity of type length) – The start of the position interval. Default: 0 * Angstrom.
end (PhysicalQuantity of type length) – The end of the position interval. Default: length of the cell in z direction.
resolution (PhysicalQuantity of type length) – The size of each slice of the interface profile. Default:
2.0 * Angstrom
defects_per_slice (int) – The number of defects to select per slice. This parameter is only used together with the parameter select_distinct. Default:
1
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterBySphere(center, radius)¶
Method for filtering unique defects by their position in a sphere.
- Parameters:
center (PhysicalQuantity of type position) – The center of the sphere in Cartesian coordinates.
radius (PhysicalQuantity of type length) – The radius of the sphere.
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterBySymmetryIndex(symmetry_indices)¶
Method for filtering the list of unique point defects by selecting specific symmetry indices.
- Parameters:
symmetry_indices (int | list of int) – The list of symmetry indices to keep after filtering.
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- filterByZPositionInterval(start=None, end=None)¶
Method for selecting unique defects by their position in an interval of the z axis. Note: The
- Parameters:
start (PhysicalQuantity of type length) – The start of the position interval. Default: 0 * Angstrom.
end (PhysicalQuantity of type length) – The end of the position interval. Default: length of the cell in z direction.
- Returns:
A filtered defect generator.
- Return type:
VacancyGenerator
|SubstitutionalGenerator
|InterstitialGenerator
SplitInterstitialGenerator
- hostConfiguration()¶
- Returns:
The host configuration.
- Return type:
- indices()¶
- Returns:
The defect indices for the current defect generator.
- Return type:
list of int
- pointDefects()¶
- Returns:
The list of unique point defects.
- Return type:
Vacancy
|Substitutional
|Interstitial
|DefectCluster
|SplitInterstitial
- symmetryTolerance()¶
- Returns:
The symmetry tolerance.
- Return type:
PhysicalQuantity of type length
- uniqueDefects()¶
- Returns:
The list of symmetrically unique point defects with their names and symmetry indices, ordered by increasing index.
- Return type:
list of
NamedPointDefect
- uniqueString()¶
Return a unique string representing the state of the object.
Notes¶
The BaseDefectGenerator class is the base class for all of the defect generators. These are the classes that generate the symmetrically unique defects of different kinds for a given pristine material. Currently the kinds of defects that can be specified are:
Vacancy defects, where an atom is removed from the lattice. These can be generated with the VacancyGenerator object.
Substitutional defects, where an atom is exchanged for another. These can be generated with the Substitutional object.
Interstitial defects, where an atom is inserted into a space in the lattice. Interstitial defects at likely lattice positions can be generated using the InterstitialGenerator object. This uses Voronoi analysis to find likely positions for interstitial defects.
Split interstitial defects can be generated using the SplitInterstitial object. This defect can be understood as an interstitial defect combined with a displaced lattice atom. The center of the atom pair is positioned at the original lattice cite with the atoms moved in opposite directions along a given axis.
Pair defects combine a site defect with another point defect. Using pair defects it is possible to create vacancy-interstitial, vacancy-substitution or double substitution defects. These can be generated using the a DefectPairGenerator.
The BaseDefectGenerator object should not be instantiated. This class is used to refer to any type of defect generator. As an example, in a Table, the BaseDefectGenerator type can be specified for a column type, so that the column can contain different types of defect generators.