VibPolTensor

The VibPolTensor class allows to compute the vibrational polarizability tensor (actually only its mean value for the moment).

class mybigdft.workflows.vibpoltensor.VibPolTensor(infrared, e_cut=200)[source]

Bases: mybigdft.workflows.workflow.AbstractWorkflow

This class allows to run all the calculations enabling the computation of the vibrational polarizability tensor of a given system.

One therefore needs to compute the infrared spectrum 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.

Finally, given these intensities and energies, one can compute the mean value of the polarizability tensor.

From an infrared spectrum calculation, one is able to compute the mean vibrational polarizability. One only needs to use the normal modes that are physically relevant, and not all the numerical normal modes: the latter contain some artificial modes that should have zero energy and zero intensity. They only add noise to the calculation of the vibrational polarizabily tensor, hence the need for a cut-off energy e_cut to use only the normal modes with an energy higher than that user-defined value.

Parameters
  • infrared (InfraredSpectrum) – Infrared spectrum workflow.

  • e_cut (float) – If phonons have a lower energy than e_cut, they are not considered in the computation of the vibrational polarizability tensor (units: cm^-1).

property infrared
Returns

Infrared spectrum workflow.

Return type

InfraredSpectrum

property e_cut
Returns

Cut-off energy considered in the computation of the vibrational polarizability tensor (units: cm^-1).

Return type

float

property mean_polarizability
Returns

Mean vibrational polarizability (units: atomic).

Return type

float

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

post_proc()[source]

Compute and set the mean vibrational polarizability of the considered system (units: atomic).

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.