atomli.vibrations
Generated from the public Python surface of Atomli 0.1.18.
Harmonic vibrational analysis from analytical Hessians.
The default requires an analytical Hessian from the attached calculator. An unavailable analytical derivative raises NotImplementedError. Select method=‘resident_finite_difference’ explicitly for a retained native force session. Supported MLIP models batch each stencil. NequIP GPU sessions retain their device displacement and force-difference path.
from atomli.build import moleculefrom atomli.calculators.qc import QCfrom atomli.vibrations import Vibrations
atoms = molecule("H2O")atoms.calc = QC(xc="PBE")Vibrations(atoms).run().summary()Vibrations(atoms, indices=None, name='vib', delta=0.01, nfree=2, method='analytical')
Section titled “Vibrations(atoms, indices=None, name='vib', delta=0.01, nfree=2, method='analytical')”Harmonic frequencies and modes for an Atoms object.
Mirrors ase.vibrations.Vibrations. The physics runs natively; this
class is the ASE-shaped surface over it.
atoms: Atoms carrying a native atomli calculator on.calc.indices: Active atom indices;Nonemeans every unconstrained atom. A subset selects rows and columns from the full analytical Hessian.name: Prefix for files written bywrite_mode.method:"analytical"(default) or"auto"alias require analytical derivatives."resident_finite_difference"selects a native two- or four-point force stencil.
get_energies(self)
Section titled “get_energies(self)”Mode energies in eV as a complex array.
Imaginary modes carry their magnitude in the imaginary part, which is
ASE’s convention and what summary marks with an i.
get_frequencies(self)
Section titled “get_frequencies(self)”Mode frequencies in cm^-1 as a complex array.
get_hessian(self)
Section titled “get_hessian(self)”The same Hessian shaped (n_active, 3, n_active, 3).
get_hessian_2d(self)
Section titled “get_hessian_2d(self)”Cartesian Hessian in eV/angstrom^2, (3n_active, 3n_active).
Rows and columns run over the active atoms in get_indices() order,
three Cartesian components per atom.
get_indices(self)
Section titled “get_indices(self)”The atom indices the Hessian was actually built over.
get_infrared_intensities(self)
Section titled “get_infrared_intensities(self)”Analytical harmonic IR intensities in (D/angstrom)^2 amu^-1.
Projects the calculator’s analytical Cartesian dipole derivatives
(n_atoms, 3, 3) (in e) onto the mass-weighted normal modes.
get_mode(self, n)
Section titled “get_mode(self, n)”Mode n as an (n_atoms, 3) Cartesian displacement.
Inactive atoms get a zero displacement, matching
ase.vibrations.Vibrations.get_mode.
get_modes(self)
Section titled “get_modes(self)”Every mode as a (3n_active, n_atoms, 3) array.
Mode n pairs with get_energies()[n]: both orders come from the
ascending eigenvalues of the same mass-weighted Hessian.
get_zero_point_energy(self)
Section titled “get_zero_point_energy(self)”Zero-point energy in eV; imaginary modes contribute zero.
run(self)
Section titled “run(self)”Compute the Hessian and diagonalize it.
Returns: This object, so Vibrations(atoms).run().summary() reads as
one statement.
summary(self, log=None)
Section titled “summary(self, log=None)”Write the ASE frequency table.
log: An open text stream, a path, orNonefor stdout.
tabulate(self, im_tol=1e-08)
Section titled “tabulate(self, im_tol=1e-08)”The frequency table as one string, in ASE’s layout.
write_mode(self, n=None, kT=0.02585199101165164, nimages=30)
Section titled “write_mode(self, n=None, kT=0.02585199101165164, nimages=30)”Animate a mode into <name>.<n>.xyz.
n: Mode index, orNoneto write every non-zero mode.kT: Vibrational amplitude as an energy,units.kB * T.nimages: Frames in one full period.