Hi all,
I have a big file (n.txt) with following pattern:
ATOM 1 N SER A 1 122.392 152.261 138.190 1.00 0.00 N
ATOM 2 CA SER A 1 122.726 151.241 139.183 1.00 0.00 C
TER
ENDMDL
ATOM 1 N SER A 1 114.207 142.287 135.439 1.00 0.00 N
ATOM 2 CA SER A 1 113.667 143.509 134.894 1.00 0.00 C
TER
ENDMDL
I am using following script to read pattern and assign structure to them using another program st giving 2 output files-fn.str -m.mol:
pattern_txt=n.txt
npattern=`grep -c ENDMDL $pattern_txt`
echo $npattern patterns. Assigning_structure:
echo $npattern > st_input
seq -w 1 $npattern >> st_input
st $pattern_txt -fn.str -mn.mol
But this script is reading only first pattern and giving structure of that pattern by running st program. I wish to have structure for all patterns.
Please guide.