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

Suman Chakrabarty suman at sscu.iisc.ernet.in
Fri Nov 28 00:36:31 CET 2008

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! :)


More information about the gromacs.org_gmx-users mailing list