/
Reprocessing CX data with CrysalisPro

Reprocessing CX data with CrysalisPro

 

At the Synchrotron

There is a Windows computer in MX1 which can be used to process data with CrysalisPro. Unfortunately, it is not yet on the MX network in the same way as the other MX computers, so you need to download your data manually. And you need to copy the data from the computer after your beamtime.

1. Download frames

On the MX windows CrysalisPro processing box, log in via these credientials:

User: mxuser

Password: Beam109Line

via filezilla or similar program, download the frames of the experiment. Instructions

They are in .h5 files, each of which contains 200 egier frames (20 degrees usually). 

/data/mx/EPN/frames/$username/d

where $EPN and $username are the experiment number and the user name, respectively. 

You will need each of the .h5 files, including the master file, for each experiment. 

It is a good idea to make a new folder for each collection, if you didn't do this during data collection. 

At Home

1. Download frames

Via filezilla or similar program, download the frames of the experiment. Instructions

Frames in folder: /data/mx/EPN/frames/$username/d

Frames are in .h5 files, each of which contains 200 egier frames (20 degrees usually). 

where $EPN and $username are the experiment number and the user name, respectively. 

You will need each of the .h5 files, including the master file, for each experiment. 

It is a good idea to make a new folder for each collection, if you didn't do this during data collection. 

2. Convert h5 files to cbf (on windows computer at MX1)

  • On the desktop, open the eiger2cbf_GUI.py shortcut

  • Fill in the boxes with information about your frames. eg.

  • Click start. The frames will start converting. When an info box pops up saying “Program completed successfully!”, your frames are ready to open with CrysalisPro.

 

Optional:

If you want to run eiger2cbf manually so you can select which frames to convert, eiger2cbf is in the PATH, so open a terminal and type eiger2cbf. See eiger2cbf GitHub for instructions.

2. Convert h5 files to cbf (at home)

Things you will need:

  • To name your files well to decrease confusion. The output frames prefix (also known as filename stem for cbf) should end in the run number. e.g. for run 3 of a sample called “crystal15”, make the output frames prefix “crystal15_3”. This means CrystalisPro will read multiple runs in together correctly.

  • eiger2cbf_spawn2.py script 

  • eiger2cbf. Download directly from github, or get the exectuable from google drive, or download through CrysalisPro.

    • https://github.com/biochem-fan/eiger2cbf  

    • eiger2cbf.exe

    • CrysalisPro instructions:

      • Open CrysalisPro and Click “News” in the bottom right corner.

      • Under Software Updated near the bottom, click Use Check Version Tool

      • Under Additional Drivers etc click Get More

      • Select eiger2cbf_Windows_10 and click Download Selected

      • It will download to your C drive, where CrysalisPro is installed. Somewhere like: C:\Xcalibur\CrysalisPro_Autoupdate\eiger2cbf_Windows_10.zip

      • Go to this folder and unzip the folder.

      • Double click on eiger2cbf_windows_10 and it will run the installer. Keep note of where it is installed.

  • Python 3.8 or above

Option 1: Via terminal

In the folder for a collection/dataset:

  • Open a terminal

    python eiger2cbf_spawn.py [name of master h5 file] [number of instances to spawn] [filename stem for CBF]

  • Unless eiger2cbf_spawn.py is in the same folder, you will need to include the path to it in the command. 

  • In general, use 17 instances to spawn. If you add test to the end of the above command, it will tell you the fastest number of instances to spawn. 

  • If you are going to import more than one wedge of data into CAP, you will need to add the wedge number to the end of the filename stem for CBF. Eg, for wedge 1, enter “output_1” and for wedge 2, name it “output_2”. This means that CAP will read them in as runs 1 and 2 automatically.

  • For example:

    python "C:\Users\Documents\eiger2cbf\eiger2cbf_spawn.py" Thr_1_7s_Om180_K0_P0_0018_master.h5 17 Thr_1_7s_1

Option 2: Via Graphical User Interface (GUI)

You will also need this script which launches a GUI.

For this GUI to work, you will also need:

  • The Gooey package for python, which you can download via pip:Gooey . Open a terminal and run:

pip install gooey
  • The eiger2cbf_spawn2.py script saved to your C drive (or you can edit the path to eiger2cbf_spawn2.py in the eiger2cbf_GUI.py directly. )

It is easiest to have eiger2cbf, eiger2cbf_spawn2.py and eiger2cbf_GUI.py all saved in the same place, like your C drive.

To run the GUI, go to the folder where eiger2cbf_GUI.py is saved, open a terminal there and run:

python eiger2cbf_GUI.py

This should pop up with a GUI that looks like this:

eiger3cbf GUI.png

You need to enter the directory where your frames are, then select the master file for that run, and then give the output frames a prefix. If it is run 1, it is recommended that you end the prefix with 1.

If the GUI doesn’t work, there is an error with the script or how it is set up.

Troubleshooting:

Try just running eiger2cbf in the terminal, if it is installed correctly, it should look like this:

eiger2cbf working.PNG

Try running eiger2cbf_spawn.py If it is installed correctly, you should see something like this:

eiger2cbf_spawn_working.PNG

Try a different terminal, on windows there is powershell, or command prompt.

If you still can’t get it working, see instructions for running the script manually above, or email your friendly beamline scientist for help.

CrysalisPro data processing (at Home and Synchrotron)

To download your own version of CrysalisPro you will need to register for the Rigaku X-ray forum: Rigaku Oxford Diffraction forum

3. Importing data

  • Open an offline copy of CAP (use any old dataset to get it open).

  • Open the import icon on the left

  • Use the known image format

  • Choose Dectris. Select your first frame, then click “Save run file”. The program will then popup a box showing the parameters that it has found in the master file, which can be changed here if they are incorrect (they are correct in my example).

  • The program will then generate frame aliases, and finally popup a window so the newly created dataset can be opened in CAP

  • Click “Open selected”, or double click the line.

  • You will then get an alert to set basic settings for the experiment:

  • Click OK, then on the next window, make sure Small Molecule is selected, and click “Edit options”:

  • It is usually sensible to turn on “Smart background during reflection integration” and “Single wavelength data red”

  • Now you should be able to see the first diffraction image. The beamstop shadow can be seen coming from the centre of the diffraction pattern.

  • Open up the command window (CMD on the left-hand side of the window), move the command window to the right so you can still see the beamstop shadow, then click “Options RED”. Also make sure this window isn’t covering the beamstop shadow on the image.

  • Go to the “Beam stop” tab, and tick the “Put beamstop overlay on” box:

  • The beamstop can now be seen. It is currently set to “Top”, which is clearly incorrect. As the beamstop is not at a nice perfect orientation, we need to set it to “User”, then adjust the parameters: Diameter = 0.7, Angle=178 (this may change if the beamstop is moved), Holder diameter=0.7. Adjust the X- and Y-offset if necessary.

  • The data can now be processed as normal.

For more information on using CrysalisPro, see the User Manual, particularly section 4.5, and section 7.

4. Indexing

Click “Lattice Wizard” in the top left corner.

Peak hunting - click the big box next to peak hunting and wait for the program to find all the peaks.

Unit cell finding - click the big box next to unit cell finding. Then check if the cell it has found is correct.

Ewald Explorer - check to see if cell looks sensible. If you know a cell which it should be and it has not been found, click Lattice and enter the cell. 

Refine instrument model:

  • Click the arrow next to Refine Instrument model and select Refine Instrument Model with User Settings.

  • Untick Automatic selection of parameters

  • Make sure all 3 Wobble parameters are ticked

  • Click ok. Your percentage of peaks that fit the unit cell may have increased.

  • Check the Ewald sphere again. The spots should now fit to the unit cell much better.

Related content