Skip to content

analytical second order derivatives (Hessians) - #15

Open
humeniuka wants to merge 9 commits into
stefanch:masterfrom
humeniuka:master
Open

analytical second order derivatives (Hessians)#15
humeniuka wants to merge 9 commits into
stefanch:masterfrom
humeniuka:master

Conversation

@humeniuka

@humeniuka humeniuka commented Jan 5, 2021

Copy link
Copy Markdown

Semiclassical propagators such as the Herman-Kluk propagator (https://doi.org/10.1063/1.450142) require a local
harmonic approximation to the potential energy surface around the instantaneous position of each trajectory. Computing the Hessian numerically for each time step during a molecular dynamics simulation would be too inaccurate and time-consuming. Being able to compute Hessians efficiently is probably also useful for other applications such as optimizations of the molecular geometry.

torchtools_hessian.py contains another torch implementation of the sGDML predictor, which in addition to energies and gradients/forces can also evaluate the Hessians analytically for a batch of geometries. This is done by differentiating the kernel a third time w/r/t to the cartesian coordinates. It is assumed that the descriptor is the Coulomb matrix.
An analytical Hessian calculation is roughly 4 times more expensive than a gradient calculation.

test_torchtools_hessian.py checks that the proposed predictor produces the same energies and gradients as the current implementation. It is a little bit slower than the current implementation when only energies and gradients are requested. The analytical Hessians are checked against finite-difference Hessians computed with ASE.

I hope this might be useful.

…second order

derivatives of the potential energy (Hessians) in addition to energies and gradients.
`test_torchtools_hessian.py` demonstrates that the new implementation of GDMLPredict(...)
gives the same energies and gradients as the original GDMLTorchPredict(...) . The
analytical Hessians are compared to numerical Hessian computed with ASE.

Certain semiclassical propagators such as the Herman-Kluk propagator require a local
harmonic approximation around each trajectory. Computing the Hessian numerically for each time step
would be too inaccurate and time-consuming. The analytical Hessian calculation is
roughly 5-10 times more expensive than a gradient calculation.
… the energy label is read as the first float in the line
…l index arrays to the GPU a 10x speed-up is achieved
…l index arrays to the GPU a 10x speed-up is achieved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant