From: Joshua D. Moore (
Date: Mon Dec 19 2011 - 10:48:36 CST


I have 2 dcd files, one with the coordinates and one with the
velocities. I would like to be able to read in the velocity *dcd to
assign the vx,vy,vz per atom along with the coordinates so that I
could eventually try to color by velocity.

My thoughts were along the lines of these posts

So I'm attempting to create 2 molecules, one with the coordinates (say
molid 0) and another with the velocities (say molid 1). However, I
can't figure out how to assign the vx,vy,vz fields in molid 0 with the
x,y,z (which correspond to the velocities) from molid 1.

Is there any easy command to set the vx,vy,vz?

Something like (which doesn't work all the way)

1) set sel_vel [atomselect 1 "index 0"]
2) set sel_coor [atomselect 0 "index 0"]
3) set velocities [$sel_vel get {x y z}]

Then I'm missing the next step to assign vx,vy,vz in molid 0 with the
"velocities" array I created in step 3 above?

So for this small example for index 0, I want the {x y z} from molid 1
stored as the {vx vy vz} in molid 0.

Is there any easier way to do this, other than to read in a LAMMPS
trajectory formatted file with topotools?

Thanks in advance.