Example sbatch scripts for commonly used MX software

Here we share exampels of sbatch scripts for software that benefit from multiple cores. We also share links to tutorials and MX software documentation that enables readers to adapt these scripts to their own projects.

Example 1 BUSTER

BUSTER is a 3D structure refinement package homepage made by Gerard Bricogne and colleagues at GlobalPhasing. BUSTER is suitable for batch scripting and well documented including wiki and tutorials. Allocating 8 threads by #SBATCH -n 8 --exclusive is sufficient when running BUSTER - see BUSTER docs for more info

#!/bin/sh -eu
#SBATCH -t 1:00:00
#SBATCH -n 8 --exclusive
#SBATCH -A naiss2023-22-811
module load BUSTER/20211020-3-PReSTO
refine -p 66_xyzout_prosmart_refmac_LINK.pdb \
-m ./staraniso.mtz \
-l 52_dict_prosmart_refmac.cif \
-nthreads 8 \
-Gelly tweak1.gelly \
-autoncs \
-TLS \
AutomaticFormfactorCorrection=yes \
StopOnGellySanityCheckError=no \
-d buster1 > buster1.log

buster1.script execute by sbatch buster1.script

Example 2 Pipedream

Pipedream is an expert system for data processing and ligand refinement and part of the BUSTER suite. Please enjoy the pipedream tutorial

#!/bin/sh -eu
#SBATCH -t 4:00:00
#SBATCH -N1 --exclusive
#SBATCH -A naiss2023-22-811
module load BUSTER
pipedream -h5master /proj/xray/users/x_marmo/data/protA-x1_1_master.h5 \
-l grade-LIG.cif \
-xyzin apo_structure.pdb \
-nofreeref \
-nthreads 32 \
-d pipe_LIG_PReSTO > pipe_LIG_PReSTO.log

pipedream1.script execute by sbatch pipedream1.script

Example 3 Rhofit

Rhofit is software for automated fitting of ligands to difference density and part of the BUSTER suite. Please adapt rhofit tutorial to your projects.

#!/bin/sh -eu
#SBATCH -t 1:00:00
#SBATCH -N1 --exclusive
#SBATCH -A naiss2023-22-811
module load BUSTER
rhofit -l grade-LIG.cif    \
-p pipe_LIG_PReSTO/refine/refine.pdb \
-m pipe_LIG_PReSTO/refine/refine.mtz \
-d rhofit_1 > rhofit1.log

rhofit1.script execute by sbatch rhofit1.script

Example 4 autoSHARP

autoSHARP is software for automated SHARP phasing and model building of protein 3D structures using many softwares from the the CCP4 and SHELX suite. autoSHARP is ideal for sbatch scripting so please enjoy the SHARP/autoSHARP wiki or run a test job

#!/bin/sh -eu
#SBATCH -t 2:00:00
#SBATCH -N1 --exclusive
#SBATCH -A naiss2023-22-811
module load SHARP
run_autoSHARP.sh \
-seq sequence.pir -ha "Zn" \
-nsit 20 \
-wvl 1.28334 peak -mtz pk.mtz \
-wvl 1.27838 infl -mtz ip.mtz \
-wvl 0.91841 hrem -mtz rm.mtz \
-id MADjob1 | tee MADjob1.lis

autosharp1.script execute by sbatch autosharp1.script

Example 5 Arcimboldo Lite

Arcimboldo_lite is software for ab-initio phasing and modelbuilding that may be attempted at very high resolution. Arcimboldo use many softwares from CCP4 and SHELX in similarity to autoSHARP and may be described as molecular replacement with secondary structure fragments.

Arcimboldo_lite (1) is for high resolution ab initio phasing and 4eto was used for benchmarking (2)

1. ARCIMBOLDO_LITE: single-workstation implementation and use.
Sammito M, Millán C, Frieske D, Rodríguez-Freire E, Borges R, Usón I
Acta Crystallogr. D Biol. Crystallogr. 2015 Sep;71(Pt 9):1921-30
2. Macromolecular ab initio phasing enforcing secondary and tertiary structure.
Millán C, Sammito M, Usón I
IUCrJ 2015 Jan;2(Pt 1):95-105

Benchmarking 4j5m data-files can be downloaded and executed via sbatch arcimboldo.script

#!/bin/sh -eu
#SBATCH -t 2:00:00
#SBATCH -N1 --exclusive
#SBATCH -A naiss2023-22-811
module load CCP4

job=4j5m
ARCIMBOLDO_LITE ${job}.bor > ${job}.log

arcimboldo1.script execute by sbatch arcimboldo1.script

To run your own job please modify the arcimboldo.script above and 4eto.bor file according to arcimboldo lite manual

# 4j5m.bor - start
[CONNECTION]:
distribute_computing: multiprocessing

[LOCAL]
path_local_phaser: /software/presto/e/9.0/software/CCP4/8.0.013-foss-2021a-SHELX-ARP-8.0/ccp4-8.0/bin/phaser
path_local_shelxe: /software/presto/e/9.0/software/CCP4/8.0.013-foss-2021a-SHELX-ARP-8.0/ccp4-8.0/bin/shelxe

[GENERAL]:
working_directory=/proj/xray/users/x_marmo/demo/arcimboldo1
mtz_path: %(working_directory)s/4j5m.mtz
hkl_path: %(working_directory)s/4j5m_3.hkl

[ARCIMBOLDO]
name_job: 4j5m
molecular_weight: 45635 
f_label= FOBS
sigf_label= SIGFOBS
number_of_component: 1
fragment_to_search: 4
helix_length: 22
force_core: -1
# 4j5m.bor - end

4j5m.bor input file for arcimboldo1.script

Example 6 Anomalous data processing using cbf files

Many beamlines with Pilatus detectors output cbf-files instead of HDF5 containers. Below is the BioMAX script adapted for Tetralith with 32 cores per node and using cbf files instead of HDF5 containers. To run cbf.script copy-paste it and make it runnable by chmod 755 cbf.script, create the output directory and execute ./cbf.script /path/file_00001.cbf /path/output-directory 1 3600 and please note the output directory must exist or otherwise the scripts does not run.

cbf.script - a script for running XDSAPP, DIALS and autoPROC with .cbf files adapted for NSC Tetralith (32 nodes)

#!/bin/sh -eu
#
# Argument list:
# $1: indata 
# $2: utdata
# $3: fromrange 
# $4: torange  

indir=`realpath -es "$1"`
outdir=`realpath -es "$2"`
dirToFile="$(dirname "$indir")"
cbf_file="$(basename "$indir")"
cbf_bars="$(echo $cbf_file | sed 's/00001.cbf/#####.cbf/g' | sed 's/0001.cbf/####.cbf/g' | sed 's/001.cbf/###.cbf/g')"

xdsapp="\
module load XDSAPP3
xdsapp --cmd --dir=$outdir/xdsapp -j 8 -c 8 -i $indir  --fried=false --range=$3\ $4 --spotrange=$3\ $4
"

autoproc="\
module load autoPROC
process \
    -Id id1,$dirToFile,$cbf_bars,$3,$4 \
    -ANO \
    autoPROC_XdsKeyword_MAXIMUM_NUMBER_OF_JOBS=4 \
    autoPROC_XdsKeyword_MAXIMUM_NUMBER_OF_PROCESSORS=8 \
    autoPROC_XdsKeyword_DATA_RANGE=$3\ $4 \
    autoPROC_XdsKeyword_SPOT_RANGE=$3\ $4 \
    -d $outdir/autoproc 
"

dials="\
module load DIALS
cd $outdir/dials
xia2 atom=X \
    pipeline=dials failover=true \
    image=$indir:$3:$4 \
    multiprocessing.mode=serial \
    multiprocessing.njob=1 \
    multiprocessing.nproc=auto
"

# autoproc bails out if its outdir basename exists; don't make it
mkdir "$outdir/xdsapp" "$outdir/dials"

#echo "$xdsapp"
#echo "$autoproc" 
#echo "$dials"

sbatch -N2 --exclusive --ntasks-per-node=32 -A naiss2023-22-811 -t 00:10:00 -J XDSAPP   -o "$outdir/xdsapp.out"   --wrap="$xdsapp"
sbatch -N1 --exclusive --ntasks-per-node=32 -A naiss2023-22-811 -t 00:30:00 -J autoPROC -o "$outdir/autoproc.out" --wrap="$autoproc"
sbatch -N1 --exclusive --ntasks-per-node=32 -A naiss2023-22-811 -t 00:30:00 -J DIALS    -o "$outdir/dials.out"    --wrap="$dials"

User Area

User support

Guides, documentation and FAQ.

Getting access

Applying for projects and login accounts.

System status

Everything OK!

No reported problems

Self-service

SUPR
NSC Express