DefectClusterList

class DefectClusterList(defect_lists, cutoff_distances, charge_states=None, processes_per_defect=None)

A class which describes the list of possible pair defects in a material.

Parameters:
  • defect_lists (Iterable of SubstitutionalList | VacancyList | InterstitialList | SplitInterstitialList) – List of vacancy, interstitial or substitutional lists that will constitute the cluster. The lists does not need to be updated. The order of constituent defects in the list is important: defect orders might provide different clusters.
  • cutoff_distances (sequence of two PhysicalQuantity of type length.) – Minimum and maximum distance between the specified defects to be considered valid. No defect will belong to the cluster if the distance between it and any other defect in the cluster is smaller than the minimum, i.e., cutoff_distances[0]. No defect will belong to the cluster if the distance between it and all the defects in the cluster is bigger than the maximum, i.e., cutoff_distances[1]. So, for a defect to belong to the cluster, it should be closer than cutoff_distances[1] from 1 defect in the cluster, but farther than cutoff_distances[2] to all defects in the cluster
  • charge_states (int | sequence of int) – The charge states to calculate for each cluster
    Default: 0
  • processes_per_defect (int) – The number of processes assigned to calculating a single defect.
    Default: All available processes.
chargeStates()
Returns:The charge states to calculate for each defect.
Return type:list of int
cutoffDistances()
Returns:The cut off distance
Return type:tuple of two PhysicalQuantity of type length
defectLists()
Returns:The list of vacancy, interstitial or substitutional lists that will constitute the cluster.
Return type:Iterable of SubstitutionalList | VacancyList | InterstitialList | SplitInterstitialList
filterByDistance(distance, cartesian_coordinates=None, fractional_coordinates=None)

Method for filtering defects by distance. Given a origin in the supercell and a distance, all defects within a bigger distance will be filtered. After filtering, the wyckoff indices with no defects will be erased.

Parameters:
  • distance (PhysicalQuantity of type length) – Maximum distance
  • cartesian_coordinates (sequence (size 3) of PhysicalQuantity of type length) – The position of the reference to measure distances, given in absolute coordinates. This option is mutually exclusive to fractional_coordinates.
    Default: None
  • fractional_coordinates (sequence (size 3) of float) – The position of the reference to measure distances, given in fractional coordinates of the bulk unit cell. This option is mutually exclusive to cartesian_coordinates.
    Default: None
Returns:

A filtered defect list.

Return type:

VacancyList | SubstitutionalList | SplitInterstitialList

filterByLatticeSpecies(element_list)

Method for selecting inequivalent defects by element name. Valid only for defect types that are associated with a lattice site, e. g. Vacancies, but not Interstitials.

Parameters:element_list (PeriodicTableElement | list of PeriodicTableElement) – List of elements to keep after filtering.
Returns:A filtered defect list.
Return type:VacancyList | SubstitutionalList | SplitInterstitialList
filterByWyckoffIndex(wyckoff_indices)

Method for filtering the list of inequivalent point defects by selecting specific Wyckoff indices.

Parameters:wyckoff_indices (int | list of int) – The list of Wyckoff indices to keep after filtering.
Returns:A filtered defect list.
Return type:The same type as the unfiltered list.
materialSpecifications()
Returns:The descriptor of a bulk material, plus the information needed to perform the calculations.
Return type:MaterialSpecifications
nlprint(stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)

Prints a summary of the wyckoff indices created and equivalent defects

pointDefects()
Returns:The list of inequivalent point defects.
Return type:Vacancy | Substitutional | Interstitial | DefectCluster
processesPerDefect()
Returns:The number of processes to be assigned to calculating each defect. If None, all available processes should perform the calculation for each defect collaboratively.
Return type:int | None
results(discard_faulty=True)

Method for retrieving calculated defect studies.

Parameters:discard_faulty (bool) – Flag to determine whether faulty defect studies should be discarded.
Default: True
Returns:The list of defect studies stored on the object.
Return type:list of HarmonicChargedPointDefect
update()

Update all the harmonic charged point defect studies contained in the defect list.

wyckoffIndices()
Returns:The Wyckoff indices for the current defect list.
Return type:list of int

Directory name

DefectClusterList creates directory names with a structure

cluster/compact/constituents/sites/hash

For instance,

cluster/AsV4/Si_0+Si_0+Si_0+Si_0+As^Si_0/004+002+015+008/8510ca94d3b960045791f06a3741606f
  • All clusters are stored in a directory called cluster.
  • compact shows the usual cluster notation in TCAD, with I or V meaning interstitial/vacancy and the rest denoting non-native defects either in interstitial or substitutional positions. It is worth pointing that in the compact notation, a defect like BI2, represents several configurations:
    1. A boron interstitial and a native interstitial (1 boron and two atoms in interstitial positions).
    2. A substitutional boron and two native interstitials (also 1 boron and two atoms in interstitial positions).
  • constituents shows the names of all the constituent defects.
  • sites contains the name of sites occupied by the constituent defects.
  • hash is a hash string representing the material specifications.

Usage example

The following shows an example of use. It assumes there is an already defined Si_64_tersoff specification in MaterialSpecifications.

from SMW import *

reference = MaterialSpecificationsDatabase.Si_64_tersoff

vacancies = VacancyList(reference)

V3_clusters = DefectClusterList(
    [vacancies, vacancies, vacancies],
    (reference.firstNearestNeighbor() * .6, reference.firstNearestNeighbor * 1.2)
)
nlprint(V3_clusters)
V3_clusters.update()

nlsave('defects.hdf5', V3_clusters)

cluster_example.py

Notes

The order in which the defects are provided to DefectClusterList is important. Currently, different orders might produce different clusters, especially when the involved defects are different. The reason lies on how such clusters are build, by taking the first defect, adding the second at different positions, then the third, etc. The position of a \(n+1\) defect in the cluster depends on the distances to all the previous \(n\) defects, thus including a dependency with the order in which the constituent defects are specified.