Skip to content
Discussion options

You must be logged in to vote

I fixed a bug in #5351. After patching that PR, you could obtain the Hessian with the following script

from deepmd.infer import DeepPot
import numpy as np
dp=DeepPot("/home/jzzeng/.cache/deepmd/pretrained/models/DPA3-Omol-Large.pt", no_jit=True)
dp.get_model().enable_hessian()
dp.deep_eval._has_hessian=True
coord = np.array([[1, 0, 0], [0, 0, 1.5], [1, 0, 3]]).reshape([1, -1])
atype = [1, 0, 1]
e, f, v, h = dp.eval(coord, None, atype)
print(h)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@RA-zoL
Comment options

Answer selected by RA-zoL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants