[gmx-users] Scripting Analysis tools in tcsh

paloureiro at biof.ufrj.br paloureiro at biof.ufrj.br
Fri Jun 30 19:57:47 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:
>
> #!/bin/tcsh
> 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 <<+
> 1
> 12
> +
> end
>
> 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.

Hi,

I will give you a csh script (of course, between [] lie your file names):

#!/bin/csh

set n = 0
set c = 1


while ( $n <= 127 )



   echo "$n\n" |  g_gyrate_mpi -f [traj].xtc -s [mol].tpr -n  
[index].ndx -o [graph]$c.xvg -b [time]
   rm '#'*'#'
    @ n = ($n + 1)
    @ c = ($c + 1)
end

> Any suggestions?
>


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the gromacs.org_gmx-users mailing list