You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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