Vibrational analysis with ASE

If the ASE module is present, it can be used to calculate numerical vibrational frequencies and IR intensities in parallel. See the ASE documentation for a detailed overview of its capabilities. The VibrationsJob class provides an easy to use interface to the ase.vibrations.Vibrations class, allowing for parallel calculations of single-point gradients and therefore speeding up any Frequency calculation by a factor equal to the atomic displacements beeing calculated. The IRJob class is a child of VibrationsJob and provides access to the ase.vibrations.Infrared class.

Example

settings = Settings()
settings.input.symmetry = 'nosym'
settings.input.basis.type = 'DZ'
settings.input.basis.core = 'None'
settings.input.xc.gga = 'PBE'
settings.input.basis.createoutput = 'None'
settings.input.noprint = 'logfile'
settings.input.gradient = True
#Use previously converged coefficients to speed up convergence - saves a lot of CPU time!!
#settings.input.restart._h = os.path.join(os.getcwd(),'restart.t21')+' &'
#settings.input.restart.nogeo = True

mol = Molecule('mol.xyz') # read Molecule from mol.xyz

irJob = IRJob(molecule=mol, settings=settings, aseVibOpt={ 'indices': [1], 'nfree': 4 })

irJob.run()

ir = irJob.results.get_ASEVib()
ir.summary(method='Frederiksen')

API

class VibrationsJob(molecule, settings, jobType=ADFJob, get_gradients='get_gradients', reorder='inputOrder', aseVibOpt={})[source]

Class for calculating numerical Frequencies in parallel using arbitrary interfaces. This is achieved using the Vibrations class from ASE.

  • moleculeMolecule object (most propably in the chosen Methods optimized state)
  • settingsSettings instance for all Single-Point jobs to be run. Don’t forget reference to a restart file if you want to save a lot of computer time!
  • jobTypeJob Class you want to use.
  • get_gradients – Function name to retrieve gradients of the Results object of your chosen jobType.results. Must take options eUnit='eV' and lUnit='Angstrom'.
  • reorder – Function name of jobType.results to reorder gradients to input order, set to None if not applicable.
  • aseVibOpt – Options for ase.vibrations.Vibrations.__init__

The self.__init__() method calls on ase.vibrations.Vibrations.run to create all displacements, then adds them as children. After running, the self.postrun() method reads the gradients from all single-points and saves them according to the ASE scheme. Finally the ASE Vibrations object is made accessible in self.results.get_ASEVib for the retrieval of the ASE results.

__init__(molecule, settings, jobType=<class 'scm.plams.interfaces.adfsuite.adf.ADFJob'>, get_gradients='get_gradients', reorder='inputOrder', aseVibOpt={})[source]

Initialize self. See help(type(self)) for accurate signature.

new_children()[source]

Generate new children jobs.

This method is useful when some of children jobs are not known beforehand and need to be generated based on other children jobs, like for example in any kind of self-consistent procedure.

The goal of this method is to produce a new portion of children jobs. Newly created jobs should be returned in a container compatible with self.children (e.g. list for list, dict for dict). No adjustment of newly created jobs’ parent attribute is needed. This method cannot modify _active_children attribute.

The method defined here is a default template, returning None, which means no new children jobs are generated and the entire execution of the parent job consists only of running jobs initially found in self.children. To modify this behavior you can override this method in a MultiJob subclass or you can use one of Binding decorators, just like with Prerun and postrun methods.

postrun()[source]

Actions to take just after the actual job execution.

This method is initially empty, it can be defined in subclasses or directly added to either the whole class or a single instance using Binding decorators.

class VibrationsResults(job)[source]

A Class for handling numerical Vibrational analysis Results.

Use get_ASEVib() to access the ase.vibrations.Vibrations object. Using e.g. self.get_ASEVib().summary() the results of the ASE frequency calculation are accessible.

get_ASEVib()[source]

Returns a ase.vibrations.Vibrations object if available

class IRJob(molecule, settings, jobType=ADFJob, get_gradients='get_gradients', reorder='inputOrder', get_dipole_vector='get_dipole_vector', aseVibOpt={})[source]

Subclass of VibrationsJob to calculate IR modes and intensities.

Usage is the same as for the parent class, see VibrationsJob.

Additional arguments:

  • __init__: get_dipole_vector, must take argument unit='au'
__init__(molecule, settings, jobType=<class 'scm.plams.interfaces.adfsuite.adf.ADFJob'>, get_gradients='get_gradients', reorder='inputOrder', get_dipole_vector='get_dipole_vector', aseVibOpt={})[source]

Initialize self. See help(type(self)) for accurate signature.

postrun()[source]

Actions to take just after the actual job execution.

This method is initially empty, it can be defined in subclasses or directly added to either the whole class or a single instance using Binding decorators.