CCP4 Molecular Graphics Documentation | ||
Build Instructions for CCP4MG on Linux |
Documentation Contents | Compiling Contents |
If you are using Ubuntu or Red Hat/CentOS/Fedora you should be able to download and build CCP4MG and all of its dependencies using use this build script. This script will download the source for CCP4, Python, Qt, PyQt, Pixie and CCP4MG. It will also attempt to check on Ubuntu or Red Hat/CentOS/Fedora that you have all the required development packages installed before attempting to do anything.
This script uses CCP4 version 6.2.0, Python version 2.7.2, Qt version 4.7.4 (or 4.6.2 on systems with only gcc3) and the latest nightly CVS source snapshot of CCP4MG.
Alternatively you can follow/adapt the detailed instructions below. (The build script closely follows this scheme.)
Install some required OS packages.
Install some Python modules we need. (Some of these are required only by ccp4i version 2, but I build them in anyway).
PYTHONHOME=<path to python2.6 installation> PATH=<path to python2.6 installation>/bin:$PATH sh ~/setuptools-0.6c11-py2.6.egg PYTHONHOME=<path to python2.6 installation> PATH=<path to python2.6 installation>/bin:$PATH easy_install lxml PYTHONHOME=<path to python2.6 installation> PATH=<path to python2.6 installation>/bin:$PATH easy_install ZODB3 PYTHONHOME=<path to python2.6 installation> PATH=<path to python2.6 installation>/bin:$PATH easy_install suds PYTHONHOME=<path to python2.6 installation> PATH=<path to python2.6 installation>/bin:$PATH easy_install numpy PYTHONHOME=<path to python2.6 installation> PATH=<path to python2.6 installation>/bin:$PATH easy_install matplotlib
cd qt-everywhere-opensource-src-4.6.2/ ./configure make make installThis will install in /usr/local/Trolltech/Qt-4.6.2 unless you told configure otherwise.
QTDIR=/usr/local/Trolltech/Qt-4.6.2 PATH=$QTDIR/bin:$PATH export QTDIR cd sip-4.10.2 <path to python2.6 installation>/bin/python configure.py cd PyQt-x11-gpl-4.7.3 <path to python2.6 installation>/bin/python configure.py make make install
The setting of environment variables on command line assumes Bourne type shell. You will need to do some setenv commands for csh type shells.
mkdir ccp4mg_dir cd ccp4mg_dir CVS_RSH=ssh CVSROOT=mgdev@cvs.ccp4.ac.uk:/public/ccp4mg/MG_CVS cvs -z9 co -r Rel_2_B . ln -s ccp4_build clipper QTDIR=/usr/local/Trolltech/Qt-4.6.2 export QTDIR PATH=<path to python2.6 installation>/bin:$QTDIR/bin:$PATH ./configure make
tar zxvf ccp4mg-2.5.0-src.tar.gz cd ccp4mg-2.5.0 ln -s ccp4_build clipper QTDIR=/usr/local/Trolltech/Qt-4.6.2 export QTDIR PATH=<path to python2.6 installation>/bin:$QTDIR/bin:$PATH ./configure make
tar zxf Pixie-X.Y.Z.tar.gz cd Pixie-X.Y.Z ./configure --prefix=ccp4mg_dir/pixie --enable-selfcontained make make installThis compilation takes a long time.
cd ccp4mg_dir/pixie/shaders LD_LIBRARY_PATH=$PWD/../lib export LD_LIBRARY_PATH for i in *.sl; do ../bin/sdrc $i done
PISA will have been built when CCP4 was built (it is part of it), unless you did make onlylib.
But we are still having to make some patches which we hope to agree with the PISA author Eugene Krissinel.
Download the patch: ccp4mg-2.5.1-pisa-patch.tar.gz
cd ccp4_dir/src/pisa/pisa tar zxvf path to/ccp4mg-2.5.1-pisa-patch.tar.gz rm -f pisa_interface.o pisa_view.o make cp pisa ccp4mg_dirccp4_suite/bin cp -a sbase ccp4mg_dirccp4_suite/share
Do not do this if you plan to use this copy of PISA in any other way from with CCP4MG. Make a separate copy in that instance.
cp -a ccp4_dir/lib/data/monomers/ ccp4mg_dir/data/monomer_library
If the CCP4 libraries were built as shared objects (.so files, you configured CCP4 with --with-shared-libs) rather than .a( configured with --non_shared),then you need to copy these libraries into the CCP4MG lib directory.
cp ccp4_dir/lib/libclipper*so* ccp4mg_dir/lib/ cp ccp4_dir/lib/lib*fftw*so* ccp4mg_dir/lib/ cp ccp4_dir/lib/lib*ccp4*so* ccp4mg_dir/lib
cp /usr/local/Trolltech/Qt-4.6.2/lib/libQt*.so* ccp4mg_dir/lib cp -a /usr/local/Trolltech/Qt-4.6.2/plugins ccp4mg_dir/QtPlugins cp /usr/lib/lib{png,gif,ungif,tiff,jpeg,z}.so.* ccp4mg_dir/lib cp -a <path to python2.6 installation> ccp4mg_dir/pythondist cd ccp4mg_dir make distrib