Raman spectrum

The RamanSpectrum class allows to compute the normal modes and their respective Raman intensities, allowing one to study the Raman spectrum.

class mybigdft.workflows.ramanspectrum.RamanSpectrum(phonons, ef_amplitudes=None, order=1)[source]

Bases: mybigdft.workflows.workflow.AbstractWorkflow

This class allows to run all the calculations enabling the computation of the Raman spectrum of a given system, that is its normal modes of vibration (or phonons) associated to a given energy and a Raman intensity. The so-called depolarization ratios of each phonon mode are also be computed.

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 Raman intensities (or activities) of the spectrum, one must compute the derivative of the polarizability tensor along the normal modes. To that end, one must compute the polarizability tensor at each of the positons used to get the vibrational energies, and this means applying an external electric field along each coordinate. One calculation per space coordinate lead to 3 extra calculations, meaning that \(18 n_{at}\) additional BigDFT standard calculations are required to obtain a Raman spectrum intensities, leading to \(24 n_{at}\) calculations in total.

From a phonon calculation, one is able to compute the Raman spectrum of a given system by only specifying the electric field amplitudes used to compute the polarizability tensor at each out-of-equilibrium positions used to compute the phonons.

Parameters
  • phonons (Phonons) – Phonon energies workflow.

  • ef_amplitudes (list or numpy array of length 3) – Amplitude of the electric field to be applied in the three directions of space (\(x\), \(y\), \(z\)).

  • order (int) – Order of the numerical differentiation used to compute the polarizability tensors that are then used to compute the Raman intensities. If second (resp. first) order, then six (resp. three) calculations per atom are to be performed.

property phonons
Returns

Workflow allowing to compute the phonon energies of the system under consideration.

Return type

Phonons

property energies
Returns

Phonon energies of the system (units: cm^-1).

Return type

numpy.array or None

property intensities
Returns

Raman intensities of the phonons (units: Ang^4.amu^-1).

Return type

list or None

property depolarization_ratios
Returns

Depolarization ratios of the phonons.

Return type

list or None

property poltensor_workflows
Returns

Polarizability tensor workflows to be performed in order to compute the Raman intensities.

Return type

list

post_proc()[source]

Compute the Raman intensities and depolarization ratio of each normal mode and set their values (you can access their values via the attributes intensities and depolarization_ratios, 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.