Re: [gmx-users] Scripting Analysis tools in tcsh
On Fri, 30 Jun 2006, Arneh Babakhani wrote: 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 You are probably having an extra space in front of the latter + sign. Now + and end are considered as input for g_hbond. Olli PS. For general shell script questions a newsgroup like comp.unix.shell is a good place to keep in mind. ___ gmx-users mailing listgmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php
Re: [gmx-users] Scripting Analysis tools in tcsh
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: While it is possible to do these things, it's rarely worth going to contortions with here documents when programs like Expect (http://expect.nist.gov/) have more fully-featured programming languages to approach things. Perl would also do a much better job at insulating the contents of the loop from the loop construct. If you've got 5 screws to put in, use a screwdriver, but if it's 500, then read the manual for how to use the drill attachment for the task and use it! :-) Mark ___ gmx-users mailing listgmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php
[gmx-users] Scripting Analysis tools in tcsh
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. Any suggestions? thanks, Arneh ___ gmx-users mailing listgmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php
Re: [gmx-users] Scripting Analysis tools in tcsh
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. ___ gmx-users mailing listgmx-users@gromacs.org http://www.gromacs.org/mailman/listinfo/gmx-users Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php