[gmx-users] cannot print velocity information to trr/xtc files (Carbon Naotube inside water)

Mark Abraham Mark.Abraham at anu.edu.au
Thu May 22 04:43:13 CEST 2008


CIHAN NADIR KAPLAN wrote:
> Dear all,
> 
> I am doing a simulation of a carbon nanotube (CNT) inside water.
> First I am going to describe my problem and then give info about my
> simulation setup (initial conditions, parameters, etc.).
> 
> My problem is as follows:
> 
> (1) I am doing a *.gro file of a *.pdb of a (16,16) CNT, without
> using pdb2gmx, that is with my own code. I also add manually velocity
> columns (vx, vy, vz) = (0, 0, 0) to the *.gro file. It works
> properly, since VMD and various gromacs commands can process the
> *.gro file.

This doesn't serve a purpose that I can see.

> (2) Then, I use editconf  in order to center the nanotube and set up
> a rectangular box. There, when I give a finite velocity (just to
> check) to every carbon (C) atom in CNT , such as (vx, vy, vz) =
> (0.0001, 0.0001, 0.0001) for every C, then   editconf preserves the
> velocity info and includen in the output *.gro file. In fact I should
> fix the position of the nanotube. But when (vx, vy, vz) = (0, 0, 0),
> then it says "cannot find velocity information" or something like
> that and ignores the velocity columns.
> 
> (3) So, after that, when I use genbox in order to fill the box with
> water, than all the velocity information disappears, no matter
> whether the initial velocity for C atoms are finite or simply 0. The
> gro file includes the coordinates of both CNT and H2O molecules, but
> there is no velocity info!

Keeping them really doesn't serve a purpose - you've radically changed 
the system, so those old velocities can't be from a meaningful ensemble 
any more, even if they were to start with.

> (4) Then I run grompp with my output *.gro file, *.top (topology)
> file and *.mdp file which I will describe the settings below, in
> order to produce a *.tpr file. When I read the resulting *.tpr file
> with gmxdump, again there are just coordinates, no velocity columns.

With gen_vel = no then this should be expected.

> (5) I do an energy minimisation step, I check the output (both the
> *.trr file and *.gro file) again there is no velocity info.

Since EM is mechanical, not dynamical, there are no velocities.

> (6)After that, again I modify my *.mdp file in order to do MD, I run
> grompp just as before, than mdrun, and there is no velocity info both
> in *.trr and *.xtc files, even if nvout=positive integer and
> gen_vel=yes  (when it is set to be"no", then again there should be
> velocity info in the following time steps). 

You need 0 < *nstvout* to see velocity output. You won't see velocities 
in the .xtc file because that's not the purpose of the .xtc file. See 
http://wiki.gromacs.org/index.php/.xtc_file. IIRC the value of gen_vel 
is immaterial here, since the dynamics will start from zero velocities 
if you don't generate them. grompp will probably give you a warning 
about this, so make sure you check for them! mdrun will always write 
velocities at the final timestep, regardless of nstvout too. You will 
also need to change the integrator to md.

 > I also tried to put to
 > input *.gro file velocity columns by hand, but it didn't work.

That doesn't make sense in the context.

> What is going on here? How can I get velocity info? Any help will be
> greatly appreciated. Note that, there is an external acceleration on
> the water molecules, where is the position of CNT is fixed. So
> obviously water molecules should have finite velocities.

Turn off the weird stuff (freeze groups and accelerate groups) until 
you've got your basic issues sorted out. MD simulations in general and 
CNT simulations in particular are not easy things to do right. Learn to 
walk before you try to run! :-)

Mark



More information about the gromacs.org_gmx-users mailing list