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.

No comments: