Hi,

Thank you for replying.

In fact this is what I did. Gentoo automatically compiles pymol (pymol ebuild) with all required dependencies against the system-wide python-2.4.1. I then manually installed cctbx, did "source /usr/lib64/python-2.4/site-packages/setpaths_all.csh" and "source /usr/lib64/python-2.4/site-packages/setpaths.csh", ran pymol, opened up a pdb with CRYST header and tried to run the draw_cell.py script and I got this error:

PyMOL>run draw_cell.py
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/pymol/parser.py", line 270, in parse
    execfile(exp_path(args[nest][0]),pymol_names,pymol_names)
  File "draw_cell.py", line 3, in ?
    from cctbx import uctbx, sgtbx
ImportError: No module named cctbx

When I ran the command "python $SCITBX_DIST/run_tests.py" all the tests completed with OK status.

I tried adding:

from libtbx import uctbx, sgtbx
import libtbx.load_env

as it has in the run_tests.py file but it gave the same error (No module named libtbx).

What else needs to be done so that the python scripts can see the module when loaded through pymol? Could it possibly be that when pymol is executed it loads a new environment and thus the cctbx paths are not set in this new environment?

Thanks,
Sabuj Pattanayek

Robert Campbell wrote:
Hi,

* Sabuj Pattanayek <sabuj.pattana...@vanderbilt.edu> [2005-08-18 16:08] wrote:

Actually I was wondering the same thing, except how to set it up in linux. I was able to compile the cctbx but I'm not sure how to get it to show up as a python module so that Pymol scripts (e.g. Dr. Campbell's draw_cell.py) can work. Any help would be greatly appreciated.

I use PyMOL built from the CVS source (I like to have the latest and
greatest features!).  Once this is done the first time, it is a simple
process to rebuild it when the CVS entries are updated.
The cctbx is easily built from source. Follow the "Downloads" link on
http://cctbx.sourceforge.net and look for either the "Self-extracting
binary distributions" and use the "cctbx only" version or install the
"Self-extracting cctbx sources for Unix". I use the latter just to make
sure that it is compiled for the system libraries I have available on my
computers.  The installation is done with:

  perl cctbx_bundle.selfx

and this will create a setup file that needs to be run:
source cctbx_build/setpaths.sh (or .csh if you use a csh variant).

The installation is exactly the same with the "self-extracting binary
distributions" (apart from the file name used in the "perl" command).

I hope this is sufficiently clear.  I guess I should create a page of
these instructions and link to it from my PyMOL scripts page.

Cheers,
Rob


Reply via email to