Dear Arko,
I have done similar think recently. I have used "cat" for changing input
files. Script "run_shelxd" takes an argument, which uses as prefix and run
SHELXD with various options of SHEL and SEED. It outputs "prefix_progress.
log" for control of done processes and for pause (you can stop the script by
placing file called "term" into the running folder) and resume.
Second handy thing is runnig various SHELXE parallely, since it is only one-
threaded application. You need to run it in BASH, because for example tcsh
handles jobs differently.
See both scripts enclosed, at least for inspiring.
Best regards
Jan
---------- Původní zpráva ----------
Od: Arka Chakraborty <[email protected]>
Komu: [email protected]
Datum: 28. 7. 2014 14:19:08
Předmět: Re: [ccp4bb] SCRIPT FOR RUNNING MULTIPLE RUNS OF SHELX C DE FOR RIP
"
Dear Dr. Tim Gruene,
Thanks a lot for helping me out. My limited knowledge of shell scripting
failed me. I will try it out.
Best Regards,
Arko
On Mon, Jul 28, 2014 at 1:49 PM, Tim Gruene <[email protected]
(mailto:[email protected])> wrote:
"Dear Arka Chakraborty,
such a task is best done with shell tools. Assuming you have a template
input file shelxc.inp with a line "DCSA 0.98", you can create the new
ones with
#> for i in $(seq -w 90 99); do
dsca=$(echo "scale = 3; $i / 100" | bc);
sed "s/DSCA 0.98/DSCA $dsca/" shelxc.inp > shelxc_${i}.inp;
done
and run shelxc with
for i in shelxc_*.inp; do
shelxc ${i%.inp} < $i | tee ${i%.inp}.log
done
and shelxd with
for i in shelxc_*_fa.ins; do
shelxd ${i%.ins}
done
If you have access to several machines, you can wrap the last,
time-consuming step into a shell script that changes into your working
directory to start shelxd. Then you can add the script to ssh in order
to remotely execute shelxd.
I did not explicitly test the scripts, but except for typos which should
be easy to correct, they should work.
Regards,
Tim
On 07/28/2014 01:10 PM, Arka Chakraborty wrote:
> Dear CCPers,
>
> I am running multiple runs of shelx c d e for a RIP dataset. Does anyone
> happen to have a script for doing 100s of runs varying the DSCA parameter
> for downscaling the 'after' dataset?. It will be of great help to me if
you
> could kindly share it.
> Also if you have past experience solving structures with RIP in low
> symmetry sg, eg. P1211 at ~2.9 ang resolution (according to I/sigmaI =1.9
> in the highest shell, CC half around 0.85) and would kindly share it that
> will be great.
>
> Thanks a lot,
>
> Best Regards,
>
> Arka Chakraborty
>
--
Dr Tim Gruene
Institut fuer anorganische Chemie
Tammannstr. 4
D-37077 Goettingen
GPG Key ID = A46BEE1A
"
--
Arka Chakraborty
ibmb (Institut de Biologia Molecular de Barcelona)
BARCELONA, SPAIN
" #!/bin/bash
#high=3.5
#seed=2
#low=15.0
#name = $1
# echo "" > $1_progress.log
rm term
for high in 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8
2.9 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0
do
for low in 60 30 20 19 18 17 16 15 14 13 12 11 10 9 8
do
for seed in 1 2 3
do
if [ -e "term" ] ; then
exit
fi
if [ `grep -c "$high - $low S$seed ...done" progress.log` !=
"0" ] ; then
continue
fi
fi
cp $1_fa.hkl $1_Lres$low.Hres$high.S$seed.fa.hkl
cp $1.hkl $1_Lres$low.Hres$high.S$seed.hkl
cp $1_fa.ins $1_Lres$low.Hres$high.S$seed.fa.ins
grep -v "SHEL" $1_Lres$low.Hres$high.S$seed.fa.ins > x
echo "SHEL $low $high" > $1_Lres$low.Hres$high.S$seed.fa.ins
cat x >> $1_Lres$low.Hres$high.S$seed.fa.ins
grep -v "SEED" $1_Lres$low.Hres$high.S$seed.fa.ins > x
echo "SEED $seed" > $1_Lres$low.Hres$high.S$seed.fa.ins
cat x >> $1_Lres$low.Hres$high.S$seed.fa.ins
shelxd $1_Lres$low.Hres$high.S$seed.fa
echo "$high - $low S$seed ...done" >> progress.log
done
done
done
#!/bin/bash
if [ -e /proc/cpuinfo ] ; then #Check processor count, or ask user.
cpumax=`grep -c "processor" /proc/cpuinfo` # TODO: get number of threads as parameter
echo "cpumax $cpumax"
else
echo "/proc/cpuinfo not found. Enter maximum number of threads: "
read cpumax
fi
for solv in {20..80}
do
jobcnt=`jobs -r | wc -l`
while [ $jobcnt -ge $cpumax ] ;
do
#sleep 5
jobcnt=`jobs -r | wc -l`
done
if [ ! -e $1.S$solv.hkl ] ; then
cp $1.hkl $1.Solv0.$solv.hkl
cp $2.hkl $2.Solv0.$solv.hkl
cp $2.res $2.Solv0.$solv.res
fi
shelxe $1.Solv0.$solv $2.Solv0.$solv -m40 -s0.$solv -h10 -z &
jobcnt=`jobs -r | wc -l`
while [ $jobcnt -ge $cpumax ] ;
do
#sleep 5
jobcnt=`jobs -r | wc -l`
done
wait
echo ""
echo "Process finished succesfully."