Monday, 30 June 2014

Installing xia2: with details

The installation instructions are really rather brief - some may say non-existent! For example

http://www.ccp4.ac.uk/newsletters/newsletter48/articles/Xia2/manual.html#x1-140009

For old UNIX hacks such as YT these are perfectly adequate, but are unhelpful for many. Here are some clearer instructions.

Useful Instructions

xia2 is written entirely in Python and relies on things like CCP4 CCTBX to perform more expensive crystallographic calculations, and as such it does not really need anything more than a properly configured crystallographic environment to run. xia2 does however need to know where it is, so it can look to find other bits of itself to run. Traditionally this has been done through the medium of setting an environment variable (XIA2_ROOT) and then sourcing a setup file (setup.sh or .csh depending on your platform). Today all that is really necessary is to ensure that the xia2/Applications directory is in the PATH.

The installation instructions today are therefore:

  1. ensure that all of the dependencies namely CCP4, CCTBX, XDS are installed correctly and may be found in the PATH
  2. unpack the xia2 distribution somewhere you are happy to leave it e.g. in /usr/local or /xtal or something similar
  3. add something like "export PATH=/path/to/xia2/Applications:$PATH" to your .bash_rc file
  4. start a new terminal and type "which xia2" - this should point to /path/to/xia2/Applications/xia2
You can find out more about PATH variables and .bashrc files here:

http://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path

So the full thing will look like:
  1. mkdir ~/xtal/xia2
  2. cd ~/xtal/xia2
  3. tar xvfz ~/Downloads/xia2-0.3.6.3.tar.gz
  4. cd xia2-0.3.6.3/Applications
  5. pwd (to show the full path)
  6. copy and paste this to the export PATH= line
If you type xia2 and see something like


Traceback (most recent call last):
  File "/tmp/xia2-0.3.6.3/Applications/xia2.py", line 38, in
    from xia2setup import write_xinfo
  File "/tmp/xia2-0.3.6.3/Applications/xia2setup.py", line 32, in
    from Handlers.CommandLine import CommandLine
  File "/tmp/xia2-0.3.6.3/Handlers/CommandLine.py", line 32, in
    from Schema.XProject import XProject
  File "/tmp/xia2-0.3.6.3/Schema/XProject.py", line 29, in
    from Schema.XCrystal import XCrystal


it is probably installed correctly.

Friday, 6 June 2014

xia2 major work happening

Just to be warned some major work is happening "under the hood" in xia2, which will be happening in branches but from time to time may result in broken-ness in nightly builds...

This is all worth it - the end result will be a leaner, meaner xia2 with much more capability :o)

Thanks for your patience...

Wednesday, 12 March 2014

Incoming feature: resolution limits from CC-half

Seems that CC-half is a very fashionable way of arriving at resolution limits these days, so am modifying xia2 to work using these: watch for this in the next release.

Tuesday, 7 January 2014

New year plans

One of the things I plan to start doing is "xia2 howtos" here on the blog - interesting test cases and how to resolve them. On my hit list are:

  • working with weak data
  • handling multi-crystal data sets
Any other suggestions? Please post in the comments section.


Cryptic error message from xia2 which means "you need new cctbx"

Happy new year!

Had this error reported a couple of times, which results in xia2 needing new features in cctbx - particularly a problem if you use e.g. Phenix 1.8.2.

Error ends:

  File "/Applications/PHENIX-1.8.2-1309/Contents/phenix-1.8.2-1309/cctbx_project/libtbx/phil/__init__.py", line 1906, in process_includes
    phil_path=phil_path).objects)
  File "/Applications/PHENIX-1.8.2-1309/Contents/phenix-1.8.2-1309/cctbx_project/libtbx/phil/__init__.py", line 1946, in process_include_scope
    where_str=object.where_str)
  File "/Applications/PHENIX-1.8.2-1309/Contents/phenix-1.8.2-1309/cctbx_project/libtbx/utils.py", line 873, in __init__
    error_prefix, module_path, where_str))
ImportError: include scope: no module Wrappers.XDS.XDSIntegrate (input line 4)


(not very helpful!) Best way to resolve this: install Phenix 1.8.4 or new cctbx nightly build. (I need to improve xia2 error reporting)

Sorry for any annoyance, Graeme

Monday, 16 December 2013

Interactive control of indexing images with XDS processing


Now incoming in a nightly build...

[gw56@ws133 interactive]$ xia2 -3dii -interactive -image /data1/gw56/i04-bag-training/th_8_2_0001.cbf
Environment configuration...
XIA2_ROOT => /home/gw56/svn/xia2.trunk
XIA2CORE_ROOT => /home/gw56/svn/xia2.trunk/core
CCP4 => /dls_sw/apps/ccp4/x86_64/6.4.0/6nov2013/ccp4-6.4.0
CLIBD => /dls_sw/apps/ccp4/x86_64/6.4.0/6nov2013/ccp4-6.4.0/lib/data
CCP4_SCR => /tmp/tmpOOG0z9
Working directory: /tmp/interactive
Free space:        15.02 GB
Host: ws133
Build: 4468
Contact: xia2.support@gmail.com
XIA2 0.3.6.3
Command line: xia2 -3dii -interactive -image /data1/gw56/i04-bag-training/th_8_2_0001.cbf
Existing images for indexing th_8_2_0###.cbf: 1-540
>1-100, 441-540
New images for indexing: 1-100, 441-540

Essentially allows you to assign which images to use for XDS indexing for the case where you have a "good bit" you want to use.


Tuesday, 3 December 2013

Move to git?

In the spirit of not breaking xia2 for users while wanting to make some substantial changes, have been thinking of moving from subversion to git: this would affect you if you like the most bleeding edge xia2 versions and pull xia2 from svn.

So: has anyone an opinion on this?