This requires 145 XDS_ASCII.HKL files collected at X06SA (SLS).

generating XSCALE.INP for scaling

mkdir <attendee_name>_SSX  (e.g. Greta_SSX)
find  PepT_SE_145/ (directory with data) -name xtal* > xcale_tut/xscale.inp
cd xscale_tut
sed s/PepT/'INPUT_FILE=..\/PepT'/ xscale.inp  >xscale.inp1
sed s/xtal_/"test "/ xscale.inp1 |sort -n -k2 |sed s/"test "/xtal_/ > XSCALE.INP

paste this into the header:

UNIT_CELL_CONSTANTS= 104.056 110.896 110.369 90 90 90 
SPACE_GROUP_NUMBER=20
MINIMUM_I/SIGMA=1
OUTPUT_FILE=all_145.hkl
SAVE_CORRECTION_IMAGES=FALSE
PRINT_CORRELATIONS=FALSE
WFAC1=1

scale everything together

rm xscale.inp xscale.inp1
xscale_par

-->have a look at XSCALE.LP

run xscale_isocluster

xscale_isocluster -dim 3 all_145.hkl > XSCALE_ISO.OUTPUT_FILE

--> check output

we obtain 4 clusters

coot iso.pdb & 

--> explain what we see... --> show an INPUT_FILE

color the 4 clusters

grep xtal XSCALE.1.INP |sed s/'INPUT_FILE=..\/kay_pepT_SE_145\/xtal_//' |sed 's/.HKL//' |awk '{print $1+1}' > selection_1
awk 'FNR==NR {a[$1]=0 ;next}{ if($2 in a){printf "%6s%5i%3s%6s%2s%4s%12.3f%8.3f%8.3f%11s\n",$1,$2,"S",$4,$5,$6,$7,$8,$9,$10} \
                              else{print $0}}' selection_1 iso.pdb  >sel_1.pdb

--> do that for all 4 clusters

look at the 4 clusters

decide which clusters one would take for structure solution

Here: 1. and 4. cluster

cp ../xscale_tut/XSCALE.1.INP .
cp ../xscale_tut/XSCALE.4.INP .

awk '{ one = $1 ; getline ; print one " "  $7 " " $8;getline}' XSCALE.1.INP |grep 'INPUT_FILE' >temp
awk '{ one = $1 ; getline ; print one " "  $7 " " $8;getline}' XSCALE.4.INP |grep 'INPUT_FILE'>>temp

sort -nr -k2 temp >temp1

--> look at temp1 , combined clusters ,sorted by strength --> remove lowest (until strength of 0.6)

awk '{print $1}' temp1 > XSCALE.INP 

paste this into header:

UNIT_CELL_CONSTANTS= 104.056 110.896 110.369 90 90 90 
SPACE_GROUP_NUMBER=20
MINIMUM_I/SIGMA=1
OUTPUT_FILE=1+4.hkl
SAVE_CORRECTION_IMAGES=FALSE
PRINT_CORRELATIONS=FALSE
WFAC1=1

solve structure with SHELXC/D/E

(use hkl2map)!


other option: run xscale_isocluster with the option -clu 1 and sort by strength, take the upper ones and solve the structure.