How to use deepmd-kit to optimize a molecule? #893
Unanswered
Franklalalala
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Here is an example to optimize a water molecule with help of a third-party package ASE: from ase import Atoms
from deepmd.calculator import DP
water = Atoms('H2O',
positions=[(0.7601, 1.9270, 1),
(1.9575, 1, 1),
(1., 1., 1.)],
cell=[100, 100, 100],
calculator=DP(model="frozen_model.pb"))
print(water.get_potential_energy())
print(water.get_forces())
from ase.optimize import BFGS
dyn = BFGS(water)
dyn.run(fmax=1e-6)
print(water.get_positions()) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know that, you train a model use labeled system, then, you can use this model to pridict a molecule's energy and force. Question is, can this model optimize a raw, unstable molecule and give a final energy, forces.
I think maybe, use a for loop to predict energy while change the coords with the gradient(force), end loop when the force smaller enough. Is there better way to do this?
Beta Was this translation helpful? Give feedback.
All reactions