Scaling with SCALA (or better: aimless): Difference between revisions

From XDSwiki
Jump to navigation Jump to search
No edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
An example script to convert XDS_ASCII.HKL into a [http://www.ccp4.ac.uk CCP4] multi-record MTZ file is:
== How to switch off scaling in CORRECT ==


  #!/bin/csh -f
If one wants to completely switch scaling off in CORRECT, use
  #
  MINIMUM_I/SIGMA=50
  # Scale data from XDS
  CORRECTIONS=
#
  NBATCH=1
combat hklin XDS_ASCII.HKL hklout junk.mtz << end-combat
in [[XDS.INP]]. MINIMUM_I/SIGMA=50 prevents the sigmas from being adjusted. This also prevents outlier rejection and geometry refinement. Since the latter may be desired it would be most appropriate to use MINIMUM_I/SIGMA=50 only after [[Optimization]] (re-cycling of GXPARM.XDS to XPARM.XDS). Prevention of outlier rejection would be also obtained by using (e.g.) WFAC1=2. NBATCH=1 removes any basic scaling done by CORRECT (as referred to by [https://journals.iucr.org/s/issues/2011/03/00/xh5026/index.html Krojer and von Delft]).
MONITOR 10000
 
INPUT XDSASCII
A good option might be to make CORRECT only do MODULATION correction since this is not easily available in SCALA:
ADDBATCH 200            # optional: modify batch numbers
  CORRECTIONS= MODULATION
TITLE  Test combat
NAME PROJECT myproject CRYSTAL mycrystal DATASET native
END
end-combat
sortmtz hklout junk_sort.mtz  << end-sort
H K L M/ISYM BATCH I SIGI
junk.mtz
end-sort
scala hklin junk_sort.mtz hklout junk_scaled.mtz << end-scale
# scale using default parameters
run 1 batch 1 to 1000
scales rotation spacing 5 bfactor off
anomalous on
  end-scala
   
   
truncate  hklin  junk_scaled.mtz \
This can also be combined with NBATCH=1.
          hklout junk_truncated.mtz <<end-trunc
anomalous yes
nresidue  1049
labout  F=FP SIGF=SIGFP DANO=DANO_sulf SIGDANO=SIGDANO_sulf
end-trunc


In this way one gets the well-known outputs of [http://www.ccp4.ac.uk/html/scala.html SCALA] and [http://www.ccp4.ac.uk/html/truncate.html TRUNCATE].
== Using pointless and aimless ==


----
[[pointless]] produces a multi-record MTZ file (suitable for SCALA/aimless and TRUNCATE) from XDS_ASCII.HKL, or the XSCALE reflection output file (see also "[ftp://ftp.ccp4.ac.uk/ccp4/6.0.2/prerelease/runningpointlessandscala.pdf Running Pointless and Scala]"). Note that this may use [[XDS]] for some or most of the scaling.
(see above for how to switch off scaling in [[XDS.INP]], partly or fully).


The equivalent XDSCONV.INP (recommended) would be just:
  pointless -copy xdsin XDS_ASCII.HKL hklout XDS_ASCII.mtz
  INPUT_FILE=XDS_ASCII.HKL
  aimless hklin XDS_ASCII.mtz hklout junk_scaled.mtz | tee aimless.log
INCLUDE_RESOLUTION_RANGE=50 1  ! optional
OUTPUT_FILE=temp.hkl  CCP4    FRIEDEL'S_LAW=FALSE
(XDSCONV picks up space group and cell parameters from XDS_ASCII.HKL.) After running XDSCONV one would then run
  f2mtz HKLOUT temp.mtz<F2MTZ.INP
cad HKLIN1 temp.mtz HKLOUT junk_truncated.mtz<<EOF
LABIN FILE 1 E1=FP E2=SIGFP E3=DANO E4=SIGDANO
LABOUT FILE 1 E1=FP E2=SIGFP E3=DANO_sulf E4=SIGDANO_sulf
END
EOF


----
Obviously, the aimless run can be modified using suitable options.


Another way of going from a XDS formatted reflection file to a MTZ file is via the [http://www.ccp4.ac.uk/prerelease_page.php#pointless pointless] program by [ftp://ftp.mrc-lmb.cam.ac.uk/pub/pre/ Phil Evans]:
See below for how to run TRUNCATE.


Scaling and Assessment of Data Quality, Philip Evans, Acta Cryst D 62, 72-82.
If one then needs to edit the batch information in this file, the CCP4 program [http://www.ccp4.ac.uk/dist/html/rebatch.html REBATCH] can be used (optional):
 
(see also "[ftp://ftp.ccp4.ac.uk/ccp4/6.0.2/prerelease/runningpointlessandscala.pdf Running Pointless and Scala]").
 
pointless -copy xdsin XDS_ASCII.HKL hklout XDS_ASCII.mtz
 
The advantage of this route is, that the batch headers of the resulting MTZ file are correct - [http://www.ccp4.ac.uk/dist/html/combat.html COMBAT] doesn't seem to write complete and accurate headers. If one then needs to edit the batch information in this file, the CCP4 program [http://www.ccp4.ac.uk/dist/html/rebatch.html REBATCH] can be used (optional):


  rebatch hklin XDS_ASCII.mtz hklout XDS_ASCII_rebatch.mtz <<end_ip
  rebatch hklin XDS_ASCII.mtz hklout XDS_ASCII_rebatch.mtz <<end_ip
Line 65: Line 30:
  BATCH ALL PNAME Lysozyme XNAME Hg-Soak DNAME peak
  BATCH ALL PNAME Lysozyme XNAME Hg-Soak DNAME peak
  end_ip
  end_ip
 
  sortmtz hklout sortmtz.mtz <<end_ip
  sortmtz hklout sortmtz.mtz <<end_ip
  H K L M/ISYM BATCH
  H K L M/ISYM BATCH
Line 72: Line 37:


Note: another program to work with those multi-record MTZ files is [http://www.ccp4.ac.uk/dist/html/reindex.html REINDEX].
Note: another program to work with those multi-record MTZ files is [http://www.ccp4.ac.uk/dist/html/reindex.html REINDEX].
== Using truncate ==
#!/bin/csh -f
truncate  hklin  junk_scaled.mtz \
          hklout junk_truncated.mtz <<end-trunc
anomalous yes
nresidue  1049
labout  F=FP SIGF=SIGFP DANO=DANO_sulf SIGDANO=SIGDANO_sulf
end-trunc
In this way one gets the well-known output of [http://www.ccp4.ac.uk/html/truncate.html TRUNCATE], and the MTZ file junk_truncated.mtz .
== See also ==
[[XDSCONV]] to get the MTZ file directly (i.e. the usual way)

Latest revision as of 13:41, 24 November 2021

How to switch off scaling in CORRECT

If one wants to completely switch scaling off in CORRECT, use

MINIMUM_I/SIGMA=50 
CORRECTIONS=
NBATCH=1

in XDS.INP. MINIMUM_I/SIGMA=50 prevents the sigmas from being adjusted. This also prevents outlier rejection and geometry refinement. Since the latter may be desired it would be most appropriate to use MINIMUM_I/SIGMA=50 only after Optimization (re-cycling of GXPARM.XDS to XPARM.XDS). Prevention of outlier rejection would be also obtained by using (e.g.) WFAC1=2. NBATCH=1 removes any basic scaling done by CORRECT (as referred to by Krojer and von Delft).

A good option might be to make CORRECT only do MODULATION correction since this is not easily available in SCALA:

CORRECTIONS= MODULATION

This can also be combined with NBATCH=1.

Using pointless and aimless

pointless produces a multi-record MTZ file (suitable for SCALA/aimless and TRUNCATE) from XDS_ASCII.HKL, or the XSCALE reflection output file (see also "Running Pointless and Scala"). Note that this may use XDS for some or most of the scaling. (see above for how to switch off scaling in XDS.INP, partly or fully).

pointless -copy xdsin XDS_ASCII.HKL hklout XDS_ASCII.mtz
aimless hklin XDS_ASCII.mtz hklout junk_scaled.mtz | tee aimless.log

Obviously, the aimless run can be modified using suitable options.

See below for how to run TRUNCATE.

If one then needs to edit the batch information in this file, the CCP4 program REBATCH can be used (optional):

rebatch hklin XDS_ASCII.mtz hklout XDS_ASCII_rebatch.mtz <<end_ip
BATCH ALL START 1001
BATCH ALL PNAME Lysozyme XNAME Hg-Soak DNAME peak
end_ip

sortmtz hklout sortmtz.mtz <<end_ip
H K L M/ISYM BATCH
XDS_ASCII_rebatch.mtz
end_ip

Note: another program to work with those multi-record MTZ files is REINDEX.

Using truncate

#!/bin/csh -f
truncate  hklin  junk_scaled.mtz \
          hklout junk_truncated.mtz <<end-trunc
anomalous yes
nresidue   1049
labout  F=FP SIGF=SIGFP DANO=DANO_sulf SIGDANO=SIGDANO_sulf
end-trunc

In this way one gets the well-known output of TRUNCATE, and the MTZ file junk_truncated.mtz .

See also

XDSCONV to get the MTZ file directly (i.e. the usual way)