Centos 5.x Tcl/Tk 8.5 Python 2.7

Analysis runs faster and windows flicker less with more recent Tcl/Tk versions than the standard CentOS 5.x libraries so it's good to install recent versions of Tcl/Tk and you might as well do Python and NumPy at the same time to have a fully working setup. You can also add ARIA with a few additional commands as shown below.

Analysis

It's sensible to make use of some system libraries still so make sure you have the necessary software and development libraries installed (you'll have chosen to install the compilers already). So as root do:

yum install freeglut-devel libX11-devel libXext_devel

Now prepare to build the libraries (as root):

cd /usr/local/src

Get the sources for Tcl and Tk from the Tcl developer exchange

wget http://prdownloads.sourceforge.net/tcl/tcl<version>-src.tar.gz

wget http://prdownloads.sourceforge.net/tcl/tk<version>-src.tar.gz

Unpack the tarballs and install (default install location is /usr/local)

tar xzvf tcl<version>-src.tar.gz

cd tcl<version>/unix

./configure

make ; make install

cd ../../

tar xzvf tk<version>-src.tar.gz

cd tk<version>/unix

./configure

make ; make install

cd ../../

Get the sources for Python 2.x (stick with a 2.x version for analysis 2.x) and NumPy from their download pages

 wget http://www.python.org/ftp/python/<version>/Python-<version>.tgz

 wget http://sourceforge.net/projects/numpy/files/NumPy/<version>/numpy-<version>.tar.gz

Unpack the python tarball and configure

tar xzvf Python-<version>.tgz

cd Python-<version>

./configure

but before making you need to add /usr/local/lib to the library search path for tkinter to be built (symptom if you do not is: WARNING: renaming "_tkinter" since importing it failed: libtk8.5.so: cannot open shared object file: No such file or directory). So, using your favourite text editor make a new file matching your python version (for Python-2.7.x it would be called /etc/ld.so.conf.d/python27.conf) containing the line /usr/local/lib and run ldconfig. Now you should be able to build python and install it

make ; make install

cd ../

Now unpack and install NumPy. Note that you should be sure to use the newly installed python to end up with numpy in the right place (be careful if you have multiple pythons installed in /usr/local/bin).

tar xzvf numpy<version>.tgz

cd numpy<version>

/usr/local/bin/python setup.py

Now follow the prompts (you can just enter 2 for install and then <return> at the next question).

You can now install analysis linked to the new libraries (don't do this while someone has a project open on the machine using a previously installed version). For quick recovery to a previously installed version of analysis simply move the existing ccpnmr directory to a new name, rather than deleting it.

Also probably better to avoid unpacking over an existing installation - so assuming you have got the old ccpnmr directory out of the way:

cd /usr/local

tar xzvf <path>/analysis<version>.tgz

cd ccpnmr

Then for analysis 2.1.x the installation script requires the following responses. Shame it doesn't guess where elementtree is - it must be pretty standard in relation to the python libs?

The first question depends on whether you are the using 32 or 64 bit version of the OS.

To compile the Bayes stuff with OPENMP you'd need a later GCC than the CentOS 5.x default.

# /usr/local/bin/python installCode.py

Messages will be logged in "log_Analysis_1.txt"

Assuming your platform is linux

Are you using 64 bit libraries? (answer n unless you know otherwise) (y or n))? y

Found X11 include match: /usr/include/X11/Xlib.h

Found X11 lib match: /usr/lib64/libX11.so

Need to know where X11 directory is, in order to compile Analysis

This directory should contain [include/*/X11/Xlib.h, lib*/*/libX11.*], and as seen, /usr does

Guess X11 dir = "/usr", is this correct (y or n)? y

CCPN Tcl gzipped tar file not found, assuming using existing Tcl

Found Tcl include match: /usr/include/tcl.h

Found Tcl lib match: /usr/lib64/tclConfig.sh

Need to know where Tcl directory is, in order to compile Analysis

This directory should contain [include/*/tcl.h, lib*/*/tclConfig.sh], and as seen, /usr does

Guess Tcl dir = "/usr", is this correct (y or n)? n

Where is the Tcl dir? [/usr] /usr/local

Found Tcl include match: /usr/local/include/tcl.h

Found Tcl lib match: /usr/local/lib/tclConfig.sh

Guess Tcl version = 8.5 (by looking), is this ok (y or n) (reply y unless sure otherwise)? y

CCPN Tk gzipped tar file not found, assuming using existing Tk

Found Tk include match: /usr/local/include/tk.h

Found Tk lib match: /usr/local/lib/tkConfig.sh

Need to know where Tk directory is, in order to compile Analysis

This directory should contain [include/*/tk.h, lib*/*/tkConfig.sh], and as seen, /usr/local does

Guess Tk dir = "/usr/local", is this correct (y or n)? y

Assuming Tk version is also 8.5

CCPN Python gzipped tar file not found, assuming using existing Python

Found Python include match: /usr/include/python2.4

Found Python lib match: /usr/lib64/python2.4

Need to know where Python directory is, in order to compile Analysis

This directory should contain [include/*/python2.*, lib*/*/python2.*], and as seen, /usr does

Guess Python dir = "/usr", is this correct (y or n)? n

Where is the Python dir? [/usr] /usr/local

Found Python include match: /usr/local/include/python2.7

Found Python lib match: /usr/local/lib/python2.7

Guess Python version = 2.7 (by looking), is this ok (y or n) (reply y unless sure otherwise)? y

Do you want OpenGL used in Analysis (y or n) (n means only get Tk)? y

CCPN Mesa gzipped tar files not found, assuming using existing Mesa or alternative OpenGL

Found OpenGL include match: /usr/include/GL/gl.h

Found OpenGL lib match: /usr/lib64/libGL.so.1.2

Need to know where OpenGL directory is, in order to compile Analysis

This directory should contain [include/*/GL/gl.h, lib*/*/libGL.*], and as seen, /usr does

Guess OpenGL dir = "/usr", is this correct (y or n)? y

Found glut include match: /usr/include/GL/glut.h

Found glut lib match: /usr/lib64/libGL.so.1.2

Compile and install Analysis code (y or n)? y

You can create environment file from scratch (this does not copy it from environment_default.txt)

If you have already created it and edited it by hand you probably do not want to create it again here.

Create environment file (y or n) (answer y unless you know otherwise)? y

Does your glut need explicit initialisation (OSX and freeglut probably y, ordinary glut probably n) (y or n)? y

Use -fPIC compiler flag (y or n) (if gcc compiler y, otherwise n; answer y unless you know otherwise)? y

Use OPENMP compiler flags (y or n) (if gcc compiler >= 4.3 y, otherwise n; answer n unless you know otherwise; y allows Bayes peak separator code to use multi-processors)? n

...lots of compiler messages.....

Do you want to create a bin directory (answer y unless you know otherwise) (y or n)? y

Creating the bin directory

Install latest updates (from server) (y or n)? y

Getting latest updates from server

...updates downloaded...

Run Analysis (as test) (y or n)? y

...various messages...main analysis control bar appears...

>>> Finished installation script

Your executables are in /usr/local/ccpnmr/bin so you will want to make sure that this is on your path.

ARIA 2.3.x

This is moderately complex to install with its modified CNS and Tix and matplotlib dependencies. First install Python, Tcl/Tk and CcpNmr analysis as described above so that you have these working, then download the aria2.3 source code from http://aria.pasteur.fr You have to register and sign in to get access.

To get Tix download the source from http://sourceforge.net/projects/tix/ and install it.

cd /usr/local/src

wget http://sourceforge.net/projects/tix/files/tix/<version>/Tix<version>-src.tar.gz/download

tar xzvf Tix<version>-src.tar.gz

cd Tix<version>

./configure

make

make install

To get matplotlib download the matplotlib source from http://sourceforge.net/projects/matplotlib/ and install it.

cd /usr/local/src

wget http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-<version>/matplotlib-<version>.tar.gz/download

tar xzvf <path>matplotlib-<version>.tar.gz

cd matplotlib-<version>

python setup.py build

python setup.py install

I see some stuff about incompatible libraries being skipped during buildbut that does not seem to matter for use with ARIA.

Unpack aria and check your environment (assuming you're root using bash)

export CCPNMR_TOP_DIR=/usr/local/ccpnmr

export PYTHONPATH=.:/usr/local/ccpnmr/ccpnmr2.1/python

cd /usr/local

tar xzvf <path>aria2.3.tgz

cd aria2.3

/usr/local/bin/python check.py

if all is well then set up and recompile your ARIA-enabled CNS

cd /usr/local

tar xzvf <path>cns_solve_1.21_all.tar.gz

mv cns_solve_1.21/ cns_solve_1.21_aria2.3/

cd cns_solve_1.21_aria2.3

edit cns_solve_env to set the CNS_SOLVE directory (/usr/local/cns_solve_1.21_aria2.3). Copy the aria2.3/cns/src files to the source directory in the cns distribution, switch to csh and build CNS

csh

source cns_solve_env

cp -rf ../aria2.3/cns/src/* source/

make install

When installed this way you should start ARIA using /usr/local/bin/python so make sure that any aliases you create call it correctly.