6
$\begingroup$

While I'm primarily interested in molecular normal modes, the question could also apply to calculating phonon spectra / vibrations in solids.

There are many machine learning approaches to calculate energies of molecules and solids. Some have even been used for molecular dynamics and geometry optimizations.

In principal, one could use the ML potential energy surface to derive the mass-weighted Hessian matrix, and solve for eigenvalues and eigenvectors. (For example, one could test whether the resulting vibrational frequencies are accurate.)

Are there existing packages (e.g., in Python) which calculate the mass-weighted Hessian from a ML potential, convert units to frequencies, and compare the normal modes?

$\endgroup$
4
  • 1
    $\begingroup$ Is that not doable with something like phonopy driving LAMMPS if the ML potential plugs into LAMMPS and is used for calculating the forces? Asking because it seems like it should be doable, but I've never tried. $\endgroup$ Jan 3 at 19:38
  • $\begingroup$ That might work for solids, but I don't think that would work for molecules. $\endgroup$ Jan 3 at 19:51
  • $\begingroup$ Have you tried using ASE? $\endgroup$ Jan 4 at 18:52
  • $\begingroup$ @AntoniodeOliveira-Filho - if ASE can calculate vibrational modes for molecules as well as solids, I'd suggest writing up an answer. $\endgroup$ Jan 6 at 18:25

1 Answer 1

6
$\begingroup$

Depending on the particular ML potential and which features they implement, there are some relatively simple options:

  1. There is an interface to some piece of software that can compute normal modes. The simplest example for this would be ASE: https://wiki.fysik.dtu.dk/ase/ase/vibrations/modes.html ASE calculates a finite difference approximation to the Hessian, so you just need to provide a Calculator that can evaluate the energy of a configuration.

Effort: < 50 lines of code for the calculator, if not provided by the ML potential package.

There are other options, some of which have been mentioned in the comments, e.g. phonopy.

  1. If your ML potentials is written in some automatic differentiation framework (Jax, PyTorch, TF, etc.), then obtaining the Hessian is straightforward.

Effort: ~50 lines of code, if not provided by the ML potential package.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .