[gmx-users] Analyzing a trajectory split over multiple files

TJ Piggot t.piggot at bristol.ac.uk
Fri Nov 28 12:47:55 CET 2008

Just as a note most analysis tools have a -noxvgr option to output the 
results without any of the formatting information for grace.

Also I still think the easiest way to solve your problem is to just 
initially use trjcat to concatenate your trajectory, then run the analysis 
on this.


--On Friday, November 28, 2008 05:06:31 +0530 Suman Chakrabarty 
<suman at sscu.iisc.ernet.in> wrote:

> On Fri, Nov 28, 2008 at 4:24 AM, Nicolas <nsapay at ucalgary.ca> wrote:
>> Suman Chakrabarty a écrit :
>>> It would have been much easier if there was some way to concatenate
>>> the multiple .xvg files easily. Also, the analysis programs should be
>>> able to export the output data in raw 2 (or more) column format
>>> without all the formatting statements as an option.
>> Actually, there is:
>> grep -v "^#" *.xvg > concatenate.xvg
>> The -v "^#" will skip all the comment lines of your xvg files. Of course,
>> this assumes that your xvg files are correctly named, i.e. file01.xvg,
>> file02.xvg, etc. With a short shell script, you can easily re-add the
>> comments at the beginning of your concatenate file, renumber the frames
>> correctly, etc. It is more convenient to write a Python or a Perl script
>> to do this kind of stuff, though.
>> Nicolas
> Thank you very much! I always knew there must be something smart to be
> done. I should now delve into the nitty-gritty of scripting. grep
> seems to be a particularly useful tool! :)
> Regards,
> Suman.

TJ Piggot
t.piggot at bristol.ac.uk
University of Bristol, UK.

More information about the gromacs.org_gmx-users mailing list