[gmx-users] Automation of selecting water around a molecule

Lara Bunte lara.bunte at yahoo.de
Wed May 2 11:49:08 CEST 2012


Hi

I need a little help in using Linux. I wrote this script for the bash, that I called g_select_script.sh: 


#!/bin/bash
g_select -s mol_in_water.pdb -select '"Close to ISO" resname SOL and within 0.4 of resname ISO' -on
make_ndx -f mol_in_water.pdb -o index2.ndx
cat index2.ndx index.ndx > index3.ndx
make_ndx -f mol_in_water.pdb -n index3.ndx -o index_final.ndx
trjconv -n index_final.ndx -f mol_in_water.pdb -s mol_in_water.pdb -o output.pdb


After this I make a file called parameters_for_g_select_script, that looks like:

2
q
2|7
q
8

And finally I type in the bash this command: 


./g_select_script.sh < parameters_for_g_select_script

Sadly this does not work. It works correct until make_ndx -f mol_in_water.pdb -n index3.ndx -o index_final.ndx with parameters 2|7 and q

The numbers of the groups are correct. I guess, that 2|7 is not transfered correctly. I tried '2|7' and "2|7" that also do not work.


What is wrong in my automation? Please help a Linux noob like me. 


Greetings
Lara



More information about the gromacs.org_gmx-users mailing list