DeformationPotential¶
- class DeformationPotential(configuration, hamiltonian_derivatives, dynamical_matrix, symmetry_label=None, kpoint_cartesian=None, kpoint_fractional=None, q_route=None, points_per_segment=None, q_path=None, electron_bands=None, phonon_modes=None, max_interaction_range=None, rotate_to_pure_spin_states=None)¶
Constructor for the DeformationPotential object.
- Parameters:
configuration (
BulkConfiguration
) – The BulkConfiguration for which to calculate the deformation potential.hamiltonian_derivatives (
HamiltonianDerivatives
) – The Hamiltonian derivatives for the configuration.dynamical_matrix (
DynamicalMatrix
) – The dynamical matrix for the configuration.symmetry_label (str) – The kpoint (as a symmetry point) for which to calculate the deformation potential. This option is mutually exclusive to
kpoint_cartesian
andkpoint_fractional
. Default: ‘G’ (Gamma-point)kpoint_cartesian (PhysicalQuantity of type inverse length) – The kpoint (in Cartesian coordinates) for which to calculate the deformation potential. This option is mutually exclusive to
symmetry_label
andkpoint_fractional
. Default:[0.0, 0.0, 0.0] * Angstrom**-1
Gamma-pointkpoint_fractional (list(3) of floats) – The kpoint (in fractional coordinates) for which to calculate the deformation potential. This option is mutually exclusive to
kpoint_cartesian
andsymmetry_label
. Default:[0.0, 0.0, 0.0]
Gamma-pointq_route (list of symmetry points, e.g.
['G', 'X', 'G']
) – The route to take through the Brillouin-zone. This option is mutually exclusive toq_path
. Default: Nonepoints_per_segment (int) – The number of points per segment of the route. This option is mutually exclusive to
q_path
. Default: 20q_path (list of list of floats) – List of fractional q-points. This option is mutually exclusive to
q_route
andpoints_per_segment
. The shape of the list is(:, 3)
, e.g.[[0.0, 0.0, 0.0], [0.25, 0.0, 0.0], [0.5, 0.0, 0.0]]
. Default: Noneelectron_bands (list of ints |
All
) – The band indices of the Bloch states to include. Default:All
Include all bands.phonon_modes (list of ints |
All
) – Phonon modes to include. Default:All
Include all phonon modes.maximum_interaction_range (PhysicalQuantity of type length) – Set the maximum range of the interactions in the
HamiltonianDerivatives
. Default: Nonerotate_to_pure_spin_states (bool) – Whether the eigenstates should be rotated to pure spin states or not. Default:
True
for Unpolarized, Polarized and Noncollinear,False
for SpinOrbit
- calculateDegenerateBandsDeformationPotential(initial_bands_degenerate, final_bands_degenerate, phonon_modes_degenerate, qpoint_indices=None, spin=None)¶
Method for fitting the deformation potential for a particular phonon mode.
- Parameters:
initial_bands_degenerate (list of ints) – Quantum number (band index) of the degenerate initial Bloch states.
final_bands_degenerate (list of ints) – Quantum number (band index) of the degenerate initial Bloch states.
phonon_modes_degenerate (list of ints) – Phonon mode indices that are degenerate.
qpoint_indices (list of ints) – Indices of the q-points where SVD is performed. Default: All q-points.
spin (
Spin.Up
|Spin.Down
) – The spin flag. Default:Spin.Up
.
- Returns:
The deformation potential singular value decomposition.
- Return type:
PhysicalQuantity array of type energy / length
- couplingMatrix()¶
Query method for the coupling matrix calculated in the Bloch basis.
- Returns:
Electron-phonon coupling matrix calculated with the
ElectronPhononCoupling
object. The shape of the coupling matrix is (number_of_spins, number_of_phonon_modes, number_of_kpoints, number_of_qpoints, number_of_electron_bands).- Return type:
PhysicalQuantity of type energy
- eigenvaluesK()¶
Query method for the electron Bloch state energies as a function of k.
- Returns:
The electron Bloch state energies as a function of k. The shape of the array is (number_of_spins, number_of_kpoints, number_of_electron_bands).
- Return type:
PhysicalQuantity of type energy
- eigenvaluesKMinusQ()¶
Query method for the electron Bloch state energies as a function of k-q.
- Returns:
The electron Bloch state energies as a function of k-q. The shape of the array is (number_of_spins, number_of_kpoints, number_of_qpoints, number_of_electron_bands).
- Return type:
PhysicalQuantity of type energy
- eigenvaluesKPlusQ()¶
Query method for the electron Bloch state energies as a function of k+q.
- Returns:
The electron Bloch state energies as a function of k+q. The shape of the array is (number_of_spins, number_of_kpoints, number_of_qpoints, number_of_electron_bands).
- Return type:
PhysicalQuantity of type energy
- electronBands()¶
Query method for the electron bands.
- Returns:
The list of electronic band indices used in the calculation.
- Return type:
list of int
- evaluate(coupling_matrix=None)¶
Query method for the electron-phonon coupling matrix.
- Returns:
Electron-phonon coupling matrix (unscaled) calculated with the
ElectronPhononCoupling
object. The shape of the coupling matrix is (n_spins, n_modes, n_kpoints, n_qpoints, n_bloch_states, n_bloch_states).- Return type:
PhysicalQuantity with the unit
eV / Angstrom
- fitDeformationPotential(mode=None, initial_band=None, final_band=None, spin=None, first_q_index=None, last_q_index=None, coupling_matrix=None, include_phase_factor=None)¶
Method for fitting the deformation potential for a particular phonon mode.
- Parameters:
mode (int) – Phonon mode index. Default: The first mode calculated
initial_band (int) – Quantum number (band index) of the initial Bloch state. Default: The first band calculated
final_band (int) – Quantum number (band index) of the final Bloch state. Default: The last band calculated
spin (
Spin.Up
|Spin.Down
) – The spin flag. Default:Spin.Up
first_q_index (int) – Index of the first q-point to consider in the fit. Default: 0
last_q_index (int) – Index of the last q-point to consider in the fit. Default: Last index
coupling_matrix (
'scaled'
|'unscaled'
) – String indicating if the scaled or unscaled coupling matrix should be plotted. Default:'unscaled'
include_phase_factor (bool) – Whether the phase factor is included or not. Default:
True
- Returns:
Fitted zeroth, first-order deformation potentials, model deviation and R squared.
- Return type:
PhysicalQuantity, PhysicalQuantity, PhysicalQuantity, numpy.array
- inverseCharacteristicLength()¶
Query method for inverse characteristic length.
- Returns:
The inverse characteristic length. The shape of the array is (number_of_degrees_of_freedom, number_of_qpoints)
- Return type:
PhysicalQuantity of type inverse length.
- kpoint()¶
Query method for the k-point.
- Returns:
The k-point the deformation potential is calculated for.
- Return type:
numpy.array
- metatext()¶
- Returns:
The metatext of the object or None if no metatext is present.
- Return type:
str | None
- nlinfo()¶
- Returns:
Structured information about the DeformationPotential.
- Return type:
dict
- nlprint(stream=None)¶
Print a string containing an ASCII table useful for plotting the AnalysisSpin object.
- Parameters:
stream (python stream) – The stream the table should be written to. Default:
NLPrintLogger()
- phaseFactor()¶
Query method for phase factor.
- Returns:
The phase factor. list of length of number_of_spins. For each spin the shape of the coupling matrix is (number_of_qpoints, number_of_electron_bands, number_of_electron_bands).
- Return type:
unitless array.
- phononEnergies()¶
Query method for the phonon energies.
- Returns:
The phonon energies as a function of q. The shape of the array is (number_of_degrees_of_freedom, number_of_qpoints), where number_of_degrees_of_freedom = 3*number_of_atoms.
- Return type:
PhysicalQuantity of type energy
- phononModes()¶
Query method for the phonon modes.
- Returns:
The list of phonon mode indices used in the calculation.
- Return type:
list of int.
- qRoute()¶
Query method for the q-route.
- Returns:
The route to taken through the Brillouin-zone in the calculation.
- Return type:
list of str
- qpoints()¶
Query method for the q-points.
- Returns:
The list of fractional q-points used in the calculation.
- Return type:
list
- setMetatext(metatext)¶
Set a given metatext string on the object.
- Parameters:
metatext (str | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.
- uniqueString()¶
Return a unique string representing the state of the object.
- unscaledCouplingMatrix()¶
Query method for the unscaled electron-phonon coupling matrix.
- Returns:
Electron-phonon coupling matrix calculated with the
ElectronPhononCoupling
object. The shape of the coupling matrix is (number_of_spins, number_of_phonon_modes, number_of_kpoints, number_of_qpoints, number_of_electron_bands).- Return type:
PhysicalQuantity with the unit
eV / Angstrom
Usage Examples¶
Calculate the deformation potential in graphene for different wave-vector paths in reciprocal space, specified by symmetry points connected by linear segments or a series of fractional q-points:
# -------------------------------------------------------------
# Bulk configuration
# -------------------------------------------------------------
lattice = Hexagonal(2.4612*Angstrom, 6.709*Angstrom)
elements = [Carbon, Carbon]
fractional_coordinates = [[0.0 , 0.0 , 0.5],
[0.333333333333, 0.666666666667, 0.5]]
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(5, 5, 1),
)
calculator = LCAOCalculator(
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()
# -------------------------------------------------------------
# Hamiltonian derivatives
# -------------------------------------------------------------
hamiltonian_derivatives = HamiltonianDerivatives(
bulk_configuration,
repetitions=(5, 5, 1),
)
# -------------------------------------------------------------
# Dynamical matrix
# -------------------------------------------------------------
dynamical_matrix = DynamicalMatrix(
bulk_configuration,
repetitions=(5, 5, 1),
max_interaction_range=10*Angstrom,
)
# -------------------------------------------------------------
# Deformation potential
# -------------------------------------------------------------
deformation_potential_1 = DeformationPotential(
bulk_configuration,
hamiltonian_derivatives,
dynamical_matrix,
symmetry_label='L',
q_route=['G', 'M', 'L', 'A', 'G', 'K', 'H', 'A'],
points_per_segment=30,
electron_bands=[0, 1, 2],
phonon_modes=[0, 1],
)
nlsave('graphene.nc', deformation_potential_1)
deformation_potential_2 = DeformationPotential(
bulk_configuration,
hamiltonian_derivatives,
dynamical_matrix,
kpoint_fractional=[0.0, 0.0, 0.5],
q_path=[[0.0, 0.0, 0.0], [0.2, 0.0, 0.0], [0.3, 0.0, 0.0], \
[0.4, 0.0, 0.0], [0.45, 0.0, 0.0], [0.5, 0.0, 0.0]],
electron_bands=[0, 1, 2],
phonon_modes=[0, 1],
)
nlsave('graphene.nc', deformation_potential_2)