Explanation of shell scripts used in some of these examples
- Using a shell script can be a useful way to run autobuster.
- The scripts here reflect how I refine autobuster.
- A typical script is 1osgBasicNCS_001_control_noncs
#!/bin/sh -f
# example script showing how autobuster can be run
# setup autoBUSTER
. $BDG_home/setup.sh
# write results to a directory:
RESULTDIR="ab_runs/"$0"_result"
#
(time refine \
-p 1osg_stripHOH_Brefine.pdb \
-m 1osg.mtz \
-B "individual" -noWAT -r 0.006 \
-d $RESULTDIR \
) > $0".log"
if [ $? -ne 0 ]
then
exit 1;
fi
# copy out the pdb and mtz files to this directory.
cp $RESULTDIR"/refine.pdb" $0"_refine.pdb"
cp $RESULTDIR"/refine.mtz" $0"_refine.mtz"
- to run the script download it
- make it executable use the command
chmod a+x 1osgBasicNCS_001_control_noncs
./1osgBasicNCS_001_control_noncs &
- the script runs the refine command it will produce:
- an output log file with the name 1osgBasicNCS_001_control_noncs.log
- an autobuster results directory with the name ab_runs/1osgBasicNCS_001_control_noncs_result
- the file .pdb coordinates and .mtz file will be copied into the current directory with names 1osgBasicNCS_001_control_noncs_result.pdb and 1osgBasicNCS_001_control_noncs_result.mtz
- The shell variable $0 means the script name so if the script is renamed so will the output files and directory.
- For efficiency, it is a good idea to make sure that the main autobuster results directory is on a local fast filesystem rather than for example an NFS filesystem. If you are working from a such a directory then before running any scripts use commands like:
mkdir /var/tmp/my_abruns
ln -s /var/tmp/my_abruns abruns
- these commands create a symbolic link to a local directory and the script will therefore will write to a subdirectory in this.
- I find this a convenient way to run autobuster:
- It creates pdb and mtz filenames that are easy to handle with coot.
- All the commands/options used in an autobuster run are contained with the script.
- local filesystems are used for the run but the script itself as well as the top log, mtz and pdb files are keep on a more reliable RAID and backed up filesystem.
Page by Oliver Smart original version 21 May 2008. Address problems, corrections and clarifications to buster-develop@globalphasing.com