This is a read-only mirror of


From PyMOL Wiki
Revision as of 10:21, 20 September 2005 by Rogerdodd (talk | contribs)
Jump to navigation Jump to search

Computational Crystallography Toolbox


Using With PyMol

On a Mac

There is a page on the cctbx with special instructions for using it on the Mac cctbx On Mac. Note that you need to use the "Framework" build of PyMOL FrameWorkPyMol.

Windows XP (Roger Dodd)

1. Download and install python (to the default location - C:\Python24)


1a. If you want to use the or scripts you also need to install numarray after installing python


2. Download cctbx *without* python included and unpack into C:\cctbx_build and C:\cctbx_sources (i.e. execute the file in C:\)


3. Download pymol built against python 2.4 (but not including its own python) and install in the default location


(You cannot use the latest beta versions which include their own version of python to the best of my knowledge)

4. Create 2 files (use notepad or wordpad or any other text editor) and save in the C:\Program Files\Delano Scientific\PyMOL directory:

   a) pymol.cmd
      @python -x "%~f0" %* & exit /b
       import cctbx
       import pymol
   b) run.cmd
       CALL C:\cctbx_build\setpaths_all.bat
       CALL "C:\Program Files\Delano Scientific\PyMOL\pymol.cmd"

5. It's important to have python in your path variable (which you can access by going to control panel|system|advanced|environment variables), just add C:\python24 to the end of the path variable, separated by a semi-colon.

Linux (Robert Campbell)

When you run the script, it adds the cctbx_build/bin directory to the *front* of your $PATH. In that directory is a shell script called "python" that sets the environment necessary to import cctbx. So, to get cctbx to work, you have to call python without prefixing a directory path. If you were like me and had:

/usr/bin/python  $PYMOL_PATH/modules/ $*

in your file, then it would not run that cctbx_build/bin/python script. So you need to either change the above line to:

python  $PYMOL_PATH/modules/ $*

(assuming you've already run the script) or you need to copy the cctbx_build/bin/python contents (without the actual "python" command) into your file or some other file that you source before

Within pymol, type the command:

print sys.path

and you should now see the cctbx directories show up.