SOLVE 2.09 Mac OS X Installation Guidelines


SOLVE/RESOLVE/RESOLVE_PATTERN version: 2.09
Apple Mac OS X version:
Tiger 10.4.2
Apple Xcode Tools version:
2.1
Document date:
18 July 2005
Document version:
2.9

SOLVE is a program for automatic crystal structure solution using MIR, SAD or MAD data. RESOLVE/RESOLVE_PATTERN are programs that improve electron density maps using maximum-likelihood density modification and local pattern matching, perform automatic model building and carry out prime-and-switch minimum bias phasing. SOLVE and RESOLVE/RESOLVE_PATTERN are developed by Tom Terwilliger at Los Alamos National Laboratory.

You can find information and references
about SOLVE, RESOLVE and RESOLVE_PATTERN, as well as obtain a license and download binaries of the programs here. Please note that the purpose of this document is NOT to get you started with these programs - tutorials can be found in the excellent online documentation for SOLVE and RESOLVE/RESOLVE_PATTERN. This page simply aims to help you installing the programs on Apple computers running Mac OS X.

Binaries for regular, giant and huge versions of both programs are now available for download as described here. You can either install SOLVE/RESOLVE/RESOLVE_PATTERN using these pre-compiled binaries (faster and easier) or rebuild the package yourself. The first option, which I highly recommend, is described below; for information on the second, please e-mail me at .

If you want to install SOLVE/RESOLVE/RESOLVE_PATTERN and would like to make them accessible to all users on your system (as assumed throughout this document), you MUST have administrator privileges. To find out whether you have this status, go to the Accounts section of the System Preferences and see if there is an "Admin" flag below your user name. If there is not, you will need the assistance of your Mac system administrator to proceed further.
Should you have comments and/or problems with your particular setup, please contact me at so I can update this document.



PART I - INSTALLING THE SOLVE PACKAGE USING PRE-COMPILED BINARIES

Step 1 - CCP4 and MMDB library installation

Mac OS X binaries of SOLVE/RESOLVE rely on several CCP4 libraries, as found in Fink's binary distribution by Bill Scott. In addition, you will need to install Eugene Krissinel's MMDB (CCP4 Macromolecular Coordinate Library), which is also maintained by Bill and installed through Fink.

Briefly, once you have configured Fink on your system (following these guidelines), install pre-compiled packages for CCP4 , MCCP4, MMDB and SSMLIB by following Bill's crystal-clear instructions, then opening a Terminal window and issuing this command:

OSX> sudo apt-get install ccp4 mccp4 mmdb ssmlib

Make sure you have the following library binary files on your system before proceding to Step 2:

/sw/lib/ccp4-5.0.2/libccp4f.a
/sw/lib/ccp4-5.0.2/libccp4c.a
/sw/lib/ccp4-5.0.2/libmmdb.a
/sw/lib/ccp4-5.0.2/libccif.a

IMPORTANT: If you want to use SOLVE's Mac OS X pre-compiled binaries, you MUST (1) be running Mac OS X 10.4.x (Tiger) and (2) have installed CCP4, MCCP4, MMDB and SSMLIB through Fink, using Bill's pre-compiled distributions! The binaries I compiled were linked against Fink's CCP4/MMDB libraries, and, because static linking of binaries is not supported on Mac OS X, SOLVE will always link the libraries at run time. As a result, if your CCP4/MMDB libraries are anywhere else than the expected location (Fink's /sw/lib/ccp4-5.0.2/ directory), pre-compiled SOLVE will not run on your system.

Because of the above, IF YOU ALREADY INSTALLED THE BINARY VERSION OF CCP4 (from ftp://ftp.ccp4.ac.uk/ccp4) or IF YOU COMPILED THE CCP4 PACKAGE YOURSELF, you will need to recompile SOLVE so that linking information points to the location of the CCP4/MCCP4/MMDB/SSMLIB libraries on your specific system.

Step 2 - SOLVE/RESOLVE binary installation

The binaries included in the current SOLVE distribution for Mac OS X were compiled on a PowerBook G4 1.5 GHz with 2 GB of RAM running OS X Tiger 10.4.1, using Apple Xcode 2.1's gcc 4.0.0 (build 5026) and Fink's g77 3.4.3.

Go to ftp://solve.lanl.gov/pub/solve/, download to the top level of your home directory (~) the file:

and move to the same location your license file solve2.access.


Now issue the following commands in a Terminal window:

OSX> mkdir /usr/local/solve
OSX> mkdir /usr/local/solve/solve_distribution-2.09
OSX> sudo mkdir /usr/local/lib/solve
OSX> mkdir /usr/local/solve/solve_access
OSX> mv ~/solve2.access /usr/local/solve/solve_access
OSX> sudo cp /usr/local/solve/solve_access/solve2.access /usr/local/lib/solve/
OSX> sudo chmod 644 /usr/local/lib/solve/solve2.access

then download this command file to your home (~) directory:

install_solve_distribution-2.09.tcsh

and finally install the distribution by typing:

OSX> chmod 755 ~/install_solve_distribution-2.09.tcsh
OSX> ~/install_solve_distribution-2.09.tcsh

You should see the following:

solve-2.09/
solve-2.09/000_readme.txt
solve-2.09/bin/
(...)
solve-2.09/lib/syminfo.lib
solve-2.09/lib/symop.lib
solve-2.09/lib/symop.lib.2001

Installing SOLVE and RESOLVE

Installing SOLVE and RESOLVE binaries in /usr/local/bin.
Installing SOLVE and RESOLVE library files in /usr/local/lib/solve/.
Creating resolvehelp script in /usr/local/bin
Creating solvehelp script in /usr/local/bin

All done. You can now run resolve or resolve_pattern.
Same for solve solve_giant and solve_huge.
The giant versions are for big unit cells; huge for really huge ones.

Note: on some machines you may need to have users use the
command unlimit to allow enough system resources.
This can go in a .cshrc file

For samples of how to run SOLVE and RESOLVE,
see the directory /usr/local/lib/solve//examples_solve and examples_resolve

For help on running RESOLVE, type resolvehelp
For help on running SOLVE, type solvehelp
(these may not be active until you log in again)

Please sure users have these environmental variables set:
in bash or ksh specify:
export CCP4_OPEN=UNKNOWN
export SYMOP=/usr/local/lib/solve//symop.lib
export SYMINFO=/usr/local/lib/solve//syminfo.lib
export SOLVEDIR=/usr/local/lib/solve/
export PHENIX_SOLVEDIR=$SOLVEDIR

in sh or csh specify:
setenv CCP4_OPEN UNKNOWN
setenv SYMOP /usr/local/lib/solve//symop.lib
setenv SYMINFO /usr/local/lib/solve//syminfo.lib
setenv SOLVEDIR /usr/local/lib/solve/
setenv PHENIX_SOLVEDIR $SOLVEDIR

End of SOLVE/RESOLVE installation.

Step 3 - Environmental variable setup

Finally, add the following to your ~/.login file:

# SOLVE setup:
setenv CCP4_OPEN UNKNOWN
setenv SOLVEDIR /usr/local/lib/solve
setenv PHENIX_SOLVEDIR $SOLVEDIR
setenv SOLVEBINDIR /usr/local/solve/solve-2.09/bin
setenv SOLVETMPDIR /var/tmp
setenv SYMINFO $SOLVEDIR/syminfo.lib
setenv SYMOP $SOLVEDIR/symop.lib
unlimit

IMPORTANT: you MUST add the "unlimit" command to your ~/.login file, or your RESOLVE jobs will crash due to segmentation faults!

You can now run the programs by invoking:

OSX> solve

and:

OSX> resolve

and access local HTML copies of the SOLVE and RESOLVE manuals by typing:

OSX> solvehelp

and:

OSX> resolve

respectively.

To test whether your newly created binaries work, you can use this demo data (eIF-5A 4-Se MAD dataset from Tom Peat and Tom Terwilliger).

Put the compressed archive p9_benchmark.tar.bz2 in your home directory (~) and expand it:

OSX> cd ~
OSX> bunzip2 p9_benchmark.tar.bz2
OSX> tar xvf p9_benchmark.tar
OSX> rm p9_benchmark.tar
OSX> cd p9_benchmark

then run the test job:

OSX> benchmark_osx.tcsh > benchmark_osx.log &

You can compare your log files with the ones I obtained:

Acknowledgements

Mark Saper at the University of Michigan was the true driving force behind the first Mac OS X port of the package - thank you!
I am also extremely grateful to Tom Terwilliger for making the source code of the programs available, as well as for giving many crucial hints for the initial and all subsequent ports.