[gmx-users] To trjcat or not to trjcat

Justin Lemkul jalemkul at vt.edu
Thu Dec 15 15:52:52 CET 2016



On 12/14/16 7:23 PM, Alex wrote:
> Hi all,
>
> I have 20 simulated trajectories of equal duration (10 ns, frames are
> output every 50 ps), each subsequent simulation started from the output
> .gro of the previous. I can explain why, but it's likely to be immaterial.
>
> The goal is to have one complete trajectory that consists of all the parts
> in the correct order. This does not seem possible with -append, so at the
> moment it's basically a sequence of pretty much independent simulations,
> followed by trjcat. The latter requires using -settime and then becomes
> interactive. Is there a way to achieve what I need in a way that will not
> require this strange procedure? In other words, is there a way to
> _automatically_ properly offset the frames of all simulations, except for
> the very first one? That is, the offset for N-th (N=1:20) frame would be
> 10.05ns*(N-1).
>

Since the first frame of trajectory (N+1) will be the same as the last frame of 
trajectory N, then you need to do two things:

1. Use trjconv -b 50 to remove the first frame from all but the first 
trajectory.  This eliminates the duplicate frames.
2. Then use trjconv -t0 to set a new start time for each trajectory.  This is 
easily done as part of a loop in a shell script.
3. trjcat
4. Profit?

-Justin

-- 
==================================================

Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul

==================================================


More information about the gromacs.org_gmx-users mailing list