Wrong result by PESCalculator? #272
Unanswered
SmallBearC
asked this question in
Q&A
Replies: 1 comment
-
|
I have discovered the root cause of the issue: I started my training with a pre-trained model and set an element energy reference value, which led to a mismatch between the model's element types and my actual system. Therefore, it is necessary to reset the correct element types before using the PESCalculator. |
Beta Was this translation helpful? Give feedback.
0 replies
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 am verifying the accuracy of my model. But I found that the results obtained using PESCalculator and Potential are different: some of the code is as follows:
I get the Potential by:
model = matgl.load_model("test.out")
I get the PESCalculator by:
calc = PESCalculator(model)
When calculate the force directly:
forces_calc = calc.get_forces(atom) (or by atom.set_calcualtor(calc); forces_calc = atom.get_forces() )
When calculate the force by Potential:
g, lat, state_attr = ase_converter.get_graph(atom)
e, f, s, h = model(g=g, lat=lat, state_attr=state_attr)
forces_ml_pot = f
I found that the forces_ml_pot is the true predicted value because it is very similar to the data in the training set and the obtained error is consistent with the training data. However, forces_calc is very very far away from the training data.
Usually, we use ASE for various simulations, and we calculate energy or force by the function: atom. set_calculator(). If we get a wrong result by this function, all the simulation results would be also wrong. So, What is the reason for this?
Beta Was this translation helpful? Give feedback.
All reactions