Skip to content
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

Open
Hashan-Peiris opened this issue Feb 3, 2025 · 1 comment
Open

Treatment of Virial Data in training #4578

Hashan-Peiris opened this issue Feb 3, 2025 · 1 comment

Comments

@Hashan-Peiris
Copy link

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".

Screen Shot 2020-04-09 at 4 59 48 PM

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

@Hashan-Peiris
Copy link
Author

Hashan-Peiris commented Feb 3, 2025

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:

Image

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!
Hashan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant