-
Notifications
You must be signed in to change notification settings - Fork 529
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
Treatment of Virial Data in training #4578
Comments
I came across this discussion and thought it might be relevant, hence the tagging. To briefly explain, I have been looking at the Virial testing performed on my DeePMD model of electrolyte molecules in a box (555 atoms and 6 element types), testing on the data the model has already been trained on. I am seeing the following result: This data has been created from VASP AIMD runs with Langevin thermostat and NpT ensemble (ISIF 3) with an external pressure set at 1.01 pressure (in kB, using PSTRESS tag in VASP). As you can see in the graph, the data that matches pretty well comes from the off-diagonal elements in the stress tensor, and the results with a systematic shift come from the diagonal elements of the stress matrix. The model was trained only on the energies and forces data. I am using DeePMD 3.0.1. The energy and forces fit pretty well in the parity plots. Currently, I believe this shift is due to the energy shift applied in VASP to the total energy when the PSTRESS tag is used. The off-diagonals are adjusted for this energy, while the XX YY and ZZ components are not. What I am not sure of is if this is intended behavior and if it's okay for me to continue with this training data or if I should start rerunning AIMD to collect new training data with the PSTRESS removed (which is going to be very expensive). The question then becomes, if, in the case, I want to use external pressure, how do I evaluate the performance of the Virials in my model? Thanks for your time and any suggestions! |
Hello Hashan, I am assuming you are performing ground state aimd calculation (no electron temperature involved). The kinetic term in the vasp outcar means the electron kinetic contribution (-1/2 \nabla^2) to the stress, which should be distinguished from the ion kinetic virial. To check it you may perform a scf calculation (IBRION=-1, no ion kinetic) on a single configuration that is taken from your aimd trajectory, and check whether the kinetic terms in outcars are consistent. It is also not surprising to me that you are getting a shift in the virial prediction when the model was only trained by energy and force. To improve the virial accuracy please use the stress to train the model. Best, |
Discussed in #213
Originally posted by sivonxay April 9, 2020
When training a model using VASP AIMD data, should the kinetic contributions to the virials be subtracted out?
I took a look at how it's done in https://github.com/deepmodeling/dpdata/blob/master/dpdata/vasp/outcar.py and that seems to include the kinetic contributions, since it parses the lines beginning with "in kB".
I have run VASP AIMD of my system at various temperatures (1000, 1500, 2000 etc.), each at a volume that yields approximately 0 external pressure (Using ISIF=2). Thus, the virial data for each of these would be similar, although their volumes are very different. Not excluding the kinetic contribution would imply that the training/model has some concept of the temperature/velocity of the training data - which is data not included in the training data.
Thanks in advance for your response,
Eric
The text was updated successfully, but these errors were encountered: