Problem with Barostat in MLFF

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Global Moderator, Moderator

Post Reply
Message
Author
burakgurlek
Newbie
Newbie
Posts: 44
Joined: Thu Apr 06, 2023 12:25 pm

Problem with Barostat in MLFF

#1 Post by burakgurlek » Tue Mar 26, 2024 12:54 am

Hi,

I am trying to understand the parameters of barostat in NPT simulation. For this, I tried to replicate the example given in the end of best practices MLFF website (https://www.vasp.at/wiki/index.php/Best ... rce_fields). I did learn the dynamics in 5000 steps and reproduction run with 10000 steps with the given files. I plot the distribution of pressure via py4vasp (np.trace(Stress_Data['stress'], axis1=1,axis2=2)/3), but the mean is quite different than the pressure 0.001kB. I only did not include any KPOINTS file as this was not provided in the example. Do you have any idea why the barostat does not work properly? or Am I doing something wrong?

mean pressure = -5.7
std pressure = 8.0

Here is the distribution and the files

Regards,
Burak
You do not have the required permissions to view the files attached to this post.

martin.schlipf
Global Moderator
Global Moderator
Posts: 495
Joined: Fri Nov 08, 2019 7:18 am

Re: Problem with Barostat in MLFF

#2 Post by martin.schlipf » Tue Mar 26, 2024 10:18 am

Did you monitor the pressure over time? Perhaps your system has not equilibrated yet?

burakgurlek
Newbie
Newbie
Posts: 44
Joined: Thu Apr 06, 2023 12:25 pm

Re: Problem with Barostat in MLFF

#3 Post by burakgurlek » Tue Mar 26, 2024 11:01 am

Hi,

Thanks, I do observe the pressure overtime. It may not be equilibrated, but that was the point that I wanted to use the example. I used the same number of steps indicated in the example. I assume, it would produce the result well and equilubrated. Otherwise, there should be already a potential learned which does not seems to be the case according to the website.

Regards,
Burak

andreas.singraber
Global Moderator
Global Moderator
Posts: 235
Joined: Mon Apr 26, 2021 7:40 am

Re: Problem with Barostat in MLFF

#4 Post by andreas.singraber » Wed Mar 27, 2024 3:06 pm

Hello!

In order to get meaningful ensemble averages from MD simulations the system must be in equilibrium. However, if you used the INCAR file you attached to your initial post, then the system cannot be in equilibrium because you ramp up the temperature:

Code: Select all

TEBEG            = 200
TEEND            = 500
With this setting you are continuously pumping energy into the system, hence, time averages will not be meaningful. Although the barostat will try to adjust the lattice to achieve the desired pressure it will not succeed because at the same time the thermostat heats up the system.

In order to perform a meaningful averaging of pressure you will need to turn off temperature ramping and set a fixed thermostat temperature. Properly equilibrate the system (e.g. monitor energy, temperature, lattice parameters until there is no more drifts) and only afterwards start to average pressure. Unfortunately, getting a good pressure average with low error bars is known to be notoriously time-consuming, in particular for small systems (tens to hundreds of atoms). The pressure usually fluctuates wildly into positive and negative values and long simulation times are necessary to get a decent time average. The situation improves if one scales up to (ten-)thousands of atoms but this of course is also computationally expensive.

If you find that even after proper equilibration pressure averages do not match with the input pressure within error bars then please post all relevant input and output files so we can have a closer look.

All the best,
Andreas Singraber

Post Reply