[AMBER] Problem on Running Shell Script

From: tianyuan meng <oceanrabbit.mty.gmail.com>
Date: Mon, 24 May 2010 17:38:54 +0800

Hi guys, I am running a shell script but problem appeared. I don't know
what's wrong. My shell script reads like:

#!/bin/sh
###take snapshots at 100ps generate reference files
cat<<EOF>ptraj.in
trajin wt1mg_dry.crd 1 100 10
trajout wt1mg_ref restart
go
EOF
ptraj wt1mg_dry.parm7 ptraj.in

###calculate the rmsd for each reference structure
for ref in wt1mg_ref*;do
 set ofile=$ref.rms
 cat<<EOF>rms.ptraj
trajin wt1mg_dry.crd 1 100
reference $ref
rms reference out $ofile.rms :1-154
go
EOF
 ptraj wt1mg_dry.parm7 rms.ptraj
done

###clean up the files and merge them into a single file
cp wt1mg_ref.2.rms rms1
set i=10
while ( $i <=100 );do
 cut -b12-20 wt1mg_ref.$i.rms>tmp
 paste rms1 tmp>rms
 cp rms rms1
 . i=$i+10
done
rm *.rms rms1 tmp
mv rms relax.rms

It is anticipated to get a file named "relax.rms ", but no file was created
when I tried the third part of my script. The error showed that no
"wt1mg_ref.2.rms" was found.

Thanks in advance.

Yours,
Tianyuan
-- 
Bioengineering
School of Life Science and Technology
Xi'an Jiaotong University
oceanrabbit.mty.gmail.com
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 24 2010 - 03:00:07 PDT
Custom Search