posre.sh
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
gmx='/tmp/current/bin/gmx' |
4 |
|
5 |
pdb='chainTer.pdb' |
6 |
itpA='topol_Protein_chain_A.itp' |
7 |
itpB='topol_Protein_chain_B.itp' |
8 |
|
9 |
$gmx pdb2gmx -f $pdb -ff 'amber03' -water 'tip3p' |
10 |
|
11 |
#works |
12 |
protein_ca_sel='chain A and name CA' |
13 |
current='ca-A' |
14 |
$gmx select -s $pdb -on $current.ndx -select "$protein_ca_sel" |
15 |
$gmx genrestr -f $pdb -n $current.ndx -o posre_$current.itp |
16 |
echo -e "; Include Position restraint file |
17 |
#ifdef POSRES_CA |
18 |
#include \"posre_$current.itp\" |
19 |
#endif\n" >> $itpA |
20 |
$gmx grompp -f ca.mdp -c conf.gro -p topol.top -o ca-A.tpr -r conf.gro |
21 |
|
22 |
|
23 |
#fails |
24 |
protein_ca_sel='chain B and name CA' |
25 |
current='ca-B' |
26 |
$gmx select -s $pdb -on $current.ndx -select "$protein_ca_sel" |
27 |
$gmx genrestr -f $pdb -n $current.ndx -o posre_$current.itp |
28 |
echo -e "; Include Position restraint file |
29 |
#ifdef POSRES_CA |
30 |
#include \"posre_$current.itp\" |
31 |
#endif\n" >> $itpB |
32 |
$gmx grompp -f ca.mdp -c conf.gro -p topol.top -o ca-B.tpr -r conf.gro |
33 |
|