Infrared spectrum¶
The InfraredSpectrum
class allows to compute the normal modes
and their respective infrared intensities, allowing one to study the
infrared spectrum.
-
class
mybigdft.workflows.infraredspectrum.
InfraredSpectrum
(phonons)[source]¶ Bases:
mybigdft.workflows.workflow.AbstractWorkflow
This class allows to run all the calculations enabling the computation of the infrared spectrum of a given system, that is its normal modes of vibration (or phonons) associated to a given energy and an infrared intensity.
One therefore needs to compute the phonons first. This is done by solving the dynamical matrix (the eigenvalues giving the phonon energies and the eigenvectors the normal modes). This matrix is computed at the expense of \(6 n_{at}\) BigDFT calculations, where each atom is in turns translated by a small amount around its equilibrium positions. You may want to refer to the
Phonons
class for more details.To get the intensities of the infrared spectrum, one must compute the derivative of the dipole moment along the normal modes. All the necessary dipole moments to use are readily found in the logfiles of the BigDFT calculations performed to compute the phonons: no extra calculation is required.
From a phonon calculation, one is able to compute the infrared spectrum of a given system by only measuring the dipole moment at each out-of-equilibrium positions used to compute the phonons.
- Parameters
phonons (Phonons) – Phonon energies workflow.
-
property
phonons
¶ - Returns
Workflow allowing to compute the phonon energies of the system under consideration.
- Return type
-
property
energies
¶ - Returns
Phonon energies of the system (units: cm^-1).
- Return type
numpy.array or None
-
property
intensities
¶ - Returns
Infrared intensities of the phonons (units: (D/Ang)^2.amu^-1).
- Return type
list or None
-
property
Z
¶ - Returns
Matrix measuring the derivative of the dipole moment with respect to atomic displacements (units: (D/A).amu^-1/2).
- Return type
numpy array of dimension \(3 * 3 n_{at}\)
-
property
Zbvs
¶ - Returns
Intensities of the phonons.
- Return type
list or None
-
post_proc
()[source]¶ Compute the infrared intensities, the Z matrix and the Z matrices for each normal mode and set their values (you can access their values via the attributes
intensities
,Z
andZbvs
, respectively).
-
property
is_completed
¶ - Returns
True if all the post-processing attributes are no longer set to their default value.
- Return type
bool
-
property
logfiles
¶ - Returns
A dictionary of all the logfiles of the workflow, with the name of the associated job as key.
- Return type
dict
-
property
queue
¶ - Returns
All the jobs of the workflow.
- Return type
list
-
run
(nmpi=1, nomp=1, force_run=False, dry_run=False, restart_if_incomplete=False, timeout=None)¶ Run all the calculations if the post-processing was not already performed.
Warning
If force_run or dry_run is set to True, then any previous value of the post-processing attributes is deleted and set back to their default value, so that the post-processing is not considered as being performed.
- Parameters
nmpi (int) – Number of MPI tasks.
nomp (int) – Number of OpenMP tasks.
force_run (bool) – If True, the calculations are run even though a logfile already exists.
dry_run (bool) – If True, the input files are written on disk, but the bigdft-tool command is run instead of the bigdft one.
restart_if_incomplete (bool) – If True, the job is restarted if the existing logfile is incomplete.
timeout (float or int or None) – Number of minutes after which each job must be stopped.
- Warns
UserWarning – If the post-processing was already completed.