drift of center of mass

1,327 views
Skip to first unread message

Wei Lai

unread,
Jan 3, 2017, 8:29:39 PM1/3/17
to cp2k

Dear cp2k users and developers,

 

I am testing a NVE simulation with velocity scaling for crystalline CaO (300 K) and having questions regarding the drift of center of mass.

 

In a regular NVE simulation, I am expecting that (1) the simulation box is fixed and positions of atoms can be in fractional/scaled or Cartesian units, (2) if atoms moved out of the simulation box, they can be folded back to the box or left unchanged, (3) the mass-averaged position centers oscillate around x, y, z direction.  I am showing the center of mass positions from VASP, which are consistent with the expectation.




 

If I do the same for cp2k (input file enclosed), I am clearly seeing drift of center of mass.  If I analyze the dynamics of the trajectory (now shown), it appears that both Ca and O atoms are diffusing instead of vibrating, as obtained from VASP trajectory.

 

I am wondering if you have seen similar behaviors or if I have the wrong settings in the input file.

 

Thanks, Wei

CaOmd.inp

Matt W

unread,
Jan 5, 2017, 10:21:24 AM1/5/17
to cp2k
Dear Wei,

this drift indicates that you are not calculating forces accurately enough. You can see forces in the output file by adding https://manual.cp2k.org/cp2k-4_1-branch/CP2K_INPUT/FORCE_EVAL/PRINT/FORCES.html

Possible solutions are:

(i) use the GAPW method (add METHOD GAPW in the &QS section) - might be slower
(ii) Increase the CUTOFF - try 600 or 800 ry, at some point GAPW might be better
(iii) Use smoothing on the XC function
(iv) just subtract the COM motion to remove the drift (https://manual.cp2k.org/cp2k-4_1-branch/CP2K_INPUT/MOTION/MD.html#list_COMVEL_TOL)

Matt

Wei Lai

unread,
Jan 9, 2017, 9:14:45 PM1/9/17
to cp2k
Matt,

Thanks for the suggestions.  Examining the force noise suggests that higher cutoff values are needed.  Increasing the cutoff values does stabilize the center of mass, although the statistics of fluctuation are different from those from VASP.  But I guess this is probably due to different types of basis sets.

Wei

Ari Paavo Seitsonen

unread,
Jan 11, 2017, 10:05:16 AM1/11/17
to cp...@googlegroups.com
Dear Wei,

  Just to confirm, a stupid question: When processing the results from VASP did you take into account that by default the code folds the coordinates back into the cell from origin to the lattice vectors, or, the relative coordinates between 0 and 1? That the centre of mass would bounce back and forth is not really a common kind of "drift".

    Greeting from Paris,

       apsi

--
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@googlegroups.com.
To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.



--
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
  Ari Paavo Seitsonen / Ari.P.S...@iki.fi / http://www.iki.fi/~apsi/
    Ecole Normale Supérieure (ENS), Département de Chimie, Paris
    Mobile (F) : +33 789 37 24 25    (CH) : +41 79 71 90 935

Wei Lai

unread,
Jan 11, 2017, 10:27:00 AM1/11/17
to cp2k, Ari.P.S...@iki.fi
Dear Ari,

Yes, by default VASP folds the coordinates back to the cell and they are fractional between 0 and 1.  In the plot I showed earlier, I simply multiplied the fractional coordinates by lattice parameters.  With VASP, center of mass was oscillating but not drifting.  In cp2k, it was drifting because forces were not calculated accurately enough due to the low cutoff energy.

Wei 
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.

To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.

Ari Paavo Seitsonen

unread,
Jan 11, 2017, 11:18:26 AM1/11/17
to cp...@googlegroups.com
Dear Wei,

  Sorry, I did not understand: Did you know correct the coordinates from VASP so that they are not folded back, and still the centre of mass oscillates? Very strange if indeed so... According to my experience there is _always_ a drift in the DFT-based MD simulation (unless one removes the force on the centre of mass at each step), by increasing the accuracy it can made smaller (also in VASP), but basically it never vanishes.

    Greetings,

       apsi

To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe@googlegroups.com.

To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.

Wei Lai

unread,
Jan 11, 2017, 12:05:28 PM1/11/17
to cp2k, Ari.P.S...@iki.fi
Dear Ari,

As far as saving unfolded coordinates in VASP, I don't know the parameter to control this.  In my opinion, center of mass should be calculated on folded coordinates due to PBC.

As far as center of mass force correction, thanks for making a good point.  I looked at the source code of VASP 5.4.1, it seems that drift forces (summation of all forces but not exactly forces on the center of mas) are removed at each step.

Wei

Ari Paavo Seitsonen

unread,
Jan 11, 2017, 12:16:51 PM1/11/17
to cp...@googlegroups.com
Dear Wei,

  One should indeed use the unfolded coordinates to calculate the centre of mass, otherwise you get jumps in its position - that is probably indeed why you see any change in the VASP results, as if the (mass-weighted) total force on the atoms is removed (good to know about that behaviour in the VASP code), the centre of mass cannot in principle drift (except for thermostats etc). If there is no option in VASP, one can always do it in post-processing step: If the change in a coordinate of atom I, R_aI(t+dt) - R_aI(t) > L/2 (a = x, y, z), R_aI(t+dt) += L, and then use these to calculate the centre of mass. But, like said, it should remain constant...

    Greetings,

       apsi

To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe@googlegroups.com.

To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages