[gmx-users] writing script to analyze gmx data

David van der Spoel spoel at xray.bmc.uu.se
Wed May 25 08:54:49 CEST 2005


On Wed, 2005-05-25 at 13:17 +0800, Zhiguo Liu wrote:
> Dear Jian Zou,
> 
> 	That's easy, if you use bsh, just do as following:
> 
> #!/bin/sh
> g_dist -f md.trr -s b4md.tpr -n index.ndx -o dist.xvg << EOF
> 2
> 5
> EOF

or

echo 2 5 | g_dist -f md.trr -s b4md.tpr -n index.ndx -o dist.xvg

> 
> 
> 
> ======= 2005-05-25 13:03:41 you wrote=======
> 
> >Hi all,
> >
> >I have a question about writing a script to analyze gmx data..
> >
> >some analysis utilities of gromacs need keyboard input after running the 
> >command.
> >
> >how could I incorporate this keyboard input into the script?
> >
> >
> >for example, I want use "g_dist" to calculate the distance between Group 2
> >and Group 5, I write the following script:
> >
> >----start of the script----
> >#!/bin/sh
> >g_dist -f md.trr -s b4md.tpr -n index.ndx -o dist.xvg
> >----end of the script----
> >
> >the input file "md.trr", "b4md.tpr", "index.ndx"
> >and output the distance between Group 2 and Group 5 into the file
> >"dist.xvg".
> >
> >after running the script, it will prompt to select the groups, I will input
> >2 and 5 for this case.
> >
> >I want to write sth. to put these selection into the script, then what
> >should I do?
> >
> >
> >Thanks a lot in advance.
> >
> >
> >Regards,
> >
> >Jian Zou
> >
> >_______________________________________________
> >gmx-users mailing list
> >gmx-users at 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 gmx-users-request at gromacs.org.
> >
> 
> = = = = = = = = = = = = = = = = = = = =
> 			
> 
> Best regard!
>  
> 				 
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Zhiguo Liu
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡zgliu at iris3.simm.ac.cn
> ¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2005-05-25
> 
> 
> _______________________________________________
> gmx-users mailing list
> gmx-users at 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 gmx-users-request at gromacs.org.
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,          75124 Uppsala, Sweden
phone:  46 18 471 4205          fax: 46 18 511 755
spoel at xray.bmc.uu.se    spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





More information about the gromacs.org_gmx-users mailing list