[AMBER] Howto cpptraj - multiple trajin-commands in one line

From: Falko Jähnert <falko.jaehnert.biochemtech.uni-halle.de>
Date: Thu, 14 Jan 2016 13:25:22 +0100

Dear AMBER-experts,

I want to automatise my trajectory analysis. For that I use a bash script to read them in using:

cpptraj prmtop <<EOF
   trajin xxx_1.mdcrd
   trajin xxx_2.mdcrd
   trajin xxx_3.mdcrd
   ##analysis commands##
   go
EOF

My filenames and my mdcrd counts differ a bit from run to run so I like to fill them in using variables. Filenames are not a problem, but the number of mdcrd files I would like to determine via checking if a filename-variable is setted. In this case I attach the trajin command for that file to an array.

if [ -n "$xxx_1" ]; then
   Array+=('##necessary command##)
fi

Now I have the problem of using this array to call all the trajins.
Is there a way in cpptraj to call multiple files with one trajin command? (i.e.: trajin xxx1.mdcrd xxx2.mdcrd xxx3.mdcrd)
Alternative, is it possible to get those trajin commands in a single line? (i.e.: trajin xxx1.mdcrd; trajin xxx2.mdcrd; trajin xxx3.mdcrd)

This will enforce the way I have to use for implementing the array filling function.

Thanks in advance for your help! Hope, I didn't oversee these question in the Mailing Archive...
Falko.





_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jan 14 2016 - 05:00:03 PST
Custom Search