xnn.common.models.vibrations.hessian#
- xnn.common.models.vibrations.hessian(model, data, create_graph=False)[source]#
The Hessian of the energy with respect to the positions of every structure of a batch.
- Parameters:
model (torch.nn.Module) – The potential (bare or wrapped in
ForceStressOutput).data (AtomicGraph) – The structures.
create_graph (bool, optional) – Keep the Hessians differentiable; default
False.
- Returns:
One
(3 n, 3 n)matrix per structure in eV / Angstrom^2, rows and columns ordered atom by atom (x,y,zof the first atom first).- Return type:
list of Tensor