On 7/17/12 4:57 PM, Andrew DeYoung wrote:
Hi Justin,

I am just curious, do you have experience writing such a shell script to
iterate over the index files (one per frame)?  I am just curious, because I
have been trying this, and I have found it very difficult to do using bash.
Do you use a different shell language?

Also, I wonder if anyone has ever posted such a shell script on this list.
When I look through the archives, I don't see one, but I could be wrong.


Assume we have 100 groups of arbitrary size and a fixed group (index group 0) in the index file to which we wish to calculate hydrogen bonds. Then assume we have 100 separate files (from trjconv -sep or whatever else) numbered sequentially, i.e. conf1.gro, conf2.gro...conf100.gro. A simple bash script that runs through the index groups corresponding to each of these coordinate files would be something like:

#!/bin/bash

for i in {1..100}
do
    echo 0 $i | g_hbond -s topol.tpr -f conf$i.gro -n index.ndx
done

-Justin

--
========================================

Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================


--
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
* Only plain text messages are allowed!
* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
* Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org.
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to