I am working on my final year project in University. I am a Bio student and so no close to nothing when it comes to Linux.
I am running a simulation on a program called Amber 8 which runs on Linux. I have to run a series of fifteen shell scripts for a step (minimization) in my project and I am ages ages behind.
I managed to run my very first file a couple of weeks ago and it looks like this:
Code:
#!/bin/bash
cd /home/sandhya/p53
cp p53bp2.restrt refc
rm -f myprocfile
LSB_HOST=1
for i in $LSB_HOST; do
HN=`echo $i|cut -f 1 -d .`
echo "/usr/local/amber8/exe/sander -O -i newmd.in -o md1.out -p p53bp2.parmtop -c p53bp2.restrt -r restrt1 -ref refc -x mdcrd1 -v mdvel1 -e mden1 -inf mdinfo " >> myprocfile
done
chmod a+x myprocfile
cat myprocfile
I know it was successful as I can see both my input and output files in my directory. In my subsequent step which needs the files generated in this shell script and the addition of an input file h2.in (which I have in my directory), I modified my script in accordance to the one above, changing only filenames etc (as I was recommended to). However, I get the -bash: ./h2.sh: Permission denied
response.
My script, h2.sh looks like this:
Code:
#!/bin/bash
cd /home/sandhya/p53
cp restrt1 refc1
rm -f myprocfile
LSB_HOST=1
for i in $LSB_HOST; do
HN=`echo $i|cut -f 1 -d .`
echo "/usr/local/amber8/exe/sander -O -i h2.in -o md2.out -p p53bp2.parmtop -c restrt1 -r restrt2 -ref refc1 -x mdcrd2 -v mdvel2 -e mden2 -inf mdinfo1 " >> myprocfile
done
chmod a+x myprocfile
cat myprocfile
I am completely LOST at the moment but I have two questions.
a) what am I missing, doing wrong in my second script that I should be aware of and be careful of when I do the rest of my fifteen subsequent steps?
b) is the problem also in the fact that i am using "./h1.sh" as an invocation? Because i have a feeling that I may have forgotten how to run a shell script altogether (it's been two weeks since i last saw how to)?
Please please, someone help ASAP. I am very very doomed for my project. I am ready to provide more infos if any are lacking in this very desperate plea of a post.
Thanks alot. I am deeply appreciative of all those of you who can help.