HarmonicChargedPointDefect

class HarmonicChargedPointDefect(charged_point_defect, phonon_calculator=None, dynamical_matrix_processes_per_task=None, assumed_formation_entropy=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 the atomic_chemical_potentials of the charged point defect object.
  • phonon_calculator (Calculator) – The calculator used for performing phonon calculations. Note that the calculator is taken as a reference corresponding to the bulk unit cell given in the charged_point_defect study; the density_mesh_cutoff and k_point_sampling parameters of the NumericalAccuracyParameters of the calculator will be scaled consistently with the supercell size.
    Default: The relaxation_calculator used in the given charged_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.
    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.
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:ChargedPointDefect
defectConfiguration(supercell_repetitions, charge_state)

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.
Returns:

The defect supercell configuration. If not available, returns None.

Return type:

BulkConfiguration | None

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, 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 the charged_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 the valence band maximum.
    Default: 0.0 * eV
  • 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
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
objectId()
Returns:The name of the study object in the file.
Return type:str
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
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
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.