CDTK.Interfaces.GamessUSInterface module

class CDTK.Interfaces.GamessUSInterface.gamess(**opts)[source]

Bases: object

dt_efield(t=0.0, Dt=0.1)[source]

Return array with x,y,z components of dE/dt (field time derivative) obtained from a finite difference calculation.

Input: t — current time in au. Dt — step length for finite differences in au.

Output: dEdt — 3 vector of the current value of the derivative of the electric field in au.

efield(t=0.0)[source]

Return array with x,y,z components of the electric fields.

Input: t — current time in au.

Output: E — 3 vector of the current value of the electric field in au.

energy_CIS(X, **opts)[source]

Calculate energy of excited states at the configuration interaction singles (CIS) level of theory (zero-th order accuracy)

X - nuclear coordinates (AU)

energy_HF(X, Time=0.0, **opts)[source]

Hartree-Fock energy calculation. Optionally with electric fields.

Input: X – 3N array of atomic positions, in Bohr (au). Time – current time in au.

Output: e – energy obtained from Gamess (in Hartree).

energy_HF_HOMO(X, Time=0.0, **opts)[source]

Hartree-Fock energy calculation. Returns the HF energy and the energy of the HOMO. Optionally with electric fields. TODO not working correctly as orbitals are not correctly printed - needs to be fixed

X – 3N array of atomic positions, in Bohr (au)

energy_HF_KOOPMANS(X, Time=0.0, **opts)[source]

Hartree-Fock energy calculation. Returns the HF energy plus energy of the excited states by Koopmans’ theorem.

E(1) = -E_HOMO E(2) = -E_HOMO-1 etc.

X – 3N array of atomic positions, in Bohr (au)

energy_gradient_HF(X, Time=0.0, **opts)[source]

Hartree-Fock energy and gradient calculation. Optionally with electric fields.

This function is useful for ground state dynamics in the presence of electric fields of (in principle) arbitrary strength that are non-ressonant with electronic transitions but which affect nuclear motion. The electronic structure is solved with explicit inclusion of the electric field (if present) by gamess-us.

Input: X – 3N array of atomic positions, in Bohr (au). Time – current time in au.

Output: e – energy obtained from Gamess (in Hartree). g – 3N array of gradient obtained from Gamess (in Hartree / Bohr).

hessian(X, **opts)[source]

Calculation of the Hessian matrix

Input: X - 3N array of atomic positions [a.u.]

Output: H - 3Nx3N array of Hessian in a.u.

init_input_options(iopts)[source]

This functions sets input options.

Input: iopts — Input options as a dictonary, where the key defines the variable and the value is a list with the value of the variable as first entry.

mcqdpt(X, Time=0.0, **opts)[source]
mcscf(X, Time=0.0, **opts)[source]

MCSCF field calculation

It provides the energy and gradient of the ground or an excited state at the mcscf level of theory TODO OV: parsing of the energy does not work properly if only one state (the GS) is calculated. This should be eventually corrected.

Input: X – 3N array of atomic positions, in Bohr (au). Time – current time in au.

Output: e – array of M energies obtained from Gamess (in Hartree). g – Array of M 3N arrays of gradient obtained from Gamess (in Hartree / Bohr).

nacme(X, Time=0.0, **opts)[source]

MCSCF field calculation followed by a calculation of the NAC vector

It provides the energy, gradient on each state, nacme vector between states and dipola matrix elements.

Input: X – 3N array of atomic positions, in Bohr (au). Time – current time in au.

Output: e – array of M energies obtained from Gamess (in Hartree). g – Array of M 3N arrays of gradient obtained from Gamess (in Hartree / Bohr). d – Array of MxM 3N arrays of non-adiabatic couplings in au. m – Array of MxMx3 transition dipole matrix elements in Debye.

optimize(X, **opts)[source]

Returns the optimized geometry [XYZ, Angstrom]

Input: X - 3N array of initial atomic positions [a.u.]

Output: X0 - 3N array of optimized atomic positions [a.u.]

read_input_template(fname)[source]

This function reads in a template for setting up a Gamess calculation.

Input: fname — Name of the file (including path) that contains the template.

run(X, **opts)[source]

Run a Gamess-US calculation

gamess.itemplate must be assigned

CDTK.Interfaces.GamessUSInterface.parse_hessian(fdatname)[source]

Function to parse a hessian from a dat file. The block containing the Hessian data starts with a line containing one whitespace and $HES. Then an irrelevant line follows, then the Hessian data (TODO describe format) and the block ends with a line containing one whitespace and $END.

Input: fdatname — Filename (including path) of the dat file to parse.

Output: H — 3Nx3N array containing the Hessian in au.