# keitaroyam/ECACOMSIG-ECM30

My tutorial materials for ECACOMSIG computing school (August 2016)
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
 Failed to load latest commit information. figs Aug 27, 2016 160825_ECACOMSIG_slides.pdf Aug 27, 2016 README.md Aug 26, 2016 XPARM.XDS Aug 13, 2016 prediction.jl Sep 20, 2016 prediction.py Aug 25, 2016

# Playing with XDS predictions (using Numpy)

This is a tutorial at ECACOMSIG computing school (Freudenstadt, August 2016)

In this tutorial we will implement calculation of spot positions in 3D space (x,y,φ) from XPARM.XDS.

If you want to run the script, you need to install

## How to run the script

1. Get sample data
```mkdir th_8_2
cd th_8_2
wget https://zenodo.org/record/10271/files/th_8_2.tar.bz2
tar xvf th_8_2.tar.bz2
```
1. Prepare XDS.INP and run XDS (Alternatively, you can use XPARM.XDS in this repository)
```mkdir xds
cd xds
generate_XDS.INP "../th_8_2_0???.cbf"
vi XDS.INP # Edit SPOT_RANGE= 1 27   JOB= XYCORR INIT COLSPOT IDXREF
xds_par
```
1. Run the script
```phenix.python prediction.py ./XPARM.XDS 1.5 0.06928 1
# Usage:      prediction.py [XPARM.XDS] [d_min] [mosaicity] [frame numbers..]
```
1. Use Adxv to see predictions with image
```adxv ../th_8_2_0001.cbf prediction_000001.adx
```

## Note: to use ipython with phenix

Probably there is an easier way, but..

First, install easy_install and then ipython to phenix environment

```wget https://bootstrap.pypa.io/ez_setup.py
phenix.python ez_setup.py
phenix.python -c "from setuptools.command.easy_install import main; main()" ipython
```

ipython can be started by:

```phenix.python \$PHENIX/modules/cctbx_project/libtbx/command_line/ipython_shell_start.py
```

Alternatively, `libtbx.ipython` command can be activated if you run `\$PHENIX/build/bin/libtbx.refresh`.