[gmx-users] trjconv sampling according to a list of arbitrary times

Christopher Neale chris.neale at alum.utoronto.ca
Sat Dec 3 00:09:37 CET 2016

 I don't know how to do exactly what you want to do, but you can at least do this so that trjconv doesn't seek from the beginning of the file, it should speed things up a lot:

for t in 1 20 220 620; do
  let b=$t-10
  gmx trjconv -dump $t -b $b ...

Anyway, Mark's suggestion is much better because it will help you to avoid your cluster admins getting mad for you creating millions of small files ;)

From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of Irem Altan <irem.altan at duke.edu>
Sent: 02 December 2016 18:00:50
To: gmx-users at gromacs.org
Subject: [gmx-users] trjconv sampling according to a list of arbitrary times


I have a very long simulation and I want to run trjconv on the output to save snapshots from a list of times. For instance if t = [1,20, 220, 620] in ps, I would do:

gmx trjconv -f all.trr -s nvt.tpr -dump 1 -o conf1.pdb
gmx trjconv -f all.trr -s nvt.tpr -dump 20 -o conf2.pdb
gmx trjconv -f all.trr -s nvt.tpr -dump 220 -o conf3.pdb
gmx trjconv -f all.trr -s nvt.tpr -dump 620 -o conf4.pdb

and then join them with trjcat. This is very easy to do with a script. My problem is, each time I run trjconv, gromacs scans the .trr file from the first frame until the desired frame. So if I want to save 300 such configurations, I have to wait for the file to be read 300 times.

Is it possible to do this with a single trjconv command, and somehow provide a list of the times I want to sample, so that gromacs reads the file once and saves the necessary snapshots?

Gromacs Users mailing list

* Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!

* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

* For (un)subscribe requests visit
https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.

More information about the gromacs.org_gmx-users mailing list