DefectDiffusivity¶
- class DefectDiffusivity(neb, initial_defect, final_defect, charge_state=None, defect_vibrations=None, minimum_displacement=None, finite_difference=None, finite_difference_method=None)¶
A class that stores thermodynamic data needed to calculate a defect’s diffusivity. It requires input from an updated
NudgedElasticBand
configuration andChargedPointDefectConfiguration
of the NEB’s endpoints.- Parameters:
neb (
NudgedElasticBand
) – The updated nudged elastic band configuration.initial_defect (
ChargedPointDefectConfiguration
) – The initial defect.final_defect (
ChargedPointDefectConfiguration
) – The final defect.charge_state (int) – The charge state to calculate the diffusivity for.
defect_vibrations (ReducedDynamicalMatrix | UseDefault) – Select method for calculating transition state vibrations. The flag
ReducedDynamicalMatrix
calculates the vibrational correction only for atoms that contribute significantly to the reaction coordinate. This approximation assumes that the contributions to the partition function from static atoms at the reactant and transition state cancel out. Choosing this method is recommended when the calculation of the complete dynamical matrix is unfeasible with a given phonon calculator. NOTE: This value will trigger a re-calculation of the vibrational correction of the supplied defects using the reduced dynamical matrix. This is necessary in order to treat all configurations, including the transition state, on equal footing. The flagUseDefault
uses the same method as the optimized charge point defects to calculate the transition state vibrations. If no vibrations are included in these defects, vibrations are not calculated in the transition state. Default: UseDefault.minimum_displacement (PhysicalQuantity of type length | None) – The minimum distance that an atom must move during the reaction in order to be included in the calculation. If an atom moves further than this distance, it and its neighbors will be included in the dynamical matrix calculation that is needed for the frequencies and phonon density of states. Setting this value to zero will include all degrees of freedom. Setting this value to a larger number will reduce the amount of work needed to calculate the prefactor, but will decrease the accuracy. Default:
0.05 * Angstrom
finite_difference (PhysicalQuantity of type length) – The finite difference step size used when calculating the vibrational corrections. This parameter is only used when
minimum_displacement
is not None. Default:0.01*Angstrom
finite_difference_method (
Central
|Forward
) – The finite difference method to use when calculating the vibrational corrections. This parameter is only used whenminimum_displacement
is not None. Default:Central
- calculateDiffusivity(temperature=None, migration_distance=None, diffusion_dimensionality=None, coordination_number=None, correlation_factor=None, defect_type=None, enable_finite_size_corrections=False, include_vibrations=False, assumed_transition_prefactor=PhysicalQuantity(10000000000000.0, 1 / s))¶
Calculate the macroscopic diffusivity of both defects forming the endpoints of the supplied NEB.
- Parameters:
temperature (PhysicalQuantity of type temperature) – The temperature at which the diffusivity should be calculated. Default: 300 * Kelvin.
migration_distance (PhysicalQuantity of type distance) – The migration distance of the defect. By default, the initial and final defect configurations will be compared to find the atom that moves most, which will then be used to calculate the distance. Default: Automatic.
diffusion_dimensionality (int) – The dimensionality of the diffusion. I.e 1, 2 or 3D. Default: 3.
coordination_number (int) – The coordination number of the defect. One value that will be used for both the initial and final defect. With the automatic setting, the coordination number is determined based on the bonded neighbors of the atom moving the longest distance. Default: Automatic.
correlation_factor (float) – The correlation factor of subsequent hops of the defect. The correlation factor can take values between 0 and 1. A value of 1 means no correlation. Default: 1.
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
. Note that this parameter only has an effect ifband_gap_calculator
is different fromformation_energy_calculator
. Default:DeepLevelDefect
.enable_finite_size_corrections (bool) – Whether to include finite size corrections for the supercell in the calculation of the formation energy. Default:
False
.include_vibrations (bool) – Whether vibrational terms are included, if available. That includes the migration entropy, harmonic prefactor and vibrational contribution to the internal energy. Default:
False
.assumed_transition_prefactor (PhysicalQuantity of type frequency) – The assumed prefactor for this transition. This parameter is only used if
include_vibrations
is False. Default: 10**13 * Second**(-1)
- Returns:
The calculated diffusivities of the initial and final defect.
- Return type:
tuple of (initial diffusivity, final diffusivity)
- calculateRateConstants(temperature=None, defect_type=None, enable_finite_size_corrections=False, include_vibrations=False, assumed_transition_prefactor=PhysicalQuantity(10000000000000.0, 1 / s))¶
Calculate the rate constants between the defects forming the endpoints of the supplied NEB.
- Parameters:
temperature (PhysicalQuantity of type temperature) – The temperature at which the diffusivity should be calculated. Default: 300 * Kelvin.
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
. Note that this parameter only has an effect ifband_gap_calculator
is different fromformation_energy_calculator
. Default:DeepLevelDefect
.enable_finite_size_corrections (bool) – Whether to include finite size corrections for the supercell in the calculation of the formation energy. Default:
False
.include_vibrations (bool) – Whether vibrational terms are included, if available. That includes the migration entropy, harmonic prefactor and vibrational contribution to the internal energy. Default:
False
.assumed_transition_prefactor (PhysicalQuantity of type frequency) – The assumed prefactor for this transition. This parameter is only used if
include_vibrations
is False. Default: 10**13 * Second**(-1)
- Returns:
The calculated rate constant of the initial and final defect.
- Return type:
tuple of (initial rate, final rate) as PhysicalQuantity of type frequency.
- chargeState()¶
- Returns:
The charge state to calculate the diffusivity for.
- Return type:
int
- defectVibrations()¶
- Returns:
Whether the harmonic transition state theory approximation was used.
- Return type:
bool
- finalDefect()¶
- Returns:
The final defect.
- Return type:
- finalFrequencies()¶
- Returns:
The final vibrational frequencies.
- Return type:
PhysicalQuantity of type inverse time | None
- finalPhononDOS()¶
- Returns:
The final defect phonon DOS.
- Return type:
PhononDensityOfStates
| None
- finiteDifference()¶
- Returns:
The finite difference step size used when calculating the vibrational corrections.
- Return type:
PhysicalQuantity of type length | None
- finiteDifferenceMethod()¶
- Returns:
The finite difference method used when calculating the vibrational corrections.
- Return type:
Central
|Forward
| None
- initialDefect()¶
- Returns:
The initial defect.
- Return type:
- initialFrequencies()¶
- Returns:
The initial vibrational frequencies.
- Return type:
PhysicalQuantity of type inverse time | None
- initialPhononDOS()¶
- Returns:
The initial defect phonon DOS.
- Return type:
PhononDensityOfStates
| None
- migrationEnergies(temperature=None, defect_type=None, enable_finite_size_corrections=False, include_vibrations=False)¶
Calculate the migration energies of both defects from the charged point defect formation internal energies.
- Parameters:
temperature (PhysicalQuantity of type temperature) – The temperature at which the diffusivity should be calculated. Default: 300 * Kelvin.
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
. Note that this parameter only has an effect ifband_gap_calculator
is different fromformation_energy_calculator
. Default:DeepLevelDefect
.enable_finite_size_corrections (bool) – Whether to include finite size corrections for the supercell in the calculation of the formation energy. Default:
False
.include_vibrations (bool) – Whether vibrational terms are included. Default:
False
.
- Returns:
The calculated migration internal energies of the initial and final defect.
- Return type:
tuple of (initial migration internal energy, final migration internal energy)
- migrationEnergiesFromNEB(temperature=None, include_vibrations=False)¶
Calculate the migration energies of both defects from the supplied NEB.
- Parameters:
temperature (PhysicalQuantity of type temperature) – The temperature at which the diffusivity should be calculated. Default: 300 * Kelvin.
include_vibrations (bool) – Whether vibrational terms are included. Default:
False
.
- Returns:
The calculated migration energies of the initial and final defect.
- Return type:
tuple of (initial migration internal energy, final migration internal energy)
- minimumDisplacement()¶
- Returns:
The minimum displacement used to determine the vibrational contributions.
- Return type:
PhysicalQuantity of type length
- neb()¶
- Returns:
The nudged elastic band configuration.
- Return type:
- phononCalculator()¶
- Returns:
The calculator used for determining the phonon contributions.
- Return type:
- tsDefect()¶
- Returns:
The transition state defect.
- Return type:
- tsFrequencies()¶
- Returns:
The transition state vibrational frequencies.
- Return type:
PhysicalQuantity of type inverse time | None
- tsIndex()¶
- Returns:
The transition state image index.
- Return type:
int
- tsPhononDOS()¶
- Returns:
The transition state defect phonon DOS.
- Return type:
PhononDensityOfStates
| None
- uniqueString()¶
Return a unique string representing the state of the object.
- vibrationsAvailable()¶
- Returns:
Whether the vibrational corrections are available.
- Return type:
bool
Notes¶
The DefectDiffusivity object calculates the diffusivity of a defect diffusion path.
This object is created by supplying a NudgedElasticBand of the diffusion pathway,
ChargedPointDefectConfiguration objects for the initial and final defects and the charge
state of the defect transition. The barrier of the diffusion path is obtained from the transition
state determined by the NEB. The defect diffusivity can then be calculated calling the
calculateDiffusivity
method with various parameters such as temperature.