HarmonicChargedPointDefect¶
- class HarmonicChargedPointDefect(charged_point_defect, relax_atomic_coordinates=None, phonon_calculator=None, dynamical_matrix_processes_per_task=None, assumed_formation_entropy=None, resume=None)¶
Constructor for the HarmonicChargedPointDefect object.
- Parameters:
charged_point_defect (
ChargedPointDefect
) – The charged point defect study for which the phonon contributions will be calculated. The study must only contain one supercell repetitions value. The atomic partial entropies used for calculating the entropy contributions will be extracted for each element from theatomic_chemical_potentials
of the charged point defect object.relax_atomic_coordinates (bool) – Whether to relax the atomic coordinates of the defect supercells. May be needed if configurations in the ChargedPointDefect were not fully relaxed. Default:
True
phonon_calculator (Calculator) – The calculator used for performing phonon calculations. The calculator must contain a basis set for the elements in the defect configuration. Note that the calculator is taken as a reference corresponding to the bulk unit cell given in
bulk_configuration
in thecharged_point_defect
study; thedensity_mesh_cutoff
andk_point_sampling
parameters of theNumericalAccuracyParameters
of the calculator will be scaled consistently with the supercell size. Thek_point_sampling
will be scaled to maintain the k-point density approximately equal to the reference. The k-point grid will always be shifted such that the Gamma point is included, i.e.,shift_to_gamma=True
. Default: The calculator given inrelaxation_calculator
in thecharged_point_defect
study.dynamical_matrix_processes_per_task (int) – The number of processes that will be used to execute each task for DynamicalMatrix study objects. If this value is greater than or equal to the total number of available processes, each single task will be executed collaboratively over all processes. Otherwise, a delegator-worker scheme is used; in this case, one process will be set aside as the delegator, and the remaining ones will be grouped into workers and execute tasks concurrently. Dynamical calculations are run in serial, independently on the tasks and not affected by those. In other words, if there is more than 1 phonon calculation each is run in serial versus the others, but each one uses this parameter to allow internal parallelism (by computing the displacements in parallel). Default: All available processes execute each task collaboratively.
assumed_formation_entropy (PhysicalQuantity of type entropy) – The assumed formation entropy of the defect associated with this HarmonicChargedPointDefect object. Setting this parameter will disable all phonon contributions. Default: Phonon contributions will be calculated.
resume (bool) – Whether reruning the simulation will resume non converged results Default: False
- assumedFormationEntropy()¶
- Returns:
The assumed formation entropy of the defect associated with this HarmonicChargedPointDefect object. If None, the phonon contributions are calculated explicitly.
- Return type:
PhysicalQuantity | None
- atomNumberDifferences()¶
- Returns:
The atom number differences for each element.
- Return type:
dict of type {
PeriodicTableElement
: int}
- atomicChemicalPotentials()¶
- Returns:
The atomic chemical potential for all the required elements. If an element for which the atomic chemical potential needs to be calculated is not present, it is calculated from the pristine cell at each supercell size.
- Return type:
list of
AtomicChemicalPotential
- chargeStates()¶
- Returns:
The list of all calculated and not calculated charge states. Any charge state which has not yet been calculated will be calculated the next time the object is updated.
- Return type:
list of int
- chargedPointDefect()¶
- Returns:
The charged point defect study, for which the harmonic corrections will be calculated.
- Return type:
- defectConfiguration(supercell_repetitions, charge_state, symmetry_index=None, unit_cell_translation=None)¶
Retrieve the defect supercell configuration for a given supercell.
This result will only be available after the calculation ran successfully.
- Parameters:
supercell_repetitions (sequence (size 3) of int) – The number of repetitions of the bulk unit cell along the (a, b, c) directions.
defect_charge_state (int) – The charge state of the defect.
symmetry_index (int) – The index of the symmetry operation for the pristine unit cell to apply to the defect supercell configuration. Note that this can only be used if the ‘calculate_defect_symmetry’ option has been enabled for the calculation. Default: No transformation (i.e., the identity operation)
unit_cell_translation (sequence (size 3) of int) – An additional translation to apply in terms of the unit cell vectors. Default: No translation
- Returns:
The defect supercell configuration. If not available, returns None.
- Return type:
BulkConfiguration
| None
- defectSymmetry(supercell_repetitions, charge_state)¶
Calculate the symmetry information for the defect supercell.
This result will only be available after the calculation ran successfully.
- Parameters:
supercell_repetitions (sequence (size 3) of int) – The number of repetitions of the bulk unit cell along the (a, b, c) directions.
defect_charge_state (int) – The charge state of the defect.
- Returns:
The symmetry information for the defect supercell. If not available, returns None.
- Return type:
dict | None
- dependentStudies()¶
- Returns:
The list of dependent studies.
- Return type:
list of
Study
- dynamicalMatrixProcessesPerTask()¶
- Returns:
The number of processes that will be used to execute each task for DynamicalMatrix study objects.
- Return type:
int
- filename()¶
- Returns:
The filename where the study object is stored.
- Return type:
str
- formationEnergy(charge_state, electronic_chemical_potential=None, electronic_chemical_potential_reference=None, defect_type=None, supercell_repetitions=None, enable_finite_size_corrections=None, temperature=None)¶
Determines the formation energy with harmonic corrections for a given charge state \(q\) of the defect, which is defined as
\(E_f^{\mathrm{harmonic}, q} = E_f^q + E^{\mathrm{def}}_{\mathrm{vib}} - E^{\mathrm{pr}}_{\mathrm{vib}}\),
where the first term is the formation energy in the given
charged_point_defect
study, and the second and third terms correspond to the defect and pristine vibrational energies, respectively.The vibrational energy is defined as
\(E_{\mathrm{vib}} = G + TS\),
where G is the vibrational free energy, T is the temperature and S is the vibrational entropy.
If
assumed_formation_entropy
has been specified, the vibrational energies won’t be included, i.e., the method returns \(E_f^q\) from thecharged_point_defect
object.- Parameters:
charge_state (int) – The charge state of the defect.
electronic_chemical_potential (PhysicalQuantity of type energy) – The electronic chemical potential relative to
electronic_chemical_potential_reference
. Default:0.0 * eV
electronic_chemical_potential_reference (
ValenceBandEdge
|ConductionBandEdge
) – The reference level for the electronic chemical potential. Default:ValenceBandEdge
defect_type (
DeepLevelDefect
|ShallowAcceptor
|ShallowDonor
) – The assumption of the type of defect to use for aligning the transition levels in the band gap calculated withband_gap_calculator
; see the documentation ofChargedPointDefect
for more details. Note that this parameter only has an effect ifband_gap_calculator
is different fromformation_energy_calculator
. Default:DeepLevelDefect
supercell_repetitions (sequence (size 3) of int |
ExtrapolationScheme
) – The number of repetitions of the bulk unit cell along the (a, b, c) directions. If ExtrapolationScheme, the extrapolation to the infinite supercell size limit is used. Default: The largest calculated supercell.enable_finite_size_corrections (bool) – Whether to include finite size corrections for the supercell in the calculation of the formation energy. Default:
True
temperature (PhysicalQuantity of type temperature) – The temperature used for calculating the formation energy. Default:
300.0 * Kelvin
- Returns:
The calculated formation energy.
- Return type:
PhysicalQuantity of type energy
- formationEntropy(temperature=None)¶
Determines the formation entropy for a given defect, defined as
\(S_f^{\mathrm{harmonic}} = S^{\mathrm{def}}_{\mathrm{vib}} - S^{\mathrm{pr}}_{\mathrm{vib}} - \sum_i \Delta n_i s_i\)
where the first and second terms correspond to the defect and pristine entropies, respectively, and the third term is the sum of the atomic partial entropies.
If
assumed_formation_entropy
has been specified, the method returns that value instead.- Parameters:
temperature (PhysicalQuantity of type temperature) – The temperature used for calculating the formation entropy. Default:
300.0 * Kelvin
- Returns:
The calculated formation entropy, or the user-specified entropy if
assumed_formation_entropy
has been given.- Return type:
PhysicalQuantity of type entropy
- isUpdated()¶
Returns whether the defect was successfully updated
- logFilenamePrefix()¶
- Returns:
The filename prefix for the logging output of the study.
- Return type:
str |
LogToStdOut
- nlprint(stream=None)¶
Print a string containing an ASCII table useful for plotting the Study object.
- Parameters:
stream (python stream) – The stream the table should be written to. Default:
NLPrintLogger()
- numberOfProcessesPerTask()¶
- Returns:
The number of processes to be used to execute each task. If None, all available processes should execute each task collaboratively.
- Return type:
int | None |
ProcessesPerNode
- numberOfProcessesPerTaskResolved()¶
- Returns:
The number of processes to be used to execute each task. Default values are resolved based on the current execution settings.
- Return type:
int
- objectId()¶
- Returns:
The name of the study object in the file.
- Return type:
str
- optimizeGeometryParameters()¶
- Returns:
Parameters required to optimize the geometry.
- Return type:
- phononCalculator()¶
- Returns:
The calculator which will be used for determining the phonon contributions.
- Return type:
Calculator
- pointDefect()¶
- Returns:
The point defect associated with the charged point defect study.
- Return type:
Vacancy
|Substitutional
|Interstitial
|DefectCluster
|SplitInterstitial
- pristineSymmetryData()¶
Retrieve the symmetry information for the pristine unit cell.
This result will only be available after the calculation ran successfully.
- Returns:
The symmetry information for the pristine unit cell. If not available, returns None.
- Return type:
dict | None
- resume()¶
- Returns:
Whether non converged simulations are to be resumed
- Return type:
bool
- saveToFileAfterUpdate()¶
- Returns:
Whether the study is automatically saved after it is updated.
- Return type:
bool
- supercellRepetitionsList()¶
- Returns:
The list of all calculated and not calculated supercells of the bulk unit cell, each given as the number of repetitions of the bulk unit cell along the (a, b, c) directions. Any supercell which has not yet been calculated will be calculated the next time the object is updated.
- Return type:
list of tuple (size 3) of int
- tasksFinished()¶
- Returns:
finished task, unfinished tasks
- Return type:
tuple of list of str, list of str
- uniqueString()¶
Return a unique string representing the state of the object.
- update()¶
Performs the calculations for the harmonic charged point defect study, i.e., the dynamical matrix calculations for the pristine and defect configurations and the corresponding phonon density of states. If
assumed_formation_entropy
is specified, phonon contributions are assumed to be fixed and won’t be calculated.The defect phonon density of states is calculated for the supercell with a zero charge state.