[gmx-users] Scripting Analysis tools in tcsh

Arneh Babakhani ababakha at mccammon.ucsd.edu
Fri Jun 30 19:48:04 CEST 2006

Hello GMX users,

(this may be more of a tcsh question, but here goes anyway). 

I'm trying to write a script to go through some trajectories and 
calculate hbonding.  It looks like this:

foreach number (1 2 3 4 5 6 7 8 9 10 11)
        g_hbond -f ../../FullMD/FullMD$number.trr -s 
../../FullMD/FullMD$number.tpr -num hbnum-all-$number <<+

Here I'm using the g_hbond tool, and I'm trying to automate the process 
of selecting groups (I want groups 1 and 12). 

When I run this, the first iteration (number = 1) is executed just fine. 
Groups 1 and 12 are automatically selected. The analysis is completed, 
but then the loop is aborted.  (It doesn't go on to number = 2).  There 
is no error message.

Without the "<<+ 1 12 + "  syntax, the loop works just fine (but I have 
to manually select the groups for each iteration of the loop.  So I 
think I have a subtle syntax issue here.

Any suggestions?



More information about the gromacs.org_gmx-users mailing list