SusceptibilityDerivatives¶
- class SusceptibilityDerivatives(configuration, filename, object_id, atomic_displacement=None, finite_difference_method=None, kpoints=None, bands_below_fermi_level=None, bands_above_fermi_level=None, broadening=None, processes_per_displacement=1, log_filename_prefix=None, use_symmetry=None)¶
Constructor for the SusceptibilityDerivatives object.
- Parameters:
configuration (
BulkConfiguration
) – The bulk configuration with an attached calculator for which to calculate the optical spectrum.filename (str) – The full or relative path to save the results to. See
nlsave()
.object_id (str) – The object id to use when saving. See
nlsave()
.atomic_displacement (PhysicalQuantity of type length) – The distance the atoms are displaced in the finite difference method. Default:
0.01 * Angstrom
finite_difference_method (
Forward
|Central
) – The finite difference scheme to use. Default:Central
kpoints (sequence (size 3) of int |
MonkhorstPackGrid
|KpointDensity
) – The k-points for which to calculate the transitions. Default: The Monkhorst-Pack grid used for the self-consistent calculation.bands_below_fermi_level (int) – The maximum number of valence band states per principal spin channel to include at each k-point. Default:
25
bands_above_fermi_level (int) – The maximum number of conduction band states per principal spin channel to include at each k-point. Default:
25
broadening (PhysicalQuantity of type energy) – The broadening parameter used for the optical spectrum. Default:
0.1 * eV
processes_per_displacement (int) – The number of processes assigned to calculating a single displacement. Default: 1 process per displacement.
log_filename_prefix (str or None) – Prefix for the filenames where the logging output for every displacement calculation is stored. The filenames are formed by appending a number and the file extension (“.log”). If a value of None is given then all logging output is done to stdout. Default:
"susceptibility_displacement_"
- atomicDisplacement()¶
- Returns:
The distance the atoms are displaced in the finite difference method.
- Return type:
PhysicalQuantity with length unit
- bandsAboveFermiLevel()¶
- Returns:
The maximum number of conduction band states per principal spin channel to include at each k-point.
- Return type:
Int.
- bandsBelowFermiLevel()¶
- Returns:
The maximum number of valence band states per principal spin channel to include at each k-point.
- Return type:
Int.
- broadening()¶
- Returns:
The broadening parameter used for the optical spectrum.
- Return type:
PhysicalQuantity of type energy
- dependentStudies()¶
- Returns:
The list of dependent studies.
- Return type:
list of
Study
- filename()¶
- Returns:
The filename where the study object is stored.
- Return type:
str
- finiteDifferenceMethod()¶
- Returns:
The finite difference scheme to use.
- Return type:
Central
|Forward
- kpoints()¶
- Returns:
The k-points for which optical spectrum is calculated.
- 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 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
- processesPerDisplacement()¶
- Returns:
The number of processes per displacement.
- Return type:
int
- saveToFileAfterUpdate()¶
- Returns:
Whether the study is automatically saved after it is updated.
- Return type:
bool
- susceptibilityDerivatives(spin=None)¶
Return the derivative of the susceptibility.
- symmetry()¶
- Returns:
True if the use of crystal symmetry to reduce the number of displacements is enabled.
- Return type:
bool
- uniqueString()¶
Return a unique string representing the state of the object.
- update()¶
Run the calculations for the SusceptibilityDerivatives study object.
Usage Examples¶
Note
Study objects behave differently from analysis objects. See the Study object overview for more details.
Calculate the SusceptibilityDerivatives
for a system with a \(25\times25\times25\) kpoint-sampling used for the optical spectrum.
susceptibility_derivatives = SusceptibilityDerivatives(
bulk_configuration,
filename=filename,
object_id='sd',
kpoints=MonkhorstPackGrid(25, 25, 25),
log_filename_prefix=None,
use_symmetry=False)
susceptibility_derivatives.update()
Notes¶
The SusceptibilityDerivatives
is calculated using the finite difference
method in the basic unit cell.
In the following, we denote the Cartesian coordinates by \(\alpha, \beta\) and the index of a degree of freedom by \(l\). The high frequency dielectric constant is related to the susceptibility as \(\epsilon^{\infty}_{\alpha \beta}=\delta_{\alpha,\beta}+4\pi \chi_{\alpha \beta}(\omega=0)\). The derivative of the dielectric susceptibility tensor, \(\chi(\omega=0)\), is therefore given by
and is a real tensor, i.e. a matrix for each degree of freedom.
Degree of freedom \(l\) is displaced by \(\Delta r_l\) and \(-\Delta
r_l\), and the changes in the dielectric constant, \(\Delta \epsilon^{\infty}_{\alpha \beta}\) are
calculated to approximate the susceptibility derivative elements.
The derivative is calculated by either forward
or central
finite
differences, where we above focused on the latter.
SusceptibilityDerivatives calculations can be performed for DFT or Semi-Empirical calculators supporting the OpticalSpectrum
.
The object includes functionality to fully resume partially completed calculations by re-running the
same script or reading the study object from file and calling update()
on
it. The study object will automatically detect which displacement
calculations have already been carried out and only run the ones that are not
yet completed.
When calculating the SusceptibilityDerivatives
with ATK-DFT, accurate results
may require a higher precision than usual by increasing the density_mesh_cutoff
in NumericalAccuracyParameters
and decreasing the tolerance
in
IterationControlParameters
, e.g.
numerical_accuracy_parameters = NumericalAccuracyParameters(
density_mesh_cutoff=150.0*Hartree
)
iteration_control_parameters = IterationControlParameters(
tolerance=1e-6
)