[gmx-developers] [RFE] Converting velocities / parsing with trjconv

Jay Mashl mashl at uiuc.edu
Tue Jun 4 17:01:28 CEST 2002


On Tue, 4 Jun 2002, Anton Feenstra wrote:
> Jay Mashl wrote:
> >
> > I have been looking for a way to generate velocity trajectories and ran into
> > some difficulties with trjconv. When nstvout > nstxout, there is a trivial hack
> > to do this.
> >
> > However, if the velocities have been saved more often than the coordinates
> > (i.e., nstvout < nstxout), then the default trjconv semes to overlook those
> > frames without a leading set of coordinates. Glancing at the source, it could
> > be that the velocities are read as coordinates instead.
>
> Hmm. that smells like a dirty bug...
>
> > What are your thoughts on providing a sort of "-nogro" option in trjconv?  It
> > might be nice to be able to split coordinate, velocity, and force trajectories
> > into separate files, regardless of the values for nstvout, nstxout, nstfout.
>
> I am not sure what you mean with '-nogro', but anyway, it should indeed
> be possible to select an arbitrary subset of velocities, coordinates and
> forces from a trajectory, regardless of the presence and frequency of any
> or all of them in the source trajectory.


Yes, that's it.  I am thinking of -nogro as -[no]gro, analogous to the -[no]vel
option. I was interested in the ASCII output in g96 format.  (In Gromacs96,
coordinate and velocity trajectory files were generated as separate files.)

To try Berk's suggestion of checking different output file formats, I did a
short run of water in a box with
  nsteps                   = 50
  nstxout                  = 10
  nstvout                  = 5
  nstfout                  = 0

with the output trajectory in the trr format.  Using trjconv to convert trr to
trj format works on all frames, but in converting to any of {g87, g96, gro,
pdb, xtc} only the frames that contain coordinates are converted and the
velocity-only frames are ignored.  Having velocities require there being
coordinates of course makes sense from the point of view of restarting a
simulation.

I have tried setting nstxout >> nsteps so that coordinates are written in the
first and last frames only, but I still could not access the velocity-only
frames using trjconv with the -b or -e options either. However if nstvout =
nstxout and I hack confio.c, I have been able to get what I needed.

Jay

---
R. Jay Mashl, Ph.D.        \     Natl Ctr for Supercomputing Applications
Computational Biology        \             4027 Beckman Institute, MC-251
mashl at ncsa.uiuc.edu            \                   University of Illinois
Tel. 217-244-5818, -2909(f)      \                      Urbana, IL  61801





More information about the gromacs.org_gmx-developers mailing list