Setup

From cctbx_xfel
Revision as of 18:52, 5 February 2014 by Hattne (talk | contribs) (Moved scratch-area setup to tutorial.)
Jump to navigation Jump to search


Prerequisities

cctbx.xfel must be installed, which in turn requires the PSDM software distribution to be set up. See Set up PSDM software for the latter and Installation for the former. cctbx.xfel can be installed anywhere on the filesystem where write access is granted.

The installation root directory affects the absolute paths used in these instructions and differs from site to site. Some common installation root directories are listed below.

Site Installation root directory Notes
BNL /usr/local/crys_test/cctbx
CCI, LBNL No central installation available
SLAC /reg/g/cctbx/sources

Developers will generally have cctbx.xfel installed in their home directory.


cctbx.xfel setup

To start using cctbx.xfel, the environment has to be configured. The details depend on the cctbx.xfel installation root directory and the user's shell. In what follows it is assumed that cctbx.xfel is installed at /reg/g/cctbx/build. Substitute /reg/g/cctbx/build with the appropriate path in the instructions below. These steps need only be performed once.

In a bash shell, the environment is prepared for cctbx.xfel using

$ . /reg/g/cctbx/build/setpaths.sh

For csh, the corresponding command is

% source /reg/g/cctbx/build/setpaths.csh

Sourcing setpaths.sh or ana_env.csh only modifies the environment of the current shell, and would have to be repeated every time a new shell is started. To make the changes persistent, add

test -r "/reg/g/cctbx/build/setpaths.sh" && \
  . "/reg/g/cctbx/build/setpaths.sh"

to ~/.bashrc, or

test -r "/reg/g/cctbx/build/setpaths.csh" && \
  source "/reg/g/cctbx/build/setpaths.csh"

to ~/.cshrc as appropriate.


Linking cctbx.xfel to pyana

Run these commands to associate pyana and cctbx.xfel:

$ cd ~/myrelease
$ sit_setup
$ cd ~/myrelease/my_ana_pkg
$ ln -fns /reg/g/cctbx/sources/cctbx_project/xfel/cxi/cspad_ana src
$ cd ..
$ ln -s /reg/g/cctbx/sources/cctbx_project/xfel/cxi/lsf.sh .
$ scons

The last step compiles the analysis modules just linked in.


Run each time on logging on to SLAC

Whenever you log on to a fresh shell at SLAC, before you can use any portion of cctbx.xfel that uses pyana, you must run these commands:

$ cd ~/myrelease
$ sit_setup

Test the installation

At SLAC, test that it is working by e.g.

$ cd ~/myrelease
$ cxi.pyana -c /reg/g/cctbx/tutorials/setup/test.cfg /reg/d/ana11/cxi/data/Mar2013calib/xtc/e236-r0004-s00-c00.xtc

This should start a viewer, displaying dark-subtracted averages from an XTC stream. Press the green run button to see the images. This particular stream has a series of misses at its beginning; hits will appear presently.

More specifically, this command starts pyana with a configuration file (-c) and an XTC file. For more information, see the Overview and other tutorial pages.