Manually initialize velocity of each atom

80 views
Skip to first unread message

lch0...@gmail.com

unread,
Jun 1, 2021, 1:26:44 PM6/1/21
to ipi-users
Hello all,

Probably someone has asked this before but unfortunately I did not find it.

I wonder how to specify the detailed velocities of every atom when I start an i-pi run. 

I ask because I sampled several phase points (coordinates+momentum) of a classical (nuclei) system in NVT ensemble by another MD software, and now I want to run NVE using i-pi from those points. The coordinates and velocities are in the XYZ format, so I guess the easiest way is to read the velocity XYZ file somehow if possible. Would that be doable in the current implementation of i-pi?

Best,
CHL

Michele Ceriotti

unread,
Jun 1, 2021, 4:27:28 PM6/1/21
to ipi-users
So, quick answer is that you can initialize velocities from a say xyz-formatted file by having something like
<velocities mode='xyz'> filename.xyz </velocities>
in the <initialize> block. Note that you should use atomic units, or specify one of the units that are understood by i-PI.

However, unless there is something special in your initialization or you want to reproduce results from a different code, there is no reason not to just start from thermal velocities.
If you have sampled properly the NVT ensemble, velocities are Gaussians distributed as exp(-p^2/2m kbT) so you can (easily) generate new ones that are perfectly compatible
with the ensemble.

Best
Michele

lch0...@gmail.com

unread,
Jun 1, 2021, 10:33:00 PM6/1/21
to ipi-users
Thanks a lot! That makes perfect sense to me.

I did not know I-pi initialize velocities from the Gaussian distribution. Softwares such as LAMMPS generate uniform distribution as default so I just kept things on the safer side, but thanks again for letting me know that.

Best,
CHL
Reply all
Reply to author
Forward
0 new messages