[CP2K-user] [CP2K:19801] Cons. Qty for different ensembles + Pressure fluctuation

Léon Luntadila Lufungula Leon.luntadilalufungula at uantwerpen.be
Tue Jan 23 10:47:01 UTC 2024


Hi Matthias,

So I started an NpT directly from the inputs you gave me with a box 
containing 216 water molecules. After a 300ps equilibration (plots thus 
starrt at 0.3 ns), the pressure fluctuations are again in the 10kbar range 
which is okay as you pointed out, while the average pressure is around -14 
bar, so tha'ts also within the 20 bar range you mentioned. The energy drift 
per atom is also below 1K so everything seems to work reasonably. 

[image: H2O-TIP3P_FLEXIBLE-6x6x6.mp-NPT-plots.png]
I'm starting my AIMD simulations as we speak, so hopefully all goes well 
there too. I read that it is best to do a short equilibration with a strong 
coupling to the thermostat (e.g. CSVR, TIMECON 20 and REGION MASSIVE), 
before going to a weaker coupling (e.g. CSVR, TIMECON 200 and REGION 
GLOBAL), but is there also a rule of thumb w.r.t. the barostat TIMECON? I 
regularly see TIMECON 1000, but is it useful to set it to TIMECON 100 in 
this early equilibration?

Thanks for all the help already, it really helps me a lot given the fact 
that I don't have a senior researcher with a lot of hands-on CP2K 
experience around!

Kind regards,
Léon


On Monday 22 January 2024 at 17:09:26 UTC+1 Krack Matthias wrote:

>
>    1. Yes, if possible
>    2. The average pressure wrt the desired target pressure however should 
>    be in the order of +/- 20 bar
>    3. You can start directly with NpT. I would add “RESTART_COUNTERS no” 
>    to “RESTART_AVERAGES no”.
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Monday, 22 January 2024 at 16:53
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *Re: [CP2K:19795] Cons. Qty for different ensembles + Pressure 
> fluctuation
>
> Hi Matthias,
>
>  
>
> 1) Okay, I'll keep an eye on the "Energy drift per atom [K]"-values then 
> for my AIMD simulations, I'm guessing for an equilibrated structure these 
> should be near or below 1K? 
>
> 2) That's a relief that fluctuations in the order of kbar are normal, I 
> was getting worried about what to do to get them in the order of bar!
>
> 3) I'll make sure to set RESTART_AVERAGES to NO when restarting my NPT 
> from my NVT, or is it actually not necessary to first do an NVT before 
> running NPT?
>
>  
>
> Kind regards,
>
> Léon
>
> On Monday 22 January 2024 at 16:02:20 UTC+1 Krack Matthias wrote:
>
> Hi Léon
>
>  
>
> Indeed, the "Energy drift per atom [K]" provides a good indicator for 
> checking the equilibration. Given the small cell sizes used in atomistic 
> simulations, pressure fluctuation up to a kbar range are normal, because a 
> mHa/Bohr^3 corresponds to roughly 294 kbar. The pressure usually 
> equilibrates much more slowly than the temperature. On restart, with 
> RESTART_AVERAGES NO, the averages should evolve smoothly and should not 
> change too much for an equilibrated system.
>
>  
>
> Best
>
>  
>
> Matthias
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Monday, 22 January 2024 at 15:07
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *Re: [CP2K:19792] Cons. Qty for different ensembles + Pressure 
> fluctuation
>
> Hi Jurg and Matthias,
>
>  
>
> Jurg:
>
> 1) Okay, good to know that I can reduce the fluctuations by increasing the 
> system size. Still, are fluctuations in the order of kbar not too large 
> when the desired pressure is 1 bar?
>
> 2) I'm using the CSVR thermostat with a timecon of 100 fs and the barostat 
> is the standard one with a timecon of 100 fs by just including the 
> following lines to the input and changing the ensemble to NPT_I: 
>
> &BAROSTAT
>
>   TIMECON 100
>
> &END BAROSTAT
>
> 2-continued) I do see now that the BAROSTAT section also has a THERMOSTAT 
> subsection. Should the thermostat be defined here in the case of an NPT 
> calculation or is it in the THERMOSTAT subsection of MD as is the case for 
> an NVT run? If not, what is the use of the BAROSTAT/THERMOSTAT subsection?
>
>  
>
> Matthias:
>
> Thanks for pointing this out to me! I remembered noticing that the value 
> for GMAX was too small this weekend, but I forgot to adjust it accordingly. 
> I'll try to re-run the calculations with the inputs in the regtest-water 
> directory to see if I get better results! Maybe one more question if that's 
> okay for you. I'm also running / getting ready to run AIMD simulations and 
> these are quite heavy so it takes a long time to simulate even a couple of 
> ps. If I see a drift in the constant of motion like in the pictures above, 
> is there a way of knowing if this is due to an error in the input or just 
> because the system has not equilibrated yet? Or is this just a matter of 
> simulating for longer and longer times to see if it goes towards an 
> equilibrium or keeps drifting? Perhaps the "Energy drift per atom [K]" in 
> the output can be of some help, but I'm not certain how it's calculated or 
> how I can use it to check my trajectory...
>
>  
>
> Thanks for all the help!
>
>  
>
> Kind regards,
>
> Léon
>
> On Monday 22 January 2024 at 14:29:09 UTC+1 Krack Matthias wrote:
>
> Hi
>
>  
>
> The GMAX parameter for Ewald is a bit sloppy in these inputs. Suggested 
> values are 1 to 2 points per Angstrom based on the cell edge lengths, i.e. 
> GMAX 20 is numerically more appropriate. In the example I gave you the GMAX 
> value is automatically adapted to the cell size.
>
>  
>
> Best
>
>  
>
> Matthias
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Monday, 22 January 2024 at 14:13
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *Re: [CP2K:19788] Cons. Qty for different ensembles + Pressure 
> fluctuation
>
> P.S. These calculations were done based of the input files in 
> https://www.cp2k.org/exercises:2018_uzh_acpc2:mol_sol, because the Fist 
> regtest-water folder was not yet available at the time, but the FF params 
> are correct, the coordinates are just different than the one molecule box 
> in the tests directory.
>
>  
>
> On Monday 22 January 2024 at 14:03:06 UTC+1 Léon Luntadila Lufungula wrote:
>
> Dear Matthias,
>
>  
>
> I have similar results for a box of 256 water molecules:
>
> NVT:
>
> [image: Image removed by sender.]
>
>
> NPT: (fluctuations are a bit smaller but still in the range of several 
> kbar...)
>
> [image: Image removed by sender.][image: Image removed by sender.]
>
>  
>
> You say that the sample should be equilibrated well in advance before 
> starting the sampling run, so do you mean I should run an NVT simulation 
> for longer until it equilibrates before running an NPT from the thermalized 
> end structure? Or do you mean both NVT and NPT should be run for longer 
> until the Cons. Qty. is also equilibrated? Because in both cases the 
> temperature seems to be equilibrated quite well and the pressure in the NPT 
> ensemble is also constant albeit with very large oscillations...
>
>  
>
> Kind regards,
>
> Léon
>
>  
>
>  
>
> On Monday 22 January 2024 at 13:40:05 UTC+1 Krack Matthias wrote:
>
> Dear Léon
>
>  
>
> a 32 H2O cell is still a relatively small system which can cause large 
> fluctuations. I suggest to try at least the 6x6x6 = 216 H2O input 
> <https://github.com/cp2k/cp2k/blob/master/tests/Fist/regtest-water/H2O-TIP3P-6x6x6.inp>. 
> The sample should be equilibrated well in advance before starting the 
> sampling run.
>
>  
>
> HTH
>
>  
>
> Matthias
>
>  
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of Léon 
> Luntadila Lufungula <Leon.luntad... at uantwerpen.be>
> *Date: *Monday, 22 January 2024 at 12:56
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *[CP2K:19784] Cons. Qty for different ensembles + Pressure 
> fluctuation
>
> Dear all,
>
>  
>
> I ran several simulations on a box of 32 water molecules with the TIP3P 
> force field:
>
> 1) 1 ns NVE trajectory with timestep 0.5 fs
>
> 2) 1 ns NVT trajectory at 298.15K with timestep 0.5 fs and thermostat time 
> constant of 100fs
>
>  3) 1 ns NPT_I trajectory restarted from the final structure of the NVT 
> trajectory at 298.15K and 1 bar with timestep 0.5 and thermostat and 
> barostat time constants of 100 fs
>
>  
>
> I plotted the Cons. Qty [a.u.] vs. Time [fs] for the three simulations and 
> saw that the constant of motion was only more or less constant for the NVE 
> trajectory. The NVT and NPT trajectories both had strong oscillations and 
> significant drift of the constant of motion (see below) and I was wondering 
> if this is normal behaviour or that this means that the system is not yet 
> equilibrated? I would think that the Cons. Qty. should remain constant but 
> I can also understand that the thermostat and barostat might influence its 
> behaviour in a way.
>
> NVE:
>
> [image: Image removed by sender.]
>
> NVT:
>
> [image: Image removed by sender.]
>
> NPT:
>
> [image: Image removed by sender.]
>
> The simulations of the water box were small test cases, but I also need to 
> know what behaviour to expect when going to my production runs with my 
> systems of interest...
>
>  
>
> Additionally, in the NPT ensemble, the pressure seems to fluctuate very 
> strongly from -20000 to +20000 bar which seems to be quite excessive to me. 
> Is this normal? I've also seen this asked in another post 
> <https://groups.google.com/g/cp2k/c/gxA8r6wmyF4/m/k8QT7iglAAAJ>, but that 
> person did not get a reply unfortunately....
>
> [image: Image removed by sender.]
>
>  
>
> Thanks in advance for the help!
>
>  
>
> Kind regards,
>
> Léon
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cp2k+uns... at googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/76d3e94b-4a67-4fcc-8861-78a566ebb107n%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/76d3e94b-4a67-4fcc-8861-78a566ebb107n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cp2k+uns... at googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/e6d4002e-91a7-45cd-817c-adc66616d1d6n%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/e6d4002e-91a7-45cd-817c-adc66616d1d6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cp2k+uns... at googlegroups.com
>
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/9ee8f63c-639e-4708-8a49-19f2cd8b87e4n%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/9ee8f63c-639e-4708-8a49-19f2cd8b87e4n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to cp2k+uns... at googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/cp2k/e9d20a23-e4e5-4a63-a807-6858c86a9b29n%40googlegroups.com 
> <https://groups.google.com/d/msgid/cp2k/e9d20a23-e4e5-4a63-a807-6858c86a9b29n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/6ae66ae0-e0ad-4266-8c90-4172aa927684n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20240123/848d5a85/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: H2O-TIP3P_FLEXIBLE-6x6x6.mp-NPT-plots.png
Type: image/png
Size: 429684 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20240123/848d5a85/attachment-0001.png>


More information about the CP2K-user mailing list