aiida_vibroscopy.calculations.numerical_derivatives_utils
#
Calcfunctions utils for numerical derivatives workchain.
Module Contents#
Functions#
|
Return an array with the central derivatives coefficients. |
|
Calculate the central difference derivatives. |
Return the Raman (1/Angstrom) and the non-linear optical susceptibility (pm/V) tensors. |
|
|
Return high frequency dielectric and Born charge tensors using central difference schemes. |
- aiida_vibroscopy.calculations.numerical_derivatives_utils.get_central_derivatives_coefficients(accuracy: int, order: int) list[int] [source]#
Return an array with the central derivatives coefficients.
Implementation following Math. Comp. 51 (1988), 699-706.
- aiida_vibroscopy.calculations.numerical_derivatives_utils.central_derivatives_calculator(step_size: float, order: int, vector_name: str, data_0: aiida.orm.TrajectoryData, **field_data: aiida.orm.TrajectoryData)[source]#
Calculate the central difference derivatives.
The accuracy of the central finite difference is determined by the number of keys in data.
- Parameters:
step_size – step size for finite differenciation
order – order of the derivative
vector_name – either forces or electronic_dipole_cartesian_axes
data – trajectory data for a particular direction in space; it is expected to be given with stringed numbers as labels, in the order: \([c_1, c_{-1}, c_2, c_{-2}, \\dots , c_0]\) where \(c_i\) is the coefficient for f(i*step_size)
- aiida_vibroscopy.calculations.numerical_derivatives_utils.compute_susceptibility_derivatives(preprocess_data: aiida_phonopy.data.PreProcessData, electric_field: aiida.orm.Float, diagonal_scale: aiida.orm.Float, accuracy_order: aiida.orm.Int, **kwargs) dict [source]#
Return the Raman (1/Angstrom) and the non-linear optical susceptibility (pm/V) tensors.
- ..note:
If the numerical accuracy order is greater than 2, arrays at lower orders are given as well.
Units are 1/Angstrom for Raman tensors, normalized using the UNITCELL volume.
Units are pm/V for non-linear optical susceptibility
Raman tensors indecis: (atomic, atomic displacement, electric field, electric field)
- Returns:
dictionaries of numerical accuracies with
ArrayData
having keys: * raman_tensors containing (num_atoms, 3, 3, 3) arrays; * nlo_susceptibility containing (3, 3, 3) arrays; * units asDict
containing the units of the tensors.
- aiida_vibroscopy.calculations.numerical_derivatives_utils.compute_nac_parameters(preprocess_data: aiida_phonopy.data.PreProcessData, electric_field: aiida.orm.Float, accuracy_order: aiida.orm.Int, **kwargs) dict [source]#
Return high frequency dielectric and Born charge tensors using central difference schemes.
- ..note:
- Units are in atomic units, meaning:
Dielectric tensor in vacuum permittivity units.
Born charges in electric charge units.
Born charges tensors indecis: (atomic, electric field, atomic displacement)
- Returns:
dictionary with ArrayData having keys: * born_charges as containing (num_atoms, 3, 3) arrays * dielectric as containing (3, 3) arrays.