cctk.VibrationalMode

class cctk.VibrationalMode(frequency, force_constant, reduced_mass, intensity, displacements)[source]

Bases: object

Most code adapted from jprogdyn. Displacements will be very low accuracy unless freq=hpmodes is enabled.

Values from Gaussian, for now: see https://gaussian.com/vib/.

frequency

frequency, in cm-1

Type:

float

force_constant

force constant, in kcal/mol per Å

Type:

float

reduced_mass

mass, in amus

Type:

float

intensity

IR intensity

Type:

float

displacements

atom displacements

Type:

cctk.OneIndexedArray

velocities

atom velocities

Type:

cctk.OneIndexedArray

__init__(frequency, force_constant, reduced_mass, intensity, displacements)[source]

Methods

__init__(frequency, force_constant, ...)

choose_level([temperature])

classical_distribution_value(x)

Returns the value of the classical distribution at the specified x value.

classical_turning_point([energy])

Returns the maximum allowed shift based on modelling the mode as a classical harmonic oscillator (e.g. the point where potential energy is maximum).

energy([level])

Calculate energy as a function of level.

from_string()

quantum_distribution_max([level, num_pts])

Returns the maximum value of psi**2 for the quantum harmonic oscillator at a given level.

quantum_distribution_value(x[, level])

Calculate psi**2 for quantum harmonic oscillator for a given shift in Å.

random_displacement([energy, level, method, ...])

param energy:

energy of mode (for classical case)

to_string()

choose_level(temperature=298)[source]
classical_distribution_value(x)[source]

Returns the value of the classical distribution at the specified x value.

classical_turning_point(energy=None)[source]

Returns the maximum allowed shift based on modelling the mode as a classical harmonic oscillator (e.g. the point where potential energy is maximum).

Parameters:
  • energy (float) – energy of mode

  • level (int) – level to compute energy for quantum harmonic oscillator

energy(level=0)[source]

Calculate energy as a function of level. By default returns zero-point energy (level = 0).

Parameters:

level (int) – which vibrational level the mode is in

Returns:

energy (kcal/mol)

from_string()[source]
quantum_distribution_max(level=0, num_pts=10000.0)[source]

Returns the maximum value of psi**2 for the quantum harmonic oscillator at a given level.

quantum_distribution_value(x, level=0)[source]

Calculate psi**2 for quantum harmonic oscillator for a given shift in Å.

Parameters:
  • x (float) – shift in Å

  • level (int) – vibrational level

random_displacement(energy=None, level=0, method='quasiclassical', max_attempts=100000.0)[source]
Parameters:
  • energy (float) – energy of mode (for classical case)

  • method (str) – “quasiclassical” or “classical”

  • level (int) – which vibrational level

  • max_attempts (int) – how many tries you get

Returns:

shift

to_string()[source]