[ase-users] Non-zero center of mass velocity in MD simulation

Jakob Schiøtz schiotz at fysik.dtu.dk
Wed Oct 12 09:34:31 CEST 2016


Dear Zeeshan,

Are you sure the velocity of the center of mass is zero before you start the simulation?  The NPT should not change the center-of-mass velocity, as it only scales the velocities with a (time-varying) factor.  Do you have any constraints?  If you send me the script, I can try to look at it.

I agree that attaching Stationary to the dynamics is an ugly hack, and I think it could severely mess up the NPT dynamics.


Another comment: If you want an NVT ensemble, consider using another integrator.  I would use Langevin, although it is stochastic.  The problem is that the Nose-Hoover dynamics (which is what you get with NPT and pfactor=None) is prone to periodic oscillations in the temperature.  It can be solved by a “Nose-Hoover chain”, but that has not been implemented.  Look at the temperature, if it behaves then you are OK, but if it oscillates then perhaps NPT is not the best solution.

Best regards

Jakob


> On 06 Oct 2016, at 5:21, Zeeshan Ahmad via ase-users <ase-users at listserv.fysik.dtu.dk> wrote:
> 
> Hi ase-users and developers,
> 
> During my NVT MD simulation, the center of mass acquires a non-zero velocity and moves out of the computational box after ~5000 time steps. I am using a reasonable time step of 2 fs. 
> 
> dynDiff = NPT(atoms=atoms,timestep=timestep*units.fs,temperature=Treq*units.kB, pfactor = None, mask = (0,0,0),ttime = ttime*units.fs,externalstress=0,logfile='Diff.log',loginterval=1)
> 
> I was wondering about the best way to keep the center of mass velocity zero. One solution would be to use the Stationary function in the ase.md.velocitydistribution module and attach it as an observer function to the dynamics object, so that it sets the velocity to zero at every iteration (Seems very artificial though).
> 
> from ase.md.velocitydistribution import Stationary
> dynDiff.attach(Stationary(atoms = atoms))
> 
> Do you have any suggestions?
> 
> Thank you
> --
> Zeeshan Ahmad
> PhD student, Mechanical Engineering
> Carnegie Mellon University
> email: azeeshan at andrew.cmu.edu
> http://www.andrew.cmu.edu/user/azeeshan/
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users

--
Jakob Schiøtz, professor, Ph.D.
Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.fysik.dtu.dk/~schiotz/






More information about the ase-users mailing list