-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with .create() method when recreating SiC NN example #71
Comments
Hi @michaelmacisaac, you code seems alright to me and I think it is working as expected. You saw So, if you wait a big longer, it should get to the next steps. Also, if you want to see whether it works or not, probably you can try first use fewer configurations, say 100 to do a quick run. Once you think it works, then try fitting using the entire 6000 configurations. |
@mjwen |
Yes. After a model is trained, you can reloaded it and then check the prediction error on a test set. The EnergyForcesRMSE analyzer might be what you are looking for? |
@mjwen Additionally, I was looking through the "CalculatorTorchSeparateSpecies" documentation, and it appears that the model corresponding to only the last element of the dictionary can make use of the "set_save_metadata" method. Does this mean that only the last model is optimized, or is it that both models (Si and C) are optimized, but only the model corresponding to the last element is iteratively saved, while the model corresponding to the first element in the dictionary is saved at the the end of training? Finally, if it is the case that only the model corresponding to the final element in the dictionary is optimized, would it be advantageous to employ multiple calculators such that for one of the calculators the last element in the dictionary is Si and for the other calculator the last element is C? I have also been wondering if the "WrapperCalculator" may be useful for multi element systems, because when making predictions, the predictions are the sum of the predictions of the calculators. I have really enjoyed learning the KimKliff package, and am excited to continue using it in my work, insight on these matters would be greatly appreciated! |
We should be able to test multiple species using an analyzer as in this script, but need to change
The loss should optimize all model parameters. But you are right, there is a bug in the current
Exactly,
|
hi @michaelmacisaac I've got this fixed. Now if you use |
Hi @mjwen |
Hi @mjwen |
@michaelmacisaac Sorry, I missed this one. Typically, the loss will contain both energy contribution and force contributions. Please see this. In addition to this, one can choose to normalize the total energy by the number of atoms in a configuration by setting And you are right, the loss is also normalized by the batch size. |
Good afternoon,
I am attempting to develop a Si and a C potential using some SiC VASP data I have collected. My VASP data included ab initio molecular dynamics runs where a SiC structure was held at 12 different temperatures for 500 time steps, resulting in 6000 structures. I thought that my data/xyz files may not be in a usable form for the kliff functions, however in my variable explorer it appears 6000 configs were made. Considering these configs I assume my .xyz files are formatted correctly and my issues are not stemming from the differences in data used.
I am using a similar approach to the NN SiC example provided in the 'examples' folder. When I run my script my code seems to stop at the line:
'_ = calc.create(configs,reuse=False)'
When I first run my script the following is outputted in the console:
After waiting awhile, I stop my code and the following is outputted in the console (I have started and stopped my code multiple times and the output is the same):
I am unsure of how to resolve the issue and would appreciate any assistance?
Thanks
My code for my SiC nn is below:
The text was updated successfully, but these errors were encountered: