# dfpt keywords

DFPT calculator

## dfpt.asr

\[asrDyMat asrZstar asrRaman\], if active asr\* applies the sum rule to:
Dynmat(the dynamical matrix to enforce the accoustic sum rule),
Zstar(Born effective charges to corrects charge neutrality of the
system), Raman(the Raman tensor to enforce the accoustic sum rule)

**type**: `array`

**default**: `[1,1,1]`

**size**: `[1,3]`

**example**: `dfpt.asr = [1,1,1]`

## dfpt.dielectricData

Ion-clamped dielectric tensor which is required to perform a dfpt
post-analysis calculation.

**type**: `string`

**example**: `dfpt.dielectricData = './results/si_dielectric'`

## dfpt.eField

Static electric field perturbations used in \'dfpt-dielectric\'
(ion-clamped dielectric tensor) calculations. The keyword should be set
to a matrix of coloumn-vectors. The corresponding polarizations will be
returned in a matrix of the same shape. Three linearly independent
directions are required to obtain the dielectric tensor. The magnitude
of the electric field influences the magnitude of the polarization, but
not the dielectric tensor.

**type**: `array`

**default**: `[[1,0,0];[0,1,0];[0,0,1]]`

**example**: `dfpt.eField = [1 0 0;0 1 0;0 0 1]`

## dfpt.elphTemperature

Physical temperature used in obtaining the occupation number of
electrons and phonons energy levels. It is used in calculating
electron-phonon related self-energies.

**type**: `array`

**default**: `[5,64,123,182,241,300]`

**example**: `dfpt.elphTemperature = 5:50:300`

## dfpt.elphZcut

Smearing parameter used in calculating real and imaginary parts of
electron self-energy due to electron-phonon coupling. It has the units
of energy and is in Hartree by default. The energy units can be
controlled using units.energy.

**type**: `scalar`

**default**: `0.0001`

**example**: `dfpt.elphZcut = 0.001`

## dfpt.ramanIncPhotonWav

Wavelength of incoming photon used in \'dfpt-raman\' calculations. It
can be passed in Bohr or once used with \'units.length = \'Angestrom\'
\' in Angestrom. The default value is equal to 4500 Angstrom (450 nm).

**type**: `scalar`

**default**: `4500`

**example**: `dfpt.ramanIncPhotonWav = 3.7795e+03`

## dfpt.ramanIncPhotonPol

Polarization of incoming photon used in \'dfpt-raman\' calculations. The
keyword accept array of row-vectors where each row determines
polarization of an incoming photon in Cartesian coordinates, corresponds
to the direction of incoming photon determined by the same row of
\"dfpt.qpointKdirect\". The given polarization should be perpendicular
to propagation direction.

**type**: `array`

**default**: `[[0,0,1];[1,0,0];[0,1,0]]`

**example**: `dfpt.ramanIncPhotonPol = [1 0 0;0 0 1]`

## dfpt.ramanOutPhotonPol

Polarization of outgoing photon used in \'dfpt-raman\' calculations. The
keyword accept array of row-vectors where each row determines
polarization of an outgoing photon in Cartesian coordinates, corresponds
to the given incoming photon and polarization determined by the same row
of \"dfpt.qpointKdirect\" and \"dfpt.ramanIncPhotonPol\". The given
outgoing polarization should be perpendicular to propagation direction
of outgoing photon detected in Raman experiment.

**type**: `array`

**default**: `[[0,0,1];[1,0,0];[0,1,0]]`

**example**: `dfpt.ramanOutPhotonPol = [1 0 0;0 1 0]`

## dfpt.ramanTemperature

Temperature in Kelvin which is used in calculating phonons statistics in
\'dfpt-raman\' calculations.

**type**: `scalar`

**default**: `300`

**example**: `dfpt.ramanTemperature = 100`

## dfpt.method

Determines the algorithm for solving stermheimer equation.
\'sternheimer\' uses a bicgstab in real-space. \'cfsi\' uses perturbed
Chebyshev-filtered subspace iteration method.

**type**: `string`

**default**: `'sternheimer'`

**allowed**: `'cfsi', 'sternheimer'`

**example**: `dfpt.method = 'cfsi'`

## dfpt.opticDamping

Determines the damping factor in atomic units used in Lorentzian
broadening of real and imaginary part of dielectric permittivity, and
the Raman spectrum.

**type**: `scalar`

**example**: `dfpt.opticDamping = 0.05`

## dfpt.pertBlock

Divides total number of atomic displacements perturbations into seperate
calculations with the given number, ordered with respect to: q-point,
atom and direction. It generates seperate input file for each
calculation where non self-consistent quantites must always be
calculated at first.

**type**: `scalar`

**default**: `1`

**example**: `dfpt.pertBlock = 5`

## dfpt.pertIndex

Perturbation indices. The calculation will be limited to the specified
perturbations, ordered with respect to: q-point, atom and direction.

**type**: `array`

**default**: `0`

**example**: `dfpt.pertIndex = 4:6`

## dfpt.phononData

Necessary lattice-dynamics information to perform a dfpt post-analysis
calculation.

**type**: `string`

**example**: `dfpt.phononData = './results/si_phonon'`

## dfpt.projTol

Spectral radius of the valence projection operator. The Sternheimer
equation includes valence manifold projection operators. If dfpt.projTol
= -1, the whole valence manifold is taken into account. If dfpt.projTol
is set to a positive value, the wave-functions whose eigenvalue falls
within a radius dfpt.projTol with respect to the energy of the
Sternheimer equation are taken into account. This lowers the
computational cost, but a small value may result in numerical
instability.

**type**: `scalar`

**default**: `-1`

**example**: `dfpt.projTol = 0.1`

## dfpt.qpointGridn

dfpt.qpointGridn is a \[1x3\] array determining the q-sampling grid. For
example, if dfpt.qpointGridn = \[4 4 4\], a 4x4x4 uniform grid is used
for q-sampling. The default grid type is dfpt.qpointType =
\'MonkhorstPack\'. In band structure calculations, dfpt.qpointType =
\'line\', dfpt.qpointGridn is a scalar determining the total number of
points along the q-point line. The q-points are distributed as uniformly
as possible.

**type**: `array`

**default**: `[1,1,1]`

**size**: `[1,3]`

**example**: `dfpt.qpointGridn = [4 4 4]`

## dfpt.qpointCartesian

dfpt.qpointCartesian contains a list of row-vectors representing the
Cartesian coordinates of the q-points in a DFPT calculation. The keyword
is usually relevant in \'dfpt-phonon-bs\', \'dfpt-optic\',
\'dfpt-raman\' calculations, in which it specifies the reciprocal space
line or direction of incident electric fields on material (along which
LO-TO splitting occurs). dfpt.qpointCartesian has precedence over
Monkhors-Pack mesh generation and default q-point lines. It can also be
a path pointing to a file containing the reduced coordinates of q-points
in the form of row vectors.

**type**: `array`

**size**: `[inf,3]`

**example**: `dfpt.qpointCartesian = [1,0,0;0,1,0;0,0,1]`

## dfpt.qpointKdirect

dfpt.qpointKdirect contains a list of row-vectors representing the
reduced coordinates of the q-points of a DFPT calculation. The keyword
is usually relevant in \'dfpt-phonon-bs\', \'dfpt-optic\',
\'dfpt-raman\' calculations, in which it specifies the reciprocal space
line or direction of incident electric fields on material (along which
LO-TO splitting occurs). dfpt.qpointKdirect has precedence over
Monkhors-Pack mesh generation and default q-point lines. It can also be
a path pointing to a file containing the reduced coordinates of q-points
in the form of row vectors.

**type**: `array`

**size**: `[inf,3]`

**example**: `dfpt.qpointKdirect = qline.xyz`

## dfpt.qpointShift

Shift the q-point grid uniformly. Monkhorst-Pack grids are
gamma-centered for odd grids and shifted by \[0.5,0.5,0.5\] for even
grids. An even grid can be gamma-centered by setting dfpt.qpointShift =
\[0.5,0.5,0.5\], for instance.

**type**: `array`

**default**: `[0,0,0]`

**size**: `[1,3]`

**example**: `dfpt.qpointShift = [0.5,0.5,0.5]`

## dfpt.qpointSympoints

List of points defining the q-point line in a phonon band structure
calculation. The points can be string labels or q-points in direct
coordinates. If sympoints is not defined, a line going along the
different edges of the irreducible Brillouin zone is automatically
generated.

**type**: `cell array`

**example**: `dfpt.qpointSympoints = {'L','G','X','W','K'}`

## dfpt.qpointType

\'MonkhorstPack\' is used to perform integrals over the Brillouin zone;
\'line\' is used to plot band structures.

**type**: `string`

**default**: `'MonkhorstPack'`

**allowed**: `'MonkhorstPack','line'`

**example**: `dfpt.qpointType = 'MonkhorstPack'`

## dfpt.saveEPImat

Determines whether EPI matrix to be saved in output \'h5\' file

**type**: `scalar`

**default**: `false`

**allowed**: `true,false`

**example**: `dfpt.saveEPImat = true`

## dfpt.saveElectronVelocity

Determines whether electrons group velocities to be saved in output
\'h5\' file

**type**: `scalar`

**default**: `false`

**allowed**: `true,false`

**example**: `dfpt.saveElectronVelocity = true`

## dfpt.saveElectronSE

Determines whether electrons self-energy due to electron-phonon
interactions to be saved in output \'h5\' file

**type**: `scalar`

**default**: `false`

**allowed**: `true,false`

**example**: `dfpt.saveElectronSE = true`

## dfpt.saveElectronTau

Determines whether electrons scattering times due to electron-phonon
interactions to be saved in output \'h5\' file

**type**: `scalar`

**default**: `false`

**allowed**: `true,false`

**example**: `dfpt.saveElectronTau = true`

## dfpt.type

Determines the type of dfpt calculation. \'phonon\' calculates dynamical
matrix C(q) for a set of q-points. \'dielectric\' calculates ion-clamped
dielectric tensor. \'interatomic-force-constant\' calculated C(R) for a
supercell corresponds to q-mesh used for C(q).\'band-structure\' is used
for calculating phonon dispersion.

**type**: `string`

**allowed**:
`'phonon', 'dielectric', 'band-structure', 'interatomic-force-constant'`

**example**: `dfpt.type = 'phonon'`
