N
nkomli
I'm trying to use a script to automate some Terminal command line work
I'm doing. Basically I'm inputting a filename, then running one set of
files with the sander program to generate an rst file used to start a
loop that will run the sander program again five times with other sets
of files. Since I don't have experience making scripts I'd like to show
what I've got so far to see if there are any mistakes. I don't know if
the filenames I'm using would work...
#!/bin/csh
set AMBERHOME="/usr/local/AMBER8"
set MDSTARTJOB=2
set MDENDJOB=6
set MDCURRENTJOB=$MDSTARTJOB
set MDINPUT=1
echo -n "enter filename"
$filename=<STDIN>
chop($filename);
echo -n "Starting Script at: "
date
echo ""
echo -n "Warming started at: "
date
$AMBERHOME/exe/sander -O -i hot.in \
-o hot$filename.out \
-p $filename.prmtop \
-c $filename.rst \
-r $filename$MDINPUT.rst \
-x hot$filename.mdcrd
echo -n "Job hot$filename finished at: "
date
while ( $MDCURRENTJOB <= $MDENDJOB )
echo -n "Job $MDCURRENTJOB started at: "
date
@ MDINPUT = $MDCURRENTJOB - 1
$AMBERHOME/exe/sander -O -i mdp53.in \
-o $filename$MDCURRENTJOB.out \
-p $filename.prmtop \
-c $filename$MDINPUT.rst \
-r $filename$MDCURRENTJOB.rst \
-x $filename$MDCURRENTJOB.mdcrd
gzip -9 -v $filename$MDCURRENTJOB.mdcrd
echo -n "Job $MDCURRENTJOB finished at: "
date
@ MDCURRENTJOB = $MDCURRENTJOB + 1
end
echo "ALL DONE"
I'm doing. Basically I'm inputting a filename, then running one set of
files with the sander program to generate an rst file used to start a
loop that will run the sander program again five times with other sets
of files. Since I don't have experience making scripts I'd like to show
what I've got so far to see if there are any mistakes. I don't know if
the filenames I'm using would work...
#!/bin/csh
set AMBERHOME="/usr/local/AMBER8"
set MDSTARTJOB=2
set MDENDJOB=6
set MDCURRENTJOB=$MDSTARTJOB
set MDINPUT=1
echo -n "enter filename"
$filename=<STDIN>
chop($filename);
echo -n "Starting Script at: "
date
echo ""
echo -n "Warming started at: "
date
$AMBERHOME/exe/sander -O -i hot.in \
-o hot$filename.out \
-p $filename.prmtop \
-c $filename.rst \
-r $filename$MDINPUT.rst \
-x hot$filename.mdcrd
echo -n "Job hot$filename finished at: "
date
while ( $MDCURRENTJOB <= $MDENDJOB )
echo -n "Job $MDCURRENTJOB started at: "
date
@ MDINPUT = $MDCURRENTJOB - 1
$AMBERHOME/exe/sander -O -i mdp53.in \
-o $filename$MDCURRENTJOB.out \
-p $filename.prmtop \
-c $filename$MDINPUT.rst \
-r $filename$MDCURRENTJOB.rst \
-x $filename$MDCURRENTJOB.mdcrd
gzip -9 -v $filename$MDCURRENTJOB.mdcrd
echo -n "Job $MDCURRENTJOB finished at: "
date
@ MDCURRENTJOB = $MDCURRENTJOB + 1
end
echo "ALL DONE"