Installing Phenix on OS X
From OS X Scientific Computing
Contents |
What is it?
Phenix (Python-based Hierarchical Environment for Integrated Xtallography) is a new macromolecular crystallography software package being developed with automation in mind.
It has a GUI that is now available not only in the Linux version, but also OS X. (So much of the stuff below should be regarded as optional or obsolete. I'll leave it in place for awhile ....
It has command-line utilities, called cci_apps, that can be compiled on OS X (and are currently also distributed in binary form for 10.3.9 ppc). Phenix and its command-line utilities are, like CNS, restricted to nonprofit users, and you need to register for and download the software. For that reason, there is no official fink package for cci_apps, but I have made a fink install script that enables you to install cci_apps using fink.
How to install it using the Binary Installer
Download and untar the phenix-x.x.x directory, cd into it, and simply issue
sudo ./install
and it will install everything into /usr/local/phenix-x.x.x
Then all you need to do is source the environment script that is appropriate to your shell.
How to install it using Fink
Since the software is restricted for redistribution, you must go to the phenix website and register for, and download, the software. You can then place the compressed tarball in /sw/src and use my cci-apps.info script to install it with fink.
Download the source code
Go to the Downloads page, register for the software, and then scroll past all the self-extracting binaries until you get to the file called cci_apps_python_251_bundle.tar.gz. Right-click or command-click on it to prevent the tar.gz file from being gunzipped. You will be prompted for a username and password.
Alternatively, if you have wget installed (use fink), then you can do the following:
You must manually register by email. You will get a username and PASSWORD. Then you can use wget as follows, substituting in your password:
cd /sw/src
sudo wget -O cci_apps_python_251_bundle.tar.gz --http-user=download --http-password=PASSWORD --no-check-certificate \ "http://www.phenix-online.org/download/cci_apps/protected/send_octet_stream.cgi?source=bundles/cci_apps_python_251_bundle.tar.gz"
Put it where fink can find it
sudo mv ~/Desktop/cci_apps_python_25_bundle.tar.gz /sw/src/cci_apps_python_25_bundle.tar.gz
(The above assumes you have downloaded the file to your ~/Desktop directory. If you downloaded using wget, after cd /sw/src, you obviously won't need to do this.)
Download the file cci-apps.info and put it where fink can find it
Issue the commands
curl -O http://sage.ucsc.edu/fink_10.4/10.4/local/main/finkinfo/cci-apps.info sudo cp cci-apps.info /sw/fink/dists/local/main/finkinfo/.
Install it with fink
fink index fink install cci-apps
Which python does it use?
Note that I have somewhat fascistically forced it to use the version of python distributed with Apple (Python 2.3.5). This was done for reasons of universality and consistency. You can edit the cci-apps.info script if you want it to use a newer version. (It doesn't seem to matter.)
How to install it manually
Pre-comiled self-extracting binary
Visit the Downloads page, get the appropriate file and follow their instructions.
Compiling on 10.4 intel or ppc
It is very easy to compile this manually. My instructions are specific for bash/zsh. If you use tcsh, just type zsh at the command line first to get into a decent shell.
Download the software as described above
Put it somewhere useful
I use /usr/local/xtal. Change this as needed.
sudo mv ~/Desktop/cci_apps_python_25_bundle.tar.gz /usr/local/xtal/cci_apps_python_25_bundle.tar.gz
Compile it
cd /usr/local/xtal
sudo tar xvfz cci_apps_python_25_bundle.tar.gz
mkdir cci_apps_build
cd cci_apps_build
# requires a Framwork python build
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python ../cci_apps_sources/libtbx/configure.py phenix
# The last command initializes the cci_apps_build directory and creates
# a file setpaths.csh (among others). This file must be used to initialize
# a new shell or process with the cci_apps settings:
source setpaths.sh
# Find the number of cpus:
num_cpu=$( sysctl hw.logicalcpu | awk '{print $NF}' )
# On a machine with multiple CPUs enter:
libtbx.scons -j $num_cpu .
If you compile it and then move it, you need to do this:
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python ../cci_apps_sources/libtbx/configure.py phenix
If you want to use a newer version of python that you have installed in /Library/Frameworks, all you need to do is change the path to python (but do this when you compile it!).
Compile it (with optimisation)
Don't! According to regression tests performed by Ralf Grosse-Kunstleve in April 2007, this can lead to crashes and - ugh! - wrong results.
Using it
You need to source the appropriate startup file:
source /usr/local/xtal/cci_apps/cci_apps_build/setpaths.sh
for Bourne-like shells, or
source /usr/local/xtal/cci_apps/cci_apps_build/setpaths.csh
for tcsh.
Making it play well with gamess
elbow.builder can take advantage of quantum chemistry programs that you can install, such as gammes. Here is a description of how I got it to work:
Quantum Chemistry for the masses
Browser Interface for the documentation
elbow.doc will try to find mozilla or netscape executables. Since both of those are obsolete, and don't exist in your $PATH by default, you may want to create a "phony" mozilla executable and put it in your $PATH, eg, I have an executable shell script in my ~/.bin directory that is called mozilla:
#!/bin/zsh -f /usr/bin/open -a Camino "$@"
It works for me like this:
zsh-% elbow.doc /sw/share/xtal/cci_apps/cci_apps_sources/elbow Using browser /Users/wgscott/.bin/mozilla
I used Camino since Safari, for some reason, opens the directory containing the HTML documents instead of just opening the file in the browser. If you don't have Camino, substitute any other mozilla-type browser (eg Firefox).

