ElectricFieldGradients¶
- class ElectricFieldGradients(configuration, atom_indices=None)¶
Class for calculating and representing the electric field gradients at the atomic nuclei.
- Parameters:
configuration (
BulkConfiguration
) – Configuration with a calculator that supports EFG calculations.atom_indices (
All
| list of ints.) – The indices of the atoms for which to calculate the electric field gradient. Default:All
i.e. all atoms in the configuration.
- atomIndices()¶
- Returns:
The atom indices.
- Return type:
list of int.
- evaluate()¶
Get the electric field gradient tensors for each atom.
- Returns:
A list of electric field gradient tensors.
- Return type:
list
- evaluatePrincipalAxis()¶
Determine the principel axis (eigenvectors and eigenvalues of the EFG tensor) for each atom.
- Returns:
The principel axis for each atom.
- Return type:
two ndarray
- evaluatePrincipelAxisComponents()¶
Determine the principel axis components for each atom.
- Returns:
The principel axis components and asymmetry parameter for each atom.
- Return type:
tuple of 2 lists
- evaluateQuadrupoleCouplingConstants(quadrupole_moments=None)¶
Determine the quadrupole coupling constants for each atom.
- Parameters:
quadrupole_moments (list | None | Automatic) – List of quadrupole moments for each atom in units of Barns. If Automatic, the quadrupole moment is taken from Pekka Pyykkö (2018): Year-2017 nuclear quadrupole moments, Molecular Physics, DOI: 10.1080/00268976.2018.1426131 select non zero quadrupole moment for isotope of highest abbundance. Default: 1 Barn = 1.e-28*m^2
- Returns:
The quadrupole coupling constants and asymmetry parameter for each atom.
- Return type:
tuple of 2 lists
- metatext()¶
- Returns:
The metatext of the object or None if no metatext is present.
- Return type:
str | None
- 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()
- quadrupoleMoments(atom_index, quadrupole_moments=None)¶
Returns the quadrupole moment of the atom index in the configuration.
- Parameters:
atom_index (int) – The atom index in the configuration.
quadrupole_moments (None | Automatic) – If Automatic, the quadrupole moment is taken from Pekka Pyykkö (2018): Year-2017 nuclear quadrupole moments, Molecular Physics, DOI: 10.1080/00268976.2018.1426131 select non zero quadrupole moment for isotope of highest abbundance. Default: 1 Barn = 1.e-28*m^2.
- Returns:
The quadrupole moment of the atom index in the configuration.
- Return type:
PhysicalQuantity
- 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.
Usage Examples¶
Calculate the electric field gradient of silicon, save it to a file, and print out the quadrupole coupling constant:
# Set up silicon crystal.
bulk_configuration = BulkConfiguration(
bravais_lattice=FaceCenteredCubic(5.4306 * Angstrom),
elements=[Silicon, Silicon],
cartesian_coordinates=[[ 0. , 0. , 0.],
[ 1.35765, 1.35765, 1.35765]] * Angstrom
)
# Setup calculator.
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(6, 6, 6),
)
# Setup PAW data set.
basis_set = [
PAWPBEGPAW.Silicon,
]
# Setup plane wave calculator.
calculator = PlaneWaveCalculator(
basis_set=basis_set,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
bulk_configuration.setCalculator(calculator)
bulk_configuration.update()
# Electric Field Gradients.
efg_analysis = ElectricFieldGradients(
configuration=bulk_configuration,
atom_indices=All,
)
nlsave('si_efg.hdf5', efg_analysis)
# Print out the quadrupole coupling constant.
print('Quadrupole coupling constants')
print(efg_analysis.evaluateQuadrupoleCouplingConstants())
Notes¶
The quadrupole coupling constant is defined as
where \(e\) is the absolute value of the electron charge, \(h\) the plank constant and \(q\) is the nuclear quadrupolar momentum.
\(V_{zz}\) is the largest eigenvalue of the diagonalized traceless electric field gradient tensor at the nucleus:
where \(\rho(\mathbf{r})\) is the charge neutral nuclear and all electron density. \(i, j\) denote Cartesian coordinates