5.3.7. 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.

5.3.7.1. 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')

5.3.7.2. 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.

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'