Hi James,

On Sun, 25 Apr 2010 15:41:32 -0700, James Stroud <xtald...@gmail.com> wrote:

> cctbx is cool in principle, but I would be very happy to know how to  
> use it with a pre-existing python like most other packages are capable  
> of. I'm starting to lose patience reverse-engineering the install  
> scripts to figure out how to do it. I can't seem to find instructions  
> on the web page.
> 
> What am I missing? Is it that I must migrate my entire python  
> environment to cctbx.python? Isn't it better to add cctbx to a current  
> environment rather than the other way around? If every package  
> required the user's migrating his python environment to the package's  
> environment, then we wouldn't be able to use more than one package  
> with a given python install.
> 
> It seems ridiculous.

I don't have a problem doing this (at least with Linux).  I simply download
the "Self-extracting cctbx sources for Unix" and put it somewhere appropriate
and run the installation command "perl cctbx_bundle.selfx".  After it finishes
installing I modify my login shell script according to the installers
instructions.  Actually I modify a large setup script that allows me and all
the users to set up any particular program. This will add the
cctbx/cctbx_build/bin directory to the beginning of the PATH variable.  In
order for cctbx to work with any python script then I simply add a link in the
cctbx/cctbx_build/bin directory so that "python" points at cctbx.python: i.e.

cd cctbx_build/bin
ln -s cctbx.python python


Any other python scripts that call cctbx then start with 

#! /usr/bin/env python

rather than

#! /usr/bin/python

In order to have cctbx play nice with PyMOL, then I also install PyMOL
from the SVN sources (also not too difficult).  Then I make sure that my PyMOL
start up script uses "python" and not "/usr/bin/python" and then I can use
both PyMOL and cctbx with the system's python. Perhaps this still sounds
ridiculous to you, but I don't have a problem with it.  Once the initial set
up is done there isn't much to it.  Of course I have left myself little
instruction files in my installation directories to remind myself what I need
to do.

> It doesn't make sense, so I must be missing something fundamental. I  
> think this is the reason I have never used cctbx before. I last tried  
> about 4 years and I thought that it was because the package was  
> immature.

There is also a new PyMOL script in the PyMOL wiki called "supercell" 
http://pymolwiki.org/index.php/Supercell
that will build a unit cell, or a block of multiple unit cells.  I think this
should work in a script to PyMOL, hence not needing the graphics nor any
interactive work.  I haven't tried it that way, though.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821            Fax: 613-533-2497
<robert.campb...@queensu.ca>    http://pldserver1.biochem.queensu.ca/~rlc

Reply via email to