aiida_vibroscopy.data.vibro_mixin
#
Mixin for aiida-vibroscopy DataTypes.
Module Contents#
Classes#
Mixin class for vibrational DataTypes. |
- class aiida_vibroscopy.data.vibro_mixin.VibrationalMixin[source]#
Mixin class for vibrational DataTypes.
This is meant to be used to extend aiida-phonopy DataTypes to include tensors and information for vibrational spectra.
- property raman_tensors[source]#
Get the Raman tensors in Cartesian coordinates.
Important
with Raman tensors we mean \(\frac{1}{\Omega}\frac{\partial \chi}{\partial u}\)
Note
Units in 1/Angstrom, normalized using the UNIT cell volume.
The shape should match the primitive cell.
- Indices are as follows:
Atomic index.
Atomic displacement index.
Polarization index (i.e. referring to electric field derivative).
Same as 3.
- Returns:
(number of atoms in the primitive cell, 3, 3, 3) shape array
- property nlo_susceptibility: numpy.ndarray[source]#
Get the non linear optical susceptibility tensor in Cartesian coordinates.
Note
the static \(\chi^{(2)}\)
- Returns:
(3,3,3) shape array
- set_raman_tensors(raman_tensors: list | numpy.ndarray)[source]#
Set the Raman tensors in Cartesian coordinates.
Important
with Raman tensors we mean \(\frac{1}{\Omega}\frac{\partial \chi}{\partial u}\)
Note
Units in 1/Angstrom, normalized using the UNIT cell volume.
The shape should match the primitive cell.
- Indices are as follows:
Atomic index.
Atomic displacement index.
Polarization index (i.e. referring to electric field derivative).
Same as 3.
- Parameters:
raman_tensors – (number of atoms in the primitive cell, 3, 3, 3) shape array
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- set_nlo_susceptibility(nlo_susceptibility: list | numpy.ndarray)[source]#
Set the non linear optical susceptibility tensor in Cartesian coordinates.
- Parameters:
dielectric – (3, 3, 3) array like
- Raises:
TypeError: if the format is not compatible or of the correct type
ValueError: if the format is not compatible or of the correct type
- has_raman_parameters() bool [source]#
Return wheter or not the Data has derivatives of susceptibility for Raman spectra.
- has_nlo() bool [source]#
Return wheter or not the Data has non linear optical susceptibility tensor.
- run_active_modes(degeneracy_tolerance: float = 1e-05, nac_direction: None | list[float, float, float] = None, selection_rule: str[raman] | str[ir] | None = None, sr_thr: float = 0.0001, **kwargs) tuple [source]#
Get active modes frequencies, eigenvectors and irreducible representation labels.
Inputs as in
compute_active_modes()
- Parameters:
nac_direction – (3,) shape list, indicating non analytical direction in Cartesian coordinates
selection_rule – str, can be raman or ir; it uses symmetry in the selection of the modes for a specific type of process.
sr_thr – float, threshold for selection rule (the analytical value is 0).
kwargs –
see also the
get_phonopy_instance()
method- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of numpy.ndarray (frequencies in cm-1, normalized eigenvectors, labels); normalized eigenvectors is an array of shape (num modes, num atoms, 3).
- run_raman_susceptibility_tensors(nac_direction: tuple[float, float, float] | None = None, with_nlo: bool = True, use_irreps: bool = True, degeneracy_tolerance: float = 1e-05, asr_sum_rules: bool = False, symmetrize_fc: bool = False, sum_rules: bool = False, **kwargs) tuple [source]#
Return the Raman susceptibility tensors, frequencies and representation labels.
Note
Units are:
Raman susceptibility tensors: Anstrom/AMU
Frequencies: cm-1
- Parameters:
nac_direction – non-analytical direction in Cartesian coordinates; (3,) shape list or numpy.ndarray
with_nlo – whether to use or not non-linear optical susceptibility correction (Froehlich term), defaults to True
use_irreps – whether to use irreducible representations in the selection of modes, defaults to True
asr_sum_rules – whether to apply acoustic sum rules to the force constants
symmetrize_fc – whether to symmetrize the force constants using space group
sum_rules – whether to apply sum rules to Raman tensors
kwargs –
see also the
get_phonopy_instance()
method- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of numpy.ndarray (Raman susc. tensors, frequencies, irreps labels)
- run_polarization_vectors(nac_direction: tuple[float, float, float] | None = None, use_irreps: bool = True, degeneracy_tolerance: float = 1e-05, asr_sum_rules: bool = False, symmetrize_fc: bool = False, sum_rules: bool = False, **kwargs) tuple [source]#
Return the polarization vectors, frequencies and representation labels.
Note
Units are:
- Intensities:
(Debey/Angstrom)^2/AMU
- Frequencies:
cm-1
- Parameters:
nac_direction – non-analytical direction in Cartesian coordinates; (3,) shape
list
ornumpy.ndarray
use_irreps – whether to use irreducible representations in the selection of modes, defaults to True
asr_sum_rules – whether to apply acoustic sum rules to the force constants
symmetrize_fc – whether to symmetrize the force constants using space group
sum_rules – whether to charge neutrality to effective charge tensors
kwargs –
keys of
get_phonopy_instance()
method- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of
numpy.ndarray
(polarization vectors, frequencies, irreps labels)
- run_single_crystal_raman_intensities(pol_incoming: tuple[float, float, float], pol_outgoing: tuple[float, float, float], frequency_laser: float = 532, temperature: float = 300, absolute: bool = True, **kwargs) tuple [source]#
Return polarized single crystal Raman intensities.
Note
Units are:
Intensities: sterad^-1 cm^-2 (if absolute==True)
Frequencies: cm-1
- Parameters:
pol_incoming – light polarization vector of the incoming light (laser) in Cartesian coordinates;
list
ornumpy.ndarray
of shape (3,)pol_outgoing – light polarization vector of the outgoing light (scattered) in Cartesian coordinates;
list
ornumpy.ndarray
of shape (3,)frequency_laser – laser frequency in nanometers
temperature – temperature in Kelvin
absolute – whether to use the prefactor for absolute theoretical cross-section units
kwargs –
keys of
run_raman_susceptibility_tensors()
method- with_nlo: whether to use or not non-linear optical susceptibility
correction (Froehlich term), defaults to True
- nac_direction:
non-analytical direction in Cartesian coordinates
- use_irreps:
whether to use irreducible representations in the selection of modes, defaults to True; bool, optional
- degeneracy_tolerance:
degeneracy tolerance for irreducible representation
- asr_sum_rules:
whether to apply acoustic sum rules to the force constants
- symmetrize_fc:
whether to symmetrize the force constants using space group
- sum_rules:
whether to apply sum rules to Raman tensors
- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of numpy.ndarray (Raman intensities, frequencies, labels)
- run_powder_raman_intensities(quadrature_order: int | None = None, frequency_laser: float = 532, temperature: float = 300, absolute: bool = True, **kwargs) tuple [source]#
Return powder Raman intensities.
- ..important: it computes the common setups of polarized (HH) and depolarized (HV)
scattering. To obtain the total powder intensities, sum the two returned arrays of the intensities.
Note
Units are:
Intensities: sterad^-1 cm^-2 (if absolute==True)
Frequencies: cm-1
- Parameters:
quadrature_order – algebraic order to perform the integration on the sphere of nac directions
frequency_laser – laser frequency in nanometers
temperature – temperature in Kelvin
absolute – whether to use the prefactor for absolute theoretical cross-section units
kwargs –
keys of
run_raman_susceptibility_tensors()
method- with_nlo: whether to use or not non-linear optical susceptibility
correction (Froehlich term), defaults to True
- nac_direction:
non-analytical direction in Cartesian coordinates
- use_irreps:
whether to use irreducible representations in the selection of modes, defaults to True; bool, optional
- degeneracy_tolerance:
degeneracy tolerance for irreducible representation
- asr_sum_rules:
whether to apply acoustic sum rules to the force constants
- symmetrize_fc:
whether to symmetrize the force constants using space group
- sum_rules:
whether to apply sum rules to Raman tensors
- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of numpy.ndarray (Raman intensities HH, Raman intensities HV, frequencies, labels)
- run_single_crystal_ir_intensities(pol_incoming: tuple[float, float, float], **kwargs) tuple [source]#
Return polarized single crystal IR intensities.
Note
Units are:
Intensities: (Debey/Angstrom)^2/AMU
Frequencies: cm^-1
- Parameters:
pol_incoming – light polarization vector of the incident beam light in Cartesian coordinates;
list
ornumpy.ndarray
of shape (3,)kwargs –
keys of
compute_polarization_vectors()
method- nac_direction:
non-analytical direction in Cartesian coordinates
- use_irreps:
whether to use irreducible representations in the selection of modes, defaults to True
- degeneracy_tolerance:
degeneracy tolerance for irreducible representation
- asr_sum_rules:
whether to apply acoustic sum rules to the force constants
- symmetrize_fc:
whether to symmetrize the force constants using space group
- sum_rules:
whether to apply charge neutrality to effective charge tensors
- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of numpy.ndarray (intensities, frequencies, labels). Units are:
- Intensities:
(Debey/Angstrom)^2/AMU
- Frequencies:
cm^-1
- run_powder_ir_intensities(quadrature_order: int | None = None, **kwargs) tuple [source]#
Return powder IR intensities, frequencies, and labels.
Note
Units are:
Intensities: (Debey/Angstrom)^2/AMU
Frequencies: cm^-1
- Parameters:
quadrature_order – algebraic order to perform the integration on the sphere of nac directions
kwargs –
keys of
compute_polarization_vectors()
method- nac_direction:
non-analytical direction in Cartesian coordinates
- use_irreps:
whether to use irreducible representations in the selection of modes, defaults to True; bool, optional
- degeneracy_tolerance:
degeneracy tolerance for irreducible representation
- asr_sum_rules:
whether to apply acoustic sum rules to the force constants
- symmetrize_fc:
whether to symmetrize the force constants using space group
- sum_rules:
whether to apply charge neutrality to effective charge tensors
- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
tuple of numpy.ndarray (intensities, frequencies, labels). Units are: * Intensities: (Debey/Angstrom)^2/AMU * Frequencies: cm^-1
- run_complex_dielectric_function(freq_range: str | numpy.ndarray = 'auto', gammas: float | list[float] = 12.0, nac_direction: None | list[float, float, float] = None, use_irreps: bool = True, degeneracy_tolerance: float = 1e-05, sum_rules: bool = False, **kwargs) numpy.ndarray [source]#
Return the frequency dependent complex dielectric function (tensor).
- Parameters:
freq_range – frequency range in cm^-1; set to auto for automatic choice
gammas – list or single value of broadenings, i.e. full width at half maximum (FWHM)
nac_direction – (3,) shape list, indicating non analytical direction in Cartesian coordinates
use_irreps – whether to use irreducible representations in the selection of modes, defaults to True
degeneracy_tolerance – degeneracy tolerance for irreducible representation
sum_rules – whether to apply charge neutrality to effective charges
kwargs –
see also the
get_phonopy_instance()
method- subtract_residual_forces:
whether or not subract residual forces (if set); bool, defaults to False
- symmetrize_nac:
whether or not to symmetrize the nac parameters using point group symmetry; bool, defaults to self.is_symmetry
- Returns:
(3, 3, num steps) shape
numpy.ndarray
, num steps refers to the number of frequency steps where the complex dielectric function is evaluated
- run_normal_reflectivity_spectrum(q_direction: int, **kwargs) numpy.ndarray [source]#
Return the normal reflectivity spectrum in the infrared regime.
- Parameters:
q_direction – orthogonal direction index of the complex dielectric function tensor probed
kwargs – see the arguments of
run_complex_dielectric_function()
- Returns:
(frequency points, reflectance value) shape
numpy.ndarray