Difference between revisions of "CCTBX"

From PyMOLWiki
Jump to navigation Jump to search
(CCTBX-fedora32)
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=Computational Crystallography Toolbox=
+
This page describes how to use the [https://github.com/cctbx/cctbx_project Computational Crystallography Toolbox (cctbx)] with PyMOL.
[http://cctbx.sourceforge.net CCTBX]
 
  
==Using With PyMol==
+
cctbx and PyMOL need to be compiled with the same Python distribution, otherwise they won't be compatible.
  
===Roger Dodd's Solution===
+
=== Incentive PyMOL ===
Some folks were having issues getting CCTBX to work.  Here's one solution.
 
  
I hesitated to post this because I thought someone would have a more elegant solution, but I have got the draw_cell/symmops scripts working
+
Using cctbx with Incentive PyMOL 2.x should become easier once the cctbx project provides conda packages.
on windows with cctbx. I have had it working with all versions of PyMOL including the latest betas. I install PyMOL as usual in '''C:\Program
+
See https://github.com/cctbx/cctbx_project/issues/9
Files\Delano Scientific\PyMOL'''. I also got hold of python 2.4.1 [http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi Python 2.4.1] and cctbx
 
[http://cci.lbl.gov/cctbx_build/results/2005_08_18_0201/cctbx_win_xp_py24_pre.exe CCTBX For Windows With Python 2.4] and installed them to '''C:\python24''' and ''''C:\cctbx_build''' & '''C:\cctbx_sources''', respectively.
 
  
In order to get things working together, I launch PyMOL with the following batch file:
+
==== Linux ====
  
<pre>
+
Confirmed procedure to get this working on Linux with CCTBX build '''dev-1723''', which is based on conda:
@ECHO off
 
set LIBTBX_DIST_ROOT=C:\cctbx_sources
 
if not defined PYTHONPATH set PYTHONPATH=
 
set
 
PYTHONPATH=C:\cctbx_sources\boost_adaptbx;C:\cctbx_sources\scitbx;C:\cctbx_sources\cctbx;C:\cctbx_sources\iotbx;C:\cctbx_build\libtbx;C:\cctbx_sources\libtbx;%PYTHONPATH%
 
set LIBTBX_BUILD=C:\cctbx_build
 
set LIBTBX_PYTHON_EXE=C:\Python24\python.exe
 
if not defined PATH set PATH=
 
set PATH=C:\cctbx_build\libtbx\bin;C:\cctbx_build\libtbx;%PATH%
 
set SCITBX_DIST=C:\cctbx_sources\scitbx
 
set IOTBX_DIST=C:\cctbx_sources\iotbx
 
set CCTBX_DIST=C:\cctbx_sources\cctbx
 
set BOOST_ADAPTBX_DIST=C:\cctbx_sources\boost_adaptbx
 
set LIBTBX_DIST=C:\cctbx_sources\libtbx
 
if not defined PATHEXT set PATHEXT=
 
set PATHEXT=.PX;.PY;%PATHEXT%
 
call "%LIBTBX_PYTHON_EXE%" "%LIBTBX_DIST%\libtbx\assoc_ftype.py"
 
"C:\Program Files\DeLano Scientific\PyMOL\PyMOLWin.exe"  +2
 
</pre>
 
  
Just save as '''PyMOL.bat''' and run it (this is basically the cctbx '''setpaths.bat''' with a pymol command tagged on the end). I hope this helps.
+
# Download cctbx from http://cci.lbl.gov/cctbx_build/
 +
# Install cctbx: <code>./install --prefix=$HOME/local</code>
 +
# Install [https://repo.continuum.io/miniconda/ Miniconda]
 +
# Install '''pymol''' with '''conda''' into the '''cctbx environment''':<syntaxhighlight lang="bash">$HOME/miniconda3/bin/conda install -p $HOME/local/cctbx-dev-1723/conda_base -c schrodinger -c conda-forge pymol</syntaxhighlight>
 +
# Activate cctbx: <code>source $HOME/local/cctbx-dev-1723/cctbx_env.sh</code>
 +
# Run PyMOL with: <code>cctbx.python -m pymol</code>
  
[[Category:PyMol_Integration|CCTBX]]
+
==== Windows ====
 +
 
 +
Confirmed procedure to get this working on Windows with CCTBX build '''dev-1725''', which is based on conda:
 +
 
 +
# Download cctbx from http://cci.lbl.gov/cctbx_build/
 +
# Extract ZIP file (e.g. to <code>F:\cctbx-installer-dev-1725-intel-windows-x86_64</code>)
 +
# Install [https://repo.continuum.io/miniconda/ Miniconda]
 +
# Install '''pymol''' with '''conda''' into the '''cctbx environment''': <code>conda install -p F:\cctbx-installer-dev-1725-intel-windows-x86_64\conda_base -c schrodinger -c conda-forge pymol</code>
 +
# Activate cctbx: <code>call F:\cctbx-installer-dev-1725-intel-windows-x86_64\cctbx_env.bat</code>
 +
# Run PyMOL with: <code>cctbx.python -m pymol</code>
 +
 
 +
=== Open-Source PyMOL ===
 +
 
 +
See [[CCTBX-fedora32]].
 +
 
 +
[[Category:PyMol_Integration|cctbx]]

Revision as of 15:59, 11 May 2020

This page describes how to use the Computational Crystallography Toolbox (cctbx) with PyMOL.

cctbx and PyMOL need to be compiled with the same Python distribution, otherwise they won't be compatible.

Incentive PyMOL

Using cctbx with Incentive PyMOL 2.x should become easier once the cctbx project provides conda packages. See https://github.com/cctbx/cctbx_project/issues/9

Linux

Confirmed procedure to get this working on Linux with CCTBX build dev-1723, which is based on conda:

  1. Download cctbx from http://cci.lbl.gov/cctbx_build/
  2. Install cctbx: ./install --prefix=$HOME/local
  3. Install Miniconda
  4. Install pymol with conda into the cctbx environment:
    $HOME/miniconda3/bin/conda install -p $HOME/local/cctbx-dev-1723/conda_base -c schrodinger -c conda-forge pymol
    
  5. Activate cctbx: source $HOME/local/cctbx-dev-1723/cctbx_env.sh
  6. Run PyMOL with: cctbx.python -m pymol

Windows

Confirmed procedure to get this working on Windows with CCTBX build dev-1725, which is based on conda:

  1. Download cctbx from http://cci.lbl.gov/cctbx_build/
  2. Extract ZIP file (e.g. to F:\cctbx-installer-dev-1725-intel-windows-x86_64)
  3. Install Miniconda
  4. Install pymol with conda into the cctbx environment: conda install -p F:\cctbx-installer-dev-1725-intel-windows-x86_64\conda_base -c schrodinger -c conda-forge pymol
  5. Activate cctbx: call F:\cctbx-installer-dev-1725-intel-windows-x86_64\cctbx_env.bat
  6. Run PyMOL with: cctbx.python -m pymol

Open-Source PyMOL

See CCTBX-fedora32.