[QE-users] Andersen thermostat in QE: random collisions or not?

Han Hsu (徐翰) hanhsu at ncu.edu.tw
Sun Jun 4 21:12:29 CEST 2023


Dear QE developers and users,

Recently, I am trying to run MD calculations (NVT ensemble) for a solid at
high pressure high temperature using Andersen thermostat. The setting of my
calculations is thus calculation= 'md', ion_temperature= 'andersen', and a
temperature suitable for my system. Given the wall time limit, I can only
run 2000 steps for each job (~2000 fs). To reach equilibrium, I have to run
at least six jobs (> 1.2 ps). In these calculations, I noticed that both
the stress tensor and temperature exhibit an "artificial" periodicity of
2000 time steps, same as the setting of "nstep" in my calculations. I thus
suspect that Andersen collisions in my calculations (and thus QE) may be
non-random.

To further investigate (and better showcase) this issue in QE, I performed
a series of tests on a simpler system: 8-atom fcc Si (similar to
example03). For the thermostat, the setting is ion_temperature= 'andersen',
tempw= 300, and nraise= 10. In these test calculations, I find the same
problem persists, namely, an artificial periodicity same as "nstep" (500 in
these test calculations), as further described below. (Note: A few example
input/output files are attached. All these test calculations are performed
using QE 7.2. They can all be completed within one minute using one single
CPU, if anyone is interested in trying).

In the first round (from scratch, pwscf.md.1.*), everything seems normal.
The problem occurs in the "restart" rounds (pwscf.md.2.*, and 3, 4, ...).
One can easily check the occurence of Andersen collisions in each round by
"grep -e Entering -e collision" pwscf.md.?.out. By doing so, one can easily
notice that the occurrence of Andersen collisions in the restart rounds are
no longer random. For example, in round 2 (pwscf.md.2.out, timestep
501–1000), we have

     Entering Dynamics:    iteration =   501
     Andersen thermostat:    2 collisions
     Entering Dynamics:    iteration =   502
     Entering Dynamics:    iteration =   503
     Entering Dynamics:    iteration =   504
     Entering Dynamics:    iteration =   505
     Entering Dynamics:    iteration =   506
     Andersen thermostat:    2 collisions
     Entering Dynamics:    iteration =   507
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =   508
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =   509
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =   510
     Entering Dynamics:    iteration =   511
     Andersen thermostat:    1 collisions
     .....

In round 3 (pwscf.md.3.out, timestep 1001–1501), Andersen collisions occur
in the same respective time steps as in round 2:

     Entering Dynamics:    iteration =  1001
     Andersen thermostat:    2 collisions
     Entering Dynamics:    iteration =  1002
     Entering Dynamics:    iteration =  1003
     Entering Dynamics:    iteration =  1004
     Entering Dynamics:    iteration =  1005
     Entering Dynamics:    iteration =  1006
     Andersen thermostat:    2 collisions
     Entering Dynamics:    iteration =  1007
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =  1008
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =  1009
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =  1010
     Entering Dynamics:    iteration =  1011
     Andersen thermostat:    1 collisions

In round 4 (pwscf.md.4.out, timestep 1501–2000), the same pattern persists:

     Entering Dynamics:    iteration =  1501
     Andersen thermostat:    2 collisions
     Entering Dynamics:    iteration =  1502
     Entering Dynamics:    iteration =  1503
     Entering Dynamics:    iteration =  1504
     Entering Dynamics:    iteration =  1505
     Entering Dynamics:    iteration =  1506
     Andersen thermostat:    2 collisions
     Entering Dynamics:    iteration =  1507
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =  1508
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =  1509
     Andersen thermostat:    1 collisions
     Entering Dynamics:    iteration =  1510
     Entering Dynamics:    iteration =  1511
     Andersen thermostat:    1 collisions

As shown above, in all the restart runs (500 steps each), Andersen
collisions occur in the same respective time steps with the same number of
collisions. For example, two collisions occur at time steps 501, 1001, and
1501, no collision in steps 502–505, 1002–1005, 1502–1505, two collisions
at 506, 1006, and 1506, ...etc. In fact, throughout all the restart rounds
(rounds 2–10), the same problem occurs. In other words, Andersen collisions
in round 2–10 (time steps 501–5000) occur in a repetitive manner with a
period of 500 time steps.

I am wondering how this can be fixed? Or maybe I am wrong, as this
"artificial periodicity" is not a problem at all?

I truly appreciate any comments and suggestions.

Best regards,

Han

 pwscf.md.1.in
<https://drive.google.com/file/d/1ialx9iPnx8n9Dd6VAIogt_mgy30qmEXq/view?usp=drive_web>

 pwscf.md.1.out
<https://drive.google.com/file/d/1GdPyB4X2_eYrAZl1WEoJZNQmEeDSmqqn/view?usp=drive_web>

 pwscf.md.2.in
<https://drive.google.com/file/d/15ZgVyb00FJeUtZKnDPKAVny9Y8hO4E0b/view?usp=drive_web>

 pwscf.md.2.out
<https://drive.google.com/file/d/1xo_rWYX3FTcgcouHEIAa6_xkpAhDgc7I/view?usp=drive_web>

 pwscf.md.3.in
<https://drive.google.com/file/d/1KwDpT8Exm5ClCmZL6zpMdao5-IpJHv-p/view?usp=drive_web>

 pwscf.md.3.out
<https://drive.google.com/file/d/1R-mdwRht4XdJ-sxym9Q5TkjPf5ZesELT/view?usp=drive_web>

 pwscf.md.4.in
<https://drive.google.com/file/d/1GwNqJ76nHd5ExI5iXdtf3-i98hHCSR3S/view?usp=drive_web>

 pwscf.md.4.out
<https://drive.google.com/file/d/1r3U4EItVQlKU2WEhTgcVZANhonRJEWFl/view?usp=drive_web>


-- 
===============================
 Han Hsu (徐翰)
 Associate Professor
 Department of Physics
 National Central University
 Taoyuan 32001, Taiwan
 Email: hanhsu at ncu.edu.tw
 Web: sites.google.com/site/hanhsuphys
 Tel: +886-3-422-7151 ext 65303
 Fax: +886-3-425-1175
===============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20230605/49793dba/attachment.html>


More information about the users mailing list