Coot-gtk1
From OS X Scientific Computing
Obsolete Coot Wiki
Please note that this corresponds to coot version 0.3.x. For version 0.4.x and above, things have changed, so please go to the newer Coot page
Installing Coot
Installing Coot on OS X
Please refer to the Installing Coot on OS X page
Installing Coot on Linux
Installing coot on linux is rather more straightforward than on OS X, because most linux systems are based on gnome and/or kde, and tend to have many of the required components already installed. Most of the other dependencies are also readily available (at least in Debian, so I assume this is the case for other package management systems as well).
First, Install CCP4 on Linux.
I let ccp4 build its own fftw. Be sure to build the clipper libraries. After you complete the default installation, go back to $CLIB/clipper/clipper/mmdbold and build some more libraries, i.e.,
cd $CLIB/clipper/clipper/mmdbold make make install
to get the additional mmdbold libraries installed in their canonical location. This should take care of the ccp4-type dependencies, as well as ensuring that you have fftw libs that play well with the clipper libraries.
Second, make sure the other needed dependencies are installed
These include at least
glut libgtkcanvas imlib gtkgl glib guile python
A problem with gl.h on Ubuntu 6.06
coot configure complains it cannot find glut even though it is installed. config.log reveals it is not finding gl.h Here is a quick fix:
sudo dpkg -r --force-depends mesa-common-dev sudo apt-get install mesa-common-dev
This in essence reinstalls the gl.h header. Don't ask me why it doesn't get installed the first time around.
Also I found I had to recompile coot after the upgrade because it doesn't find the old imlib dynamic library.
Third, configure and build coot like this:
Use sudo, or a root shell, and issue the commands
./configure --with-mmdb-prefix=$CCP4 --with-clipper-prefix=$CCP4 --with-fftw=$CCP4 \ --with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 --with-gtkcanvas-prefix=/usr \ --with-ssmlib-prefix=$CCP4 --with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \ --with-guile-gtk --with-guile-gtk-prefix=/usr \ --with-glib-prefix=/usr --with-gsl-prefix=/usr --with-guile --with-python --prefix=$PWD make make -i install cp src/coot.py python/. cp src/coot.py share/coot/python/. cd share/coot wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz
The configure command is all one line; I've escaped the return. Using --prefix=$PWD simply keeps everything self-contained. You can use any install prefix you want to (it defaults to /usr/local; another sensible choice is /usr/local/xtal. Avoid /usr as a prefix, as it can mess with your system).
The make -i install is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.
If you want to make it portable
You don't need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).
You can see what dynamic libraries coot needs to load by issuing the command
ldd coot-real
or, if you just want to see the full path to the libraries, issue
ldd coot-real | awk '{print $3}' | grep -v fff | sort -u
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot's own libaries (that are already in the lib directory) and so forth.
(The ldd command is equivalent to otool -L on Mac OS X.) Then you can copy these into coot's lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).
cd /usr/local/xtal/coot-0.1.2/bin
foreach dylib in $(ldd coot-real | awk '{print $3}' | grep -v fff | grep -v "usr/local/xtal/coot" | sort -u )
print copying $dylib
sudo cp -i $dylib /usr/local/xtal/coot-0.1.2/lib/.
end
In addition, the guile modules can all be put in one centralized location:
cp -R /usr/share/guile* /usr/local/xtal/coot-0.1.2/share/.
Finally, you can give coot its own copy of the refmac monomers library:
mkdir -p /usr/local/xtal/coot-0.1.2/share/coot/lib/data cp -R /usr/local/xtal/ccp4-6.0/lib/data/monomers /usr/local/xtal/coot-0.1.0-pre-3/share/coot/lib/data/.
Then edit /usr/local/xtal/coot-0.1.2/bin/coot and un-comment the appropriate environment variable lines (there are 2).
Running Coot
General Topics
External Links
On-line User Manual
Coot's home page
Mailing list archives: (no longer) current
Mailing list archives: 2004-05
Scripts
Coot can be scripted in scheme (guile) or python. Best supported currently is the scheme scripting. PE most encourages scheme scripting.
Several examples of coot extensions to the language can be seen by examining the 0-coot-state.scm file that coot leaves behind when it finishes.
COOPS
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.
For an explanation of the principals underlying reduce and clashlist see the Dots Page. Get Molprobity software here.
Use Coot version 0.1 or higher.
Invoke like this (from the directory in which you run coot):
$ coops myfile.pdb
The use Calculate->Scripting to read in and run coops.scm
Get COOPS here.
Example Scheme Script 1
This example can be found in the coot scheme sources (the function name is molecule-centres-gui and is in the xxx/share/coot/scheme/coot-gui.scm file). It is a simple function that creates a button box - a button for each coordinates molecule in Coot. It is annotated. Reproduced here.
Example Scheme Script 2
Reading in a pdb file, an MTZ file and manipulating the model
This is a composite script and demonstrate reading pdb file, an MTZ file, translations, zoom, spin zooms, contour level changing, map masking, real space refinement, water addition and loop fitting.
The data files used in the example can be obtained here.
Example Scheme Script 3
This CNS data reading script is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh script) and can be used to compare and contrast scheme programming and shell script programming (the coot version is longer to some extent because it does extra error checking).
As well as doing the conversion the resulting mtz/maps are loaded into Coot.
It is (will be) part of Coot as of version 0.1.2.
Example Scheme Script 4: loading the latest data and pdb files automatically
To load the most recent files, do this:
coot --script latest-files.scm
which enables the scripting function: (load-latest-files)
For extra gui goodness (you will need 0.1.2):
coot --script latest-files.scm --script extensions.scm
Example Scheme Script 5: Saving a Partial model
Here we create a small function to save part of a molecule and add a gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate->Run Script... or add the script to your ~/.coot file.
save-partial.scm
Optional Wrappers and (External) Shell Script Enhancements
I (wgscott) wrote a coot wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install mapman first) and has a few other enhancements.
I also made a Coot OS X applet that allows you to drag and drop a cns/xplor or ccp4 mapfile or any other coot-compatable file (mtz or pdb file, for example). Using the File > Get Info dialog, you can program this applet to open all .map and all .mtz files, if you want to, making these files double-clickable.
Download the Applet (requires a separate working coot installation)
Enhanced Menu Appearance
I just accidently discovered that if you install the xfce desktop manager (available on linux and on OS X via fink) it makes the coot menus look nicer, even if you aren't actually using the window manager. It still modifies the gtk+ menu appearance. I also like the x in the checkbox, which I find less ambiguous than the raised (or is it lowered) hollow box for selections.
vs.

