<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.uni-konstanz.de/ccp4/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wgscott</id>
	<title>CCP4 wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.uni-konstanz.de/ccp4/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wgscott"/>
	<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php/Special:Contributions/Wgscott"/>
	<updated>2026-04-07T11:43:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=2175</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=2175"/>
		<updated>2013-12-28T04:35:36Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Installing Coot on OS X */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
&lt;br /&gt;
OS X install packages for nightly builds that work on 10.8.X and 10.9.X are available here: [http://psbmini.ucsc.edu/~wgscott/coot/?C=M;O=D Coot OS X package installers]&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/ (a mirror is at ftp://turn5.biologie.uni-konstanz.de/coot/software/binaries/nightlies/pre-release/ ) and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
==== Example: installing a 64bit nightly CentOS5 binary build on 64bit SL6.1 ====&lt;br /&gt;
First of all, SL (Scientific Linux) is a derivative of RHEL, as is CentOS. So all three OSs behave exactly the same.&lt;br /&gt;
The binaries with &amp;quot;x86_64&amp;quot; binaries are for 64bit systems; the &amp;quot;i386&amp;quot; binaries are for 32bit systems. Since my notebook is 64bits (&amp;quot;uname -a&amp;quot; reports &amp;quot;x86_64&amp;quot; more than once), I download ftp://turn5.biologie.uni-konstanz.de/coot/software/binaries/nightlies/pre-release/coot-0.7-pre-1-revision-3999-binary-Linux-x86_64-centos-5-python-gtk2.tar.gz (the main server is slow, so I use the mirror). As root, I &amp;quot;cd /usr/local/src&amp;quot; and un-tar. Next, have to find out which libraries are missing. This can be achieved by (&#039;&#039;note the use of LD_LIBRARY_PATH in the second command - do not permanently modify LD_LIBRARY_PATH !&#039;&#039;):&lt;br /&gt;
 [root@localhost]# cd coot-Linux-x86_64-centos-5-gtk2-python&lt;br /&gt;
 [root@localhost]# LD_LIBRARY_PATH=lib ldd bin/coot-real | grep found &lt;br /&gt;
 libssl.so.6 =&amp;gt; not found&lt;br /&gt;
 libcrypto.so.6 =&amp;gt; not found&lt;br /&gt;
 libssl.so.6 =&amp;gt; not found&lt;br /&gt;
 libcrypto.so.6 =&amp;gt; not found&lt;br /&gt;
&lt;br /&gt;
So only two libraries are missing! Either they can be installed using yum, or they are already available, but have a higher version.&lt;br /&gt;
* First possibility: find out about installable RPM packages (preferred way):&lt;br /&gt;
&lt;br /&gt;
 [root@localhost  src]# yum provides libssl.so.6 libcrypto.so.6&lt;br /&gt;
 Loaded plugins: refresh-packagekit&lt;br /&gt;
 openssl098e-0.9.8e-17.el6.i686 : A compatibility version of a general&lt;br /&gt;
                                : cryptography and TLS library&lt;br /&gt;
 Repo        : sl&lt;br /&gt;
 Matched from:&lt;br /&gt;
 Other       : libssl.so.6&lt;br /&gt;
 ... (the package is repeated, and libcrypto.so.6 is also mentioned)&lt;br /&gt;
: Now don&#039;t just install the openssl098e-0.9.8e-17.el6.i686 and its dependencies - it is a 32bit library (the name ends with &amp;quot;.i686&amp;quot;)! Installing it does not solve the problem - we need a 64bit library. Unfortunately &amp;quot;yum provides&amp;quot; does not tell us about the 64bit library (is that a yum bug?). By specifying just the package name (openssl098e.x86_64 would also work, and would avoid any 32bit package)&lt;br /&gt;
 yum install openssl098e&lt;br /&gt;
: we install both libssl.so.6 and libcrypto.so.6 in their 64bit versions - done! &lt;br /&gt;
&lt;br /&gt;
* Second possibility: find out if the system already has a higher version of the two libraries:&lt;br /&gt;
 [root@localhost locate libssl.so&lt;br /&gt;
 /usr/lib64/.libssl.so.1.0.0.hmac&lt;br /&gt;
 /usr/lib64/.libssl.so.10.hmac&lt;br /&gt;
 /usr/lib64/libssl.so&lt;br /&gt;
 /usr/lib64/libssl.so.1.0.0&lt;br /&gt;
 /usr/lib64/libssl.so.10&lt;br /&gt;
&lt;br /&gt;
: So the answer is: there is /usr/lib64/libssl.so which is at version 10, which is compatible with the version we need (6). For libcrypto.so the same is true. So just &lt;br /&gt;
 cd coot-Linux-x86_64-centos-5-gtk2-python/lib/&lt;br /&gt;
 ln -s /usr/lib64/libssl.so libssl.so.6&lt;br /&gt;
 ln -s /usr/lib64/libcrypto.so libcrypto.so.6&lt;br /&gt;
: The way these symlinks are made they would even work if RHEL upgrades libssl or libcrypto to higher versions. Works for me.&lt;br /&gt;
&lt;br /&gt;
Final step (this does not need to be repeated for a new coot version): create /usr/local/bin/coot with&lt;br /&gt;
 #!/bin/csh -f&lt;br /&gt;
 setenv LANG C&lt;br /&gt;
 exec /usr/local/src/coot-Linux-x86_64-centos-5-gtk2-python/bin/coot $*&lt;br /&gt;
and make it executable with &lt;br /&gt;
 chmod a+x /usr/local/bin/coot&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Packages for Ubuntu ===&lt;br /&gt;
&lt;br /&gt;
A pre-packaged version of Coot (0.7-pre-1) for Ubuntu is available from mok0&#039;s Personal Package Archive (PPA) on Launchpad. Currently, packages for Ubuntu 10.04 (Lucid) and 10.10 (Maverick) are available.&lt;br /&gt;
&lt;br /&gt;
To install the coot package on your system, you first need to install the public key for mok0&#039;s PPA:&lt;br /&gt;
&lt;br /&gt;
  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1DC81A57&lt;br /&gt;
&lt;br /&gt;
Next, add the PPA repository to your /etc/apt/sources.list file:&lt;br /&gt;
&lt;br /&gt;
  sudo add-apt-repository ppa:mok0/ppa&lt;br /&gt;
&lt;br /&gt;
That&#039;s it! Now, you should be able to:&lt;br /&gt;
&lt;br /&gt;
  apt-get update &amp;amp;&amp;amp; apt-get install coot&lt;br /&gt;
&lt;br /&gt;
This version of Coot only supports the Python scripting language.&lt;br /&gt;
&lt;br /&gt;
=== Mandriva Installation ===&lt;br /&gt;
&lt;br /&gt;
To install the coot on Mandriva 2010.0 use the ubuntu distribution:&lt;br /&gt;
tar zxf coot-0.6.2-binary-Linux-i686-ubuntu-8.04.1-python-gtk2.tar.gz&lt;br /&gt;
&lt;br /&gt;
in the .cshrc file:&lt;br /&gt;
alias coot   &#039;source /prog/CCP4/ccp4-6.1.13/include/ccp4.setup-csh ; /prog/coot-Linux-i686-ubuntu-8.04.1-gtk2-python/bin/coot&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|150px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
Note that the stereo effect is very sensitive to the vertical position of your eyes relative to the screen: if you don&#039;t see stereo, try tilting the screen.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [http://code.google.com/p/zsh-templates-osx/source/browse/trunk/Library/init/zsh/zshrc.d/local-functions/etc/dotfiles/cootrc_powermate_and_keybindings.scm powermate-coot.scm]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
[[blueify_map_keys.py]]&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
[[yellowify_molecule_keys.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: NCS Rotamer differences===&lt;br /&gt;
&lt;br /&gt;
To show NCS where NCS-related side-chains have different rotamers:&lt;br /&gt;
&lt;br /&gt;
[[ncs_rotamer_differences.py]]&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==Coot development==&lt;br /&gt;
&lt;br /&gt;
Q: How can I get involved with Coot development?&lt;br /&gt;
&lt;br /&gt;
A: Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
Specific Q3: I am unable to open the output pdb file from ShelXL in Coot.&lt;br /&gt;
&lt;br /&gt;
A: Well, it&#039;s hard to know what&#039;s the problem without details - the console should say something. But when handling the output of shelxl, I suggest you read the .res file rather than the pdb, then the subsequent .ins file contains lots of &amp;quot;header&amp;quot; information.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;br /&gt;
&lt;br /&gt;
==Disulfide bond across crystallographic axis==&lt;br /&gt;
Q: I have a pair of disulfide bonds which link two monomers in separate  asymmetric units.  There is a single monomer in the asymmetric unit, and two monomers come together to form disulfides between Cys 26-Cys45, and Cys45-Cys26. When I real-space-refine these residues, they do not form a nice disulfide, and Coot does not seem to recognize them as a disulfide. &lt;br /&gt;
&lt;br /&gt;
A: For the record, you can&#039;t refine symmetry-related disulfides in Coot (as of Nov 3, 2009).&lt;br /&gt;
&lt;br /&gt;
==Macros in COOT==&lt;br /&gt;
&lt;br /&gt;
Q: How to use macros in COOT? Do they need to be written in Python or another language that I had not heard of before? Where can I find a low level description of how to write macros with some examples (I know nothing about Python, except that it is fashionable)?&lt;br /&gt;
&lt;br /&gt;
A: The other language is a form of Lisp, called [http://en.wikipedia.org/wiki/Scheme_(programming_language) Scheme]. You can learn about programming python in many ways of course (not least the [http://docs.python.org/tutorial/ python tutorial], which is what I read first). The coot python extensions are described in the documentation. There is a standard trivial formatting change that has to be made to get the syntax right for python, see &amp;quot;Python Scripting&amp;quot; [[http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-faq.html|here]]. There is a growing collection of coot scripts in this Wiki article.&lt;br /&gt;
&lt;br /&gt;
== building loops ==&lt;br /&gt;
&lt;br /&gt;
Q: Is there any similar function in COOT as lego_auto_mainchain command in O program?&lt;br /&gt;
&lt;br /&gt;
A: there are 2 loop fitting tools in Coot&lt;br /&gt;
&lt;br /&gt;
# C alpha -&amp;gt; Mainchain [http://lmb.bioch.ox.ac.uk/coot/doc/coot.html#C_002dalpha-_002d_003e-Mainchain],[http://lmb.bioch.ox.ac.uk/coot/doc/coot.html#Building-Links-and-Loops]&lt;br /&gt;
# DB Loop: (No good documentation) [http://lmb.bioch.ox.ac.uk/coot/doc/coot/protein_002ddb_002dloops.html#protein_002ddb_002dloops] Extensions -&amp;gt; Modelling -&amp;gt; DB Loop... &lt;br /&gt;
&lt;br /&gt;
==LSQ superpositions==&lt;br /&gt;
&lt;br /&gt;
Q: Do an LSQ superposition using specified residues in multiple chains (superposing one oligomer on another).&lt;br /&gt;
&lt;br /&gt;
A: Something like this then? &lt;br /&gt;
&lt;br /&gt;
 clear_lsq_matches()&lt;br /&gt;
 # specs for reference then moving&lt;br /&gt;
 add_lsq_match(20, 90, &amp;quot;A&amp;quot;,  20, 90, &amp;quot;A&amp;quot;, 1)&lt;br /&gt;
 add_lsq_match(20, 90, &amp;quot;B&amp;quot;,  20, 90, &amp;quot;B&amp;quot;, 1)&lt;br /&gt;
 add_lsq_match(15, 75, &amp;quot;D&amp;quot;,  15, 75, &amp;quot;D&amp;quot;, 1)&lt;br /&gt;
 apply_lsq_matches(1, 2)&lt;br /&gt;
&lt;br /&gt;
which presumes that the reference molecule is in 1 and the moving molecule 2.&lt;br /&gt;
&lt;br /&gt;
Q: How to do a LSQ superposition of a homologous structure onto my working structure using ± N residues about the current position, where N is a variable (not essential, could be fixed) and the current position is the last residue that I clicked on.&lt;br /&gt;
&lt;br /&gt;
A: That is more involved - and more useful because it  can be dynamic. Something like the following perhaps (in Scheme, just for amusement (not tested)). You will need to set imol-ref, perhaps by reading in the reference pdb, as demonstrated below.  The function is bound to Shift-Y.&lt;br /&gt;
&lt;br /&gt;
 (define dynamic-lsq-range-extent 2)  ;; ± 2 residues either side of centre residue&lt;br /&gt;
 (define imol-ref (read-pdb &amp;quot;reference.pdb&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 ;; convert between the input reference chain id and the chain id of&lt;br /&gt;
 ;; the moving molecule that corresponds to that chain&lt;br /&gt;
 ;;&lt;br /&gt;
 (define (mov-match-chain ref-chain-id)&lt;br /&gt;
  ref-chain-id)&lt;br /&gt;
 &lt;br /&gt;
 (define (dynamic-lsq-match)&lt;br /&gt;
 &lt;br /&gt;
  ;; get the current residue and use that to make residue ranges for&lt;br /&gt;
  ;; an LSQ fit&lt;br /&gt;
  ;;&lt;br /&gt;
 &lt;br /&gt;
  (using-active-atom&lt;br /&gt;
   (clear-lsq-matches)&lt;br /&gt;
   (add-lsq-match (- aa-res-no dynamic-lsq-range-extent)&lt;br /&gt;
          (+ aa-res-no dynamic-lsq-range-extent)&lt;br /&gt;
          aa-chain-id&lt;br /&gt;
          (- aa-res-no dynamic-lsq-range-extent)&lt;br /&gt;
          (+ aa-res-no dynamic-lsq-range-extent)&lt;br /&gt;
          (mov-match-chain aa-chain-id)&lt;br /&gt;
          1)&lt;br /&gt;
   (apply-lsq-matches aa-imol imol-ref)))&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 (add-key-binding &amp;quot;Dynamic LSQ overlay&amp;quot; &amp;quot;Y&amp;quot; dynamic-lsq-match)&lt;br /&gt;
&lt;br /&gt;
== reading MTZ file with experimental PHI and FOM using --auto ==&lt;br /&gt;
&lt;br /&gt;
Q:  There is the --auto &amp;lt;filename&amp;gt; commandline option for auto-reading mtz files (mtz file has the default labels FWT, PHWT). Can this be made to work with a SHELXE .phs output file after converting with convert2mtz ? - the resulting MTZ file has labels F PHI FOM.&lt;br /&gt;
&lt;br /&gt;
A: use: coot --python -c &#039;make_and_draw_map(&amp;quot;sad.mtz&amp;quot;, &amp;quot;F&amp;quot;, &amp;quot;PHI&amp;quot;, &amp;quot;FOM&amp;quot;, &amp;quot;/HKL_base/HKL_base/FOM&amp;quot;,1, 0)&#039;&lt;br /&gt;
&lt;br /&gt;
== NCS Rotamer differences ==&lt;br /&gt;
&lt;br /&gt;
Show me where NCS-related side-chains have different rotamers&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
 (define (compare-ncs-rotamer imol chain-A chain-B)&lt;br /&gt;
  (let ((n-residues (chain-n-residues chain-A imol))&lt;br /&gt;
        (mismatched-rotamers &#039;()))&lt;br /&gt;
    (for-each &lt;br /&gt;
     (lambda (serial-number)&lt;br /&gt;
       &lt;br /&gt;
       (let ((res-name-A (resname-from-serial-number imol chain-A serial-number))&lt;br /&gt;
             (res-no-A   (seqnum-from-serial-number  imol chain-A serial-number))&lt;br /&gt;
             (ins-code-A (insertion-code-from-serial-number imol chain-A serial-number))&lt;br /&gt;
             (res-name-B (resname-from-serial-number imol chain-A serial-number))&lt;br /&gt;
             (res-no-B   (seqnum-from-serial-number  imol chain-A serial-number))&lt;br /&gt;
             (ins-code-B (insertion-code-from-serial-number imol chain-A serial-number)))&lt;br /&gt;
         (if (not (= res-no-A res-no-B))&lt;br /&gt;
             (begin&lt;br /&gt;
               (format #t &amp;quot;sequence number for ~s do not match~%&amp;quot; res-no-A))&lt;br /&gt;
             (if (not (string=? res-name-A res-name-B))&lt;br /&gt;
                 (begin&lt;br /&gt;
                   (format #t &amp;quot;residue names for ~s do not match~%&amp;quot; res-no-A))&lt;br /&gt;
                 (let ((rot-name-A (get-rotamer-name imol chain-A res-no-A ins-code-A))&lt;br /&gt;
                       (rot-name-B (get-rotamer-name imol chain-B res-no-B ins-code-B)))&lt;br /&gt;
                   (if (not (string=? rot-name-A rot-name-B))&lt;br /&gt;
                       (begin&lt;br /&gt;
                         (set! mismatched-rotamers &lt;br /&gt;
                               (cons (list imol chain-A res-no-A ins-code-A &lt;br /&gt;
                                           res-name-A &lt;br /&gt;
                                           (if (string=? rot-name-A &amp;quot;&amp;quot;) &amp;quot;-&amp;quot; rot-name-A)&lt;br /&gt;
                                           (if (string=? rot-name-B &amp;quot;&amp;quot;) &amp;quot;-&amp;quot; rot-name-B))&lt;br /&gt;
                                     mismatched-rotamers))))&lt;br /&gt;
                   )))))&lt;br /&gt;
     (range n-residues))&lt;br /&gt;
    (dialog-box-of-buttons &amp;quot;Mismatched Rotamers&amp;quot;&lt;br /&gt;
                           (cons 300 300)&lt;br /&gt;
                           (map (lambda(rotamer) &lt;br /&gt;
                                  (let ((label (string-append &amp;quot; &amp;quot; &lt;br /&gt;
                                                              (list-ref rotamer 1)&lt;br /&gt;
                                                              &amp;quot; &amp;quot;&lt;br /&gt;
                                                              (number-&amp;gt;string (list-ref rotamer 2))&lt;br /&gt;
                                                              (list-ref rotamer 3) &lt;br /&gt;
                                                              &amp;quot; &amp;quot;&lt;br /&gt;
                                                              (list-ref rotamer 4) ;; res-name&lt;br /&gt;
                                                              &amp;quot;:  &amp;quot;&lt;br /&gt;
                                                              (list-ref rotamer 5)&lt;br /&gt;
                                                              &amp;quot; vs. &amp;quot;&lt;br /&gt;
                                                              (list-ref rotamer 6)))&lt;br /&gt;
                                        (thunk (lambda ()&lt;br /&gt;
                                                 (set-go-to-atom-molecule imol)&lt;br /&gt;
                                                 (set-go-to-atom-chain-residue-atom-name &lt;br /&gt;
                                                  (list-ref rotamer 1) &lt;br /&gt;
                                                  (list-ref rotamer 2) &amp;quot; CA &amp;quot;))))&lt;br /&gt;
                                    (list label thunk)))&lt;br /&gt;
                                mismatched-rotamers)&lt;br /&gt;
                           &amp;quot;  Close  &amp;quot;)))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And one would use this something like:&lt;br /&gt;
&lt;br /&gt;
 ;; example usage:&lt;br /&gt;
 (let ((imol (read-pdb &amp;quot;test.pdb&amp;quot;)))&lt;br /&gt;
   (compare-ncs-rotamer imol &amp;quot;A&amp;quot; &amp;quot;B&amp;quot;))&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Positions_3&amp;diff=1702</id>
		<title>Positions 3</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Positions_3&amp;diff=1702"/>
		<updated>2010-08-03T03:35:03Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Department of Chemistry &amp;amp; Biochemistry at the University of California, Santa Cruz invites applications from outstanding candidates for a &#039;&#039;&#039;tenure-track Assistant Professor position&#039;&#039;&#039; in the broad area of experimental biomedical research, such as biochemistry, biophysics, bioanalytical chemistry, structural biology, enzymology, synthetic biology/metabolic engineering, computational biology, metallobiochemistry and proteomics. Areas of research complementing our existing strengths in protein and nucleic acid structure/function, enzyme activity and design, mechanisms of neurodegenerative diseases, oncogenesis and other pathologies, and macromolecular spectroscopic analyses are particularly encouraged. The successful candidate will be expected to have a commitment to, and talent for, teaching at both the undergraduate and graduate levels. The campus is especially interested in candidates who will have interdisciplinary interactions with the Department of Molecular, Cell, and Developmental Biology, the Department of Microbiology and Environmental Toxicology, or the Department of Biomolecular Engineering, and who will contribute to the diversity and excellence of the academic community through research, teaching and service.&lt;br /&gt;
&lt;br /&gt;
For more information, please click on the [http://apo.ucsc.edu/academic_employment/jobs/104-11.pdf Link to PDF]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Positions_3&amp;diff=1701</id>
		<title>Positions 3</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Positions_3&amp;diff=1701"/>
		<updated>2010-08-03T03:33:54Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please click on the [http://apo.ucsc.edu/academic_employment/jobs/104-11.pdf Link to PDF]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Positions&amp;diff=1700</id>
		<title>Positions</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Positions&amp;diff=1700"/>
		<updated>2010-08-03T03:31:28Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Positions_6|Postdoctoral fellows in Macromolecular crystallography at Xiamen University]] (closing date 12/31/2009)&lt;br /&gt;
&lt;br /&gt;
* [[Positions_1|Ph.D. Position at the University of Oslo, Norway]] (closing date 08/03/2010)&lt;br /&gt;
* [[Positions_2|Biophysical specialist.  MRC Laboratory of Molecular Biology, Cambridge, UK]] (closing date 21/April/2010)&lt;br /&gt;
* [[Positions_3|Faculty Position, University of California, Santa Cruz]](closing date 1 October 2010)&lt;br /&gt;
&lt;br /&gt;
==  Note to those who add new items to this page ==&lt;br /&gt;
&lt;br /&gt;
The texts go into articles with generic names [[Positions_1]], [[Positions_2]] and so on. Thus, if you add a position advert to the bottom of the list, please edit the text of an empty or expired article with generic name, and adjust the text of the link on this page.&amp;lt;br&amp;gt;&lt;br /&gt;
Please give an application deadline for the job offer - &amp;quot;position is open until filled&amp;quot; is too unspecific, and one does not know when this offer can be removed. Thanks!&amp;lt;br&amp;gt;&lt;br /&gt;
And: &#039;&#039;&#039;please&#039;&#039;&#039; do not delete this note!&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1538</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1538"/>
		<updated>2009-08-21T05:31:05Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Invoking Zalman Stereo mode in COOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of 0.6-pre-1 (revision 2223), you can use the Draw &amp;gt; Stereo menu to select Zalman Stereo.  On earlier versions, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
To get back to mono mode, try&lt;br /&gt;
&lt;br /&gt;
 (mono-mode)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 mono_mode()&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Zalman&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Customized Key Bindings to Toggle Stereo on and Off ===&lt;br /&gt;
&lt;br /&gt;
Replace the keys with whatever ones you prefer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;; Toggle Zalman Stereo mode&lt;br /&gt;
    ;; bind the S (shift-s) key to get Stereo&lt;br /&gt;
    (add-key-binding &amp;quot;Zalman Stereo&amp;quot; &amp;quot;S&amp;quot; zalman-stereo-mode)&lt;br /&gt;
    ;; bind the M (shift-m) key to get Mono&lt;br /&gt;
    (add-key-binding &amp;quot;Undo Zalman Stereo&amp;quot; &amp;quot;M&amp;quot; mono-mode)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inverted Stereo?===&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1537</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1537"/>
		<updated>2009-08-20T19:11:30Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Example Scheme Script 6: Creating an interface for the Powermate Dial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|150px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [http://code.google.com/p/zsh-templates-osx/source/browse/trunk/Library/init/zsh/zshrc.d/local-functions/etc/dotfiles/cootrc_powermate_and_keybindings.scm powermate-coot.scm]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1536</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1536"/>
		<updated>2009-08-20T18:33:59Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Customized Menu for Zalman Monitor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
To get back to mono mode, try&lt;br /&gt;
&lt;br /&gt;
 (mono-mode)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 mono_mode()&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Zalman&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Customized Key Bindings to Toggle Stereo on and Off ===&lt;br /&gt;
&lt;br /&gt;
Replace the keys with whatever ones you prefer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;; Toggle Zalman Stereo mode&lt;br /&gt;
    ;; bind the S (shift-s) key to get Stereo&lt;br /&gt;
    (add-key-binding &amp;quot;Zalman Stereo&amp;quot; &amp;quot;S&amp;quot; zalman-stereo-mode)&lt;br /&gt;
    ;; bind the M (shift-m) key to get Mono&lt;br /&gt;
    (add-key-binding &amp;quot;Undo Zalman Stereo&amp;quot; &amp;quot;M&amp;quot; mono-mode)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inverted Stereo?===&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1535</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1535"/>
		<updated>2009-08-20T18:08:35Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Customized Menu for Zalman Monitor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
To get back to mono mode, try&lt;br /&gt;
&lt;br /&gt;
 (mono-mode)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 mono_mode()&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for PowerMate Dial and Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Custom&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
=== Customized Key Bindings to Toggle Stereo on and Off ===&lt;br /&gt;
&lt;br /&gt;
Replace the keys with whatever ones you prefer.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;; Toggle Zalman Stereo mode&lt;br /&gt;
    ;; bind the S (shift-s) key to get Stereo&lt;br /&gt;
    (add-key-binding &amp;quot;Zalman Stereo&amp;quot; &amp;quot;S&amp;quot; zalman-stereo-mode)&lt;br /&gt;
    ;; bind the M (shift-m) key to get Mono&lt;br /&gt;
    (add-key-binding &amp;quot;Undo Zalman Stereo&amp;quot; &amp;quot;M&amp;quot; mono-mode)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Inverted Stereo?===&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1534</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1534"/>
		<updated>2009-08-20T18:06:56Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Customized Menu for Zalman Monitor and Powermate Dial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
To get back to mono mode, try&lt;br /&gt;
&lt;br /&gt;
 (mono-mode)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 mono_mode()&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for PowerMate Dial and Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Custom&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Which, in turn, requires [http://code.google.com/p/zsh-templates-osx/source/browse/trunk/Library/init/zsh/zshrc.d/local-functions/etc/dotfiles/cootrc_powermate_and_keybindings.scm a file called ~/.cootrc_powermate_and_keybindings.scm]&lt;br /&gt;
&lt;br /&gt;
===Inverted Stereo?===&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1533</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1533"/>
		<updated>2009-08-20T09:15:03Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Hardware Stereo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|150px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1532</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1532"/>
		<updated>2009-08-20T09:14:28Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Zalman Stereo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|250px|thumb|right|3d lcd]]&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1531</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1531"/>
		<updated>2009-08-20T09:13:43Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Zalman Stereo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|250px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1530</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1530"/>
		<updated>2009-08-20T09:10:32Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Invoking Zalman Stereo mode in COOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
To get back to mono mode, try&lt;br /&gt;
&lt;br /&gt;
 (mono-mode)&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 mono_mode()&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor and Powermate Dial ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for PowerMate Dial and Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Custom&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;PowerMate&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (load (append-dir-file (getenv &amp;quot;HOME&amp;quot;) &amp;quot;.cootrc_powermate_and_keybindings.scm&amp;quot;))))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Which, in turn, requires [http://code.google.com/p/zsh-templates-osx/source/browse/trunk/Library/init/zsh/zshrc.d/local-functions/etc/dotfiles/cootrc_powermate_and_keybindings.scm a file called ~/.cootrc_powermate_and_keybindings.scm]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Inverted Stereo?===&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1529</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1529"/>
		<updated>2009-08-20T09:08:04Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Customized Menu for Zalman Monitor and Powermate Dial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor and Powermate Dial ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for PowerMate Dial and Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Custom&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;PowerMate&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (load (append-dir-file (getenv &amp;quot;HOME&amp;quot;) &amp;quot;.cootrc_powermate_and_keybindings.scm&amp;quot;))))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Which, in turn, requires [http://code.google.com/p/zsh-templates-osx/source/browse/trunk/Library/init/zsh/zshrc.d/local-functions/etc/dotfiles/cootrc_powermate_and_keybindings.scm a file called ~/.cootrc_powermate_and_keybindings.scm]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Inverted Stereo?===&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1528</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1528"/>
		<updated>2009-08-20T09:07:13Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Some Potentially Useful Scripts and Tweaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
=== Customized Menu for Zalman Monitor and Powermate Dial ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; Customize menu bar for PowerMate Dial and Zalman monitor&lt;br /&gt;
(let ((menu (coot-menubar-menu &amp;quot;Custom&amp;quot;)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;PowerMate&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (load (append-dir-file (getenv &amp;quot;HOME&amp;quot;) &amp;quot;.cootrc_powermate_and_keybindings.scm&amp;quot;))))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo ON&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (zalman-stereo-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Stereo OFF&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (mono-mode)))&lt;br /&gt;
  (add-simple-coot-menu-menuitem&lt;br /&gt;
   menu &amp;quot;Zalman Full-Screen&amp;quot;&lt;br /&gt;
   (lambda ()&lt;br /&gt;
 (set-graphics-window-position 0 0)(set-graphics-window-size 1680 1050))))&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Which, in turn, requires [http://code.google.com/p/zsh-templates-osx/source/browse/trunk/Library/init/zsh/zshrc.d/local-functions/etc/dotfiles/cootrc_powermate_and_keybindings.scm a file called ~/.cootrc_powermate_and_keybindings.scm]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1527</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1527"/>
		<updated>2009-08-20T09:02:36Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Some Potentially Useful Scripts and Tweaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
=== Crank Up Font Size===&lt;br /&gt;
&lt;br /&gt;
 ;; The font needs to be cranked up to be visible in stereo&lt;br /&gt;
 (set-font-size 3)&lt;br /&gt;
&lt;br /&gt;
=== For Zalman to the left of main display ===&lt;br /&gt;
&lt;br /&gt;
If your monitor is to the right, you will have to adjust X values appropriately&lt;br /&gt;
&lt;br /&gt;
 ;; Specific for Zalman monitor set to the left of eg MacBook Air&lt;br /&gt;
 ;;&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
 ;; Make these subsidiary windows appear on the right-hand monitor&lt;br /&gt;
 (set-model-fit-refine-dialog-position 1900 0)&lt;br /&gt;
 (set-delete-dialog-position 1700 50)&lt;br /&gt;
 (set-go-to-atom-window-position 1847 67)&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1526</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1526"/>
		<updated>2009-08-20T08:55:52Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Some Potentially Useful Scripts and Tweaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;br /&gt;
&lt;br /&gt;
 ;; These should be even numbers to keep the stereo&lt;br /&gt;
 ;; the right way around&lt;br /&gt;
 (set-graphics-window-position 0 0)&lt;br /&gt;
 (set-graphics-window-size 1680 1050)&lt;br /&gt;
&lt;br /&gt;
In general, if the image is inverted, just move the window up or down 1&lt;br /&gt;
pixel.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1525</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1525"/>
		<updated>2009-08-20T06:06:10Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Some Potentially Useful Scripts and Tweaks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Double.png]]&lt;br /&gt;
&lt;br /&gt;
When you put on the glasses, you should see a single image, in 3D stereo.&lt;br /&gt;
&lt;br /&gt;
If things look weird, the image might be backwards, in which case, try moving the Coot window down one pixel (just move it around a bit until it looks right).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=File:Double.png&amp;diff=1524</id>
		<title>File:Double.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=File:Double.png&amp;diff=1524"/>
		<updated>2009-08-20T06:04:40Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: what you see without the glasses&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;what you see without the glasses&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1523</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1523"/>
		<updated>2009-08-20T05:56:51Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Invoking Zalman Stereo mode in COOT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;quot;Hardware Stereo&amp;quot; is turned &#039;&#039;&#039;off&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
As of now, there is no button for Zalman stereo mode.  Instead, open up a scripting window, and issue the scheme command&lt;br /&gt;
&lt;br /&gt;
 (zalman-stereo-mode)&lt;br /&gt;
&lt;br /&gt;
or else the python command&lt;br /&gt;
&lt;br /&gt;
 zalman_stereo_mode()&lt;br /&gt;
&lt;br /&gt;
and you should then see a double image that looks like this:&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1522</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1522"/>
		<updated>2009-08-20T05:55:03Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Setting it up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
Plug in all the cables and verify the monitor is working.  To get the stereo display to work, it is imperative that you &#039;&#039;&#039;turn display mirroring off&#039;&#039;&#039;.  I placed the monitor to the left of my laptop, which required moving things around in the Display System Preferences.  I also dragged the menu bar over to the external monitor to make in the primary monitor.  This isn&#039;t so important for coot, whose menu is attached to the X11 window, but OS X pymol will drive you nuts if you have the menu on a separate monitor.&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1521</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1521"/>
		<updated>2009-08-20T05:51:12Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Setting it up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
[[Image:31nBUURNRYL._SL500_AA280_.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=File:31nBUURNRYL._SL500_AA280_.jpg&amp;diff=1520</id>
		<title>File:31nBUURNRYL. SL500 AA280 .jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=File:31nBUURNRYL._SL500_AA280_.jpg&amp;diff=1520"/>
		<updated>2009-08-20T05:50:29Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: one possible adaptor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;one possible adaptor&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1519</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1519"/>
		<updated>2009-08-20T05:49:50Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Setting it up */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
The monitor comes with both a VGA and a DVI cable. If at all possible, use the DVI cable.  Apple users will need to purchase an adaptor like the one pictured below:&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1518</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1518"/>
		<updated>2009-08-20T05:45:04Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|right|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1517</id>
		<title>Zalman Stereo</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Zalman_Stereo&amp;diff=1517"/>
		<updated>2009-08-20T05:44:16Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: New page: = Zalman LCD Stereo for COOT =  The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=2...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Zalman LCD Stereo for COOT =&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|left|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
The following describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze. The beauty of this is that it is platform-independent and apparently works with pretty much any hardware (PC, mac, etc) and operating system.&lt;br /&gt;
&lt;br /&gt;
== Setting it up ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Invoking Zalman Stereo mode in COOT ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Some Potentially Useful Scripts and Tweaks ==&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1516</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1516"/>
		<updated>2009-08-20T05:40:14Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Zalman Stereo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300:  [http://www.zalman.co.kr/eng/product/product_read.asp?idx=219 Zalman ZM-M220W]&lt;br /&gt;
&lt;br /&gt;
The attributes for this monitor have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|left|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1515</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1515"/>
		<updated>2009-08-20T05:37:09Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Zalman Stereo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300.&lt;br /&gt;
&lt;br /&gt;
The attributes have been tested and [http://pymol.org/zalman/ described rather extensively by Warren DeLano] on the PyMOL site.&lt;br /&gt;
&lt;br /&gt;
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|200px|thumb|left|3d lcd]]&lt;br /&gt;
&lt;br /&gt;
The [[coot zalman]] page describes specifically how to get this to work with coot on Mac OS X, but the instructions should be generalizable to linux and Windoze.&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=File:A_zalman_zm_m220w_2d_35_pic.jpg&amp;diff=1514</id>
		<title>File:A zalman zm m220w 2d 35 pic.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=File:A_zalman_zm_m220w_2d_35_pic.jpg&amp;diff=1514"/>
		<updated>2009-08-20T05:32:32Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: Zalman propaganda figure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zalman propaganda figure&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1513</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1513"/>
		<updated>2009-08-20T05:25:33Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Hardware Stereo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting &amp;quot;Hardware Stereo&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1512</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1512"/>
		<updated>2009-08-20T05:24:10Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Side-by-Side */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Draw&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1511</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1511"/>
		<updated>2009-08-20T05:23:41Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Stereographic Display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the &amp;quot;Stereo&amp;quot; menu item under &amp;quot;Drawing&amp;quot;, as is shown in the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:stereo_menu_screenshot.png]]&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=File:Stereo_menu_screenshot.png&amp;diff=1510</id>
		<title>File:Stereo menu screenshot.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=File:Stereo_menu_screenshot.png&amp;diff=1510"/>
		<updated>2009-08-20T05:21:24Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: screenshot of stereo menu being invoked&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;screenshot of stereo menu being invoked&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1509</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1509"/>
		<updated>2009-08-20T05:14:01Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Stereographic Display */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
Coot has several options for stereographic display, ranging from cross-eyed and wall-eyed split-screen stereo, to hardware-stereo modes that work with CRT systems and most recently the new Zalman 3-D LCD monitor.&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1508</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1508"/>
		<updated>2009-08-20T05:11:38Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Controls */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.&lt;br /&gt;
&lt;br /&gt;
There is a [http://www.biop.ox.ac.uk/coot/ homepage] with extensive [http://www.biop.ox.ac.uk/coot/docs.html documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [http://www.ysbl.york.ac.uk/~emsley/software/binaries/ primary server] (as of July 10, 2009 there&#039;s a new site at http://www.biop.ox.ac.uk/coot/devel/build-info.html) or, if that is not available, from an [ftp://turn5.biologie.uni-konstanz.de/coot external mirror]. The license of Coot is GNU GPL. &lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Stereographic Display ===&lt;br /&gt;
&lt;br /&gt;
==== Side-by-Side ====&lt;br /&gt;
&lt;br /&gt;
==== Hardware Stereo ====&lt;br /&gt;
&lt;br /&gt;
==== Zalman Stereo ====&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;br /&gt;
&lt;br /&gt;
==NCS edits== &lt;br /&gt;
Q: I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
==SHELXL==&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
==Image quality on NVidia cards==&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Setting default to show symmetry-related molecules==&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
==Startup files==&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
==Torsion general==&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe the torsion - the first atom will be the base (non moving) part of the atom tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
&lt;br /&gt;
Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
==Peak heights in maps==&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the Coot wiki and pick up the [[Coot#Scheme_Scripts|scheme key bindings]]. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=CCP4&amp;diff=1471</id>
		<title>CCP4</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=CCP4&amp;diff=1471"/>
		<updated>2009-06-21T04:10:29Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: added a mailing list url&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CCP4 quick links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ccp4.ac.uk/main.html CCP4 Home Page]&lt;br /&gt;
&lt;br /&gt;
* [http://www.ccp4.ac.uk/ccp4bb.php New CCP4 Bulletin Board] and [http://www.mail-archive.com/ccp4bb@jiscmail.ac.uk/ threaded archive]&lt;br /&gt;
&lt;br /&gt;
* [http://www.dl.ac.uk/list-archive-public/ccp4bb/threads.html Old CCP4 Bulletin Board]&lt;br /&gt;
&lt;br /&gt;
* [http://www.ccp4.ac.uk/problems.php CCP4 Problem Pages]&lt;br /&gt;
&lt;br /&gt;
* [http://www.ccp4.ac.uk/download.php CCP4 Downloads]&lt;br /&gt;
&lt;br /&gt;
=What is CCP4?=&lt;br /&gt;
[[CCP4]] is a crystallographic program system, and can be downloaded from [http://www.ccp4.ac.uk/download.php]. &lt;br /&gt;
It is free for academic use; the license is at [http://www.ccp4.ac.uk/ccp4license.php].&lt;br /&gt;
Documentation is at [http://www.ccp4.ac.uk/docs.php], and a mailing list (CCP4BB) is at [http://www.ccp4.ac.uk/ccp4bb.php]. The mailing list archive at http://proteincrystallography.org/ccp4bb/ seems to be more up-to-date than the official one.&lt;br /&gt;
&lt;br /&gt;
=Using CCP4=&lt;br /&gt;
&lt;br /&gt;
=Installing CCP4=&lt;br /&gt;
&lt;br /&gt;
==Installing CCP4&#039;s distributed precompiled binaries==&lt;br /&gt;
&lt;br /&gt;
As a courtesy, CCP4 compiles binaries for most major platforms so that you don&#039;t have to. &lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.ccp4.ac.uk/download.php ccp4 download page] for detailed instructions.&lt;br /&gt;
&lt;br /&gt;
==Installing from sourcecode==&lt;br /&gt;
&lt;br /&gt;
Many people prefer to compile the programs from the distributed source code, which can be obtained from the [http://www.ccp4.ac.uk/download.php ccp4 download site]. The configure script should permit you to do this on any modern unix or linux platform.&lt;br /&gt;
&lt;br /&gt;
===Other options===&lt;br /&gt;
&lt;br /&gt;
Various users have made unofficial (and unsupported) install options available as a courtesy to their colleagues for some platforms. The following will hopefully grow into a comprehensive listing of links that describe such options.  Even if you don&#039;t use these install options, visiting the links relevant to your platform might be worth your time.&lt;br /&gt;
&lt;br /&gt;
* [http://xanana.ucsc.edu/xtal/wiki/index.php/Installing_CCP4_on_OS_X CCP4 on OS X]&lt;br /&gt;
&lt;br /&gt;
=Maintaining and Updating CCP4=&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Main_Page&amp;diff=1470</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Main_Page&amp;diff=1470"/>
		<updated>2009-06-21T04:07:16Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: added a mailing list url&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This [http://www.ccp4.ac.uk/ CCP4] user community wiki (&amp;quot;CCP4 wiki&amp;quot; in short) is meant to be a collection of crystallographic knowledge as discussed on the [http://www.ccp4.ac.uk/ccp4bb.php CCP4 mailing list] (CCP4BB), and elsewhere. It may contain information about anything relevant to protein crystallographers, whether methods-related (&amp;quot;what is the best program for purpose X?&amp;quot;), problem-oriented (&amp;quot;my crystals melt if I look at them&amp;quot;), or concerning hardware (&amp;quot;what is your opinion on robot X / computer Y?&amp;quot;). &lt;br /&gt;
&lt;br /&gt;
The general [[Topics]] include articles about [[Expression_and_Purification| protein expression and purification]],&lt;br /&gt;
[[Crystals| crystal growth, handling and data collection]],[[Crystallography| crystallographic theory and practice]],&lt;br /&gt;
and crystal structure related [[Bioinformatics|bioinformatics]] and [[Xtal_computing|computer-related issues]]. There are also announcements for [[Positions|open positions]],  [[Courses and Conferences|courses and conferences]] and a [[FAQ|FAQ]].&lt;br /&gt;
&lt;br /&gt;
Many interesting questions are currently being answered on CCP4BB, but the answers are not easily accessible for others after some time. The intention is that the wiki reflect the breadth of topics on CCP4BB, which will make it a useful resource e.g. for &amp;quot;frequently asked questions&amp;quot;, offloading some of the question/answer traffic on CCP4BB to a more permanent mode of storage. A wiki has the additional advantage that mathematical formulas and images may be presented nicely.&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
April 04, 2008: transparent inter-wiki linking is now very easy due to an extension called &amp;quot;[http://www.mediawiki.org/wiki/Extension:Special_page_to_work_with_the_interwiki_table SpecialInterwiki]&amp;quot;. These links appear like internal links (see the next sentences!), and can point to subsections of an article, or to figures (untested!). This also means that if a wiki changes its DNS name, only a single inter-wiki link has to be updated. &lt;br /&gt;
Currently, the [[ccp4dev:Main_Page|CCP4 developers&#039; wiki]], the [[xds:Main_Page|XDSwiki]] and (as of May 02, 2008) the [[iucr:Main_Page|IUCr Online Dictionary of Crystallography]] are in the [[Special:Interwiki|Inter-Wiki table]].  &lt;br /&gt;
 &lt;br /&gt;
Old news may be found [[Old_news|here]].&lt;br /&gt;
&lt;br /&gt;
== What is CCP4? ==&lt;br /&gt;
[[CCP4]] is a crystallographic program system, and can be downloaded from [http://www.ccp4.ac.uk/download.php]. &lt;br /&gt;
It is free for academic use; the license is at [http://www.ccp4.ac.uk/ccp4license.php].&lt;br /&gt;
Documentation is in the [[ccp4dev:Main_Page|CCP4 developers&#039; wiki]] and at [http://www.ccp4.ac.uk/docs.php], and a mailing list (CCP4BB) is at [http://www.ccp4.ac.uk/ccp4bb.php] that can also be viewed [http://www.mail-archive.com/ccp4bb@jiscmail.ac.uk/ here].&lt;br /&gt;
&lt;br /&gt;
== How to use this wiki ==&lt;br /&gt;
* you may read the existing articles with a web browser (does not require an account).&lt;br /&gt;
* you are invited to contribute to CCP4 wiki, by creating new articles, and by adding information to, or correcting existing articles. To do this, please [[create an account]]. &lt;br /&gt;
&lt;br /&gt;
A number of experienced crystallographers, who are also contributors to CCP4BB, have agreed to take a role as editors. This wiki is under the same [[Copyright]] (termed &amp;quot;GNU Free Documentation License&amp;quot;) as [http://en.wikipedia.org Wikipedia], so any information in it may be transferred to other wikis subject to the [[Copyright]].&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User&#039;s Guide] for information on using the wiki software, and see [[Creating an article]].&lt;br /&gt;
&lt;br /&gt;
== Wiki contents ==&lt;br /&gt;
&lt;br /&gt;
* [[Topics]] - an attempt to list possible items hierarchically&lt;br /&gt;
* [[Special:Allpages|All pages]] - list of all pages of this wiki&lt;br /&gt;
* [[Courses and Conferences]]&lt;br /&gt;
* [[Positions]]&lt;br /&gt;
* articles can also be found using the search box in the left column&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1469</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1469"/>
		<updated>2009-06-21T04:03:11Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Mailing list archives: (no longer) current */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Installation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.mail-archive.com/coot@jiscmail.ac.uk/ Current mailing list archives]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: More key bindings (inspired by the Coot BB)===&lt;br /&gt;
&lt;br /&gt;
For (re-)colouring maps blue:&lt;br /&gt;
&lt;br /&gt;
 # bluefy last map&lt;br /&gt;
 def blue_map_func1():&lt;br /&gt;
    ls = map_molecule_list()&lt;br /&gt;
    ls.reverse()&lt;br /&gt;
    for map_mol in ls:&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify the Latest 2FoFc Map&amp;quot;, &amp;quot;b&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func1())&lt;br /&gt;
&lt;br /&gt;
 # bluefy all 2FoFc maps&lt;br /&gt;
 def blue_map_func2():&lt;br /&gt;
    for map_mol in map_molecule_list():&lt;br /&gt;
        if (not map_is_difference_map(map_mol)):&lt;br /&gt;
            set_map_colour(map_mol, 0.1, 0.5, 0.68)&lt;br /&gt;
            graphics_draw()&lt;br /&gt;
    &lt;br /&gt;
 add_key_binding(&amp;quot;Blueify all 2FoFc Maps&amp;quot;, &amp;quot;B&amp;quot;,&lt;br /&gt;
                 lambda: blue_map_func2())&lt;br /&gt;
&lt;br /&gt;
To (re-)colour coordinate molecules yellow:&lt;br /&gt;
&lt;br /&gt;
 # yellowify last coordinate molecule&lt;br /&gt;
 # Note: this may overwrite the &#039;usual&#039; short-cut of &#039;y&#039; to add a terminal residue&lt;br /&gt;
 def yellow_coords_func1():&lt;br /&gt;
    ls = model_molecule_list()&lt;br /&gt;
    if (len(ls) &amp;gt; 0):&lt;br /&gt;
        set_molecule_bonds_colour_map_rotation(ls[-1], 20)&lt;br /&gt;
        graphics_draw()&lt;br /&gt;
 &lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify last coordinates&amp;quot;, &amp;quot;y&amp;quot;,&lt;br /&gt;
                lambda: yellow_coords_func1())&lt;br /&gt;
&lt;br /&gt;
 # yellowify all coordinate molecules&lt;br /&gt;
 add_key_binding(&amp;quot;Yellowify all coordinates&amp;quot;, &amp;quot;Y&amp;quot;,&lt;br /&gt;
                lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20),&lt;br /&gt;
                             model_molecule_list()),&lt;br /&gt;
                         graphics_draw()))&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
Some additional/advanced(?) rules:&lt;br /&gt;
# #f -&amp;gt; False&lt;br /&gt;
# #t -&amp;gt; True&lt;br /&gt;
# (set! variable value) -&amp;gt; variable=value&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=How can I get involved with Coot development?=&lt;br /&gt;
&lt;br /&gt;
Join the [[Coot Janitors]] project. This is a project to get new people involved in improving Coot, by acting as a clearing house for simple tasks which need doing, and providing documentation for doing them.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
Q: &lt;br /&gt;
I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How do I use &amp;quot;torsion general&amp;quot;?&lt;br /&gt;
&lt;br /&gt;
A: Thanks for pointing out the lack of documentation on this. I&#039;ll make a note to&lt;br /&gt;
add some.&lt;br /&gt;
&lt;br /&gt;
You need to click on the torsion-general icon, then click 4 atoms that describe&lt;br /&gt;
the torsion - the first atom will be the base (non moving) part of the atom&lt;br /&gt;
tree, on clicking the 4th atom a dialog will pop up with a &amp;quot;Reverse&amp;quot; button [1].&lt;br /&gt;
 Move this dialog out of the way and then left mouse click and drag in the main&lt;br /&gt;
window will rotate the moving/&amp;quot;top&amp;quot; part of the residue round the clicked atoms&lt;br /&gt;
2 and 3.  When you are happy, click &amp;quot;Accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Window focus may be an issue - depending on your setting, the window manager may&lt;br /&gt;
eat one of your clicks as you change focus between the dialog and the main&lt;br /&gt;
graphics window (this I find annoying and there are instructions in the FAQ on&lt;br /&gt;
how to turn that off for various systems).&lt;br /&gt;
&lt;br /&gt;
[1] which may not work in 0.6-pre (grumble/sigh/sorry).  If it doesn&#039;t not work,&lt;br /&gt;
the &amp;quot;Reverse&amp;quot; button should invert the moving and &amp;quot;base&amp;quot; part of the residue.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Q: I have some peaks in my map which take water or sodium/magnesium or chlorine atom with out giving out any positive or negative density upon further refinement. Is there any easy way of calculating the peak height / number of electrons at a given position, say a mouse click point in coot? Is there any formula to calculate the number of electrons based on sigma level and peak height, as given in difference map peaks in coot?&lt;br /&gt;
&lt;br /&gt;
A: First, go to the coot wiki and pick up the scheme key bindings. &lt;br /&gt;
&lt;br /&gt;
If you want density information at a given cursor point: point at the blob, press the &#039;g&#039; key (which recentres on the biggest density under the cursor).&lt;br /&gt;
&lt;br /&gt;
using the Scheme scripting window:&lt;br /&gt;
 (apply density-at-point (imol-refinement-map) (rotation-centre))&lt;br /&gt;
There is no user access to the peak integration code of coot as yet.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1456</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1456"/>
		<updated>2009-05-08T23:15:12Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* To make it play nice with python, I have had to do the following: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to [[Coot#Installation_from_a_distributed_binary_tarball_package |download a pre-compiled binary]], or to use [[Coot#Installation_from_source_code_via_autobuild_scripts |the autobuild scripts]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot | Installing Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl -pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
&lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/refmac/data/refmac_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5.2/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5.2/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1287</id>
		<title>Coot</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Coot&amp;diff=1287"/>
		<updated>2009-01-16T17:25:11Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: Fixed typo and added some directions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Coot-with-ATP-vector.png|400px|thumb|right]]&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=Installing Coot=&lt;br /&gt;
==Installing Coot on OS X==&lt;br /&gt;
Please refer to the [http://sage.ucsc.edu/xtal/wiki/index.php/Installing_Coot_on_OS_X Installing Coot on OS X] page&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Windows==&lt;br /&gt;
Please refer to the [http://www.ysbl.york.ac.uk/~lohkamp/coot/wincoot-download.html WinCoot install and download] page.&lt;br /&gt;
&lt;br /&gt;
==Installing Coot on Linux==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
=== Installation from a distributed binary tarball package ===&lt;br /&gt;
This is the recommended way for those who do not want to delve into the mysteries of compiling and linking a great but complex piece of software. Read the (somewhat outdated, it seems) [http://www.ysbl.york.ac.uk/%7Eemsley/coot/coot-faq.html Coot FAQ] to find &amp;quot;Additional Notes&amp;quot; for your operating system.&lt;br /&gt;
&lt;br /&gt;
In short, just go to http://www.ysbl.york.ac.uk/~emsley/software/binaries/nightlies/pre-release/  and pick a suitable binary, e.g.&lt;br /&gt;
coot-0.5-pre-1-revision-1003-binary-Linux-i386-fedora-5.tar.gz for a Red Hat Enterprise Linux 5 or CentOS-5 system (Fedora 6 corresponds to RHEL5, thus Fedora 5 binaries are OK). If you prefer a &amp;quot;stable&amp;quot; binary, these are at http://www.ysbl.york.ac.uk/~emsley/software/binaries/stable/.&lt;br /&gt;
&lt;br /&gt;
Then un-tar it under /usr/local/src (or in your $HOME), and establish a symlink (ln -s) between /usr/local/bin/coot and the bin/coot of the freshly unpacked distribution.&lt;br /&gt;
&lt;br /&gt;
If you then run coot, and the loader complains that a certain library is missing, just ask&lt;br /&gt;
 yum whatprovides &amp;lt;thatlibrary&amp;gt;&lt;br /&gt;
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).&lt;br /&gt;
&lt;br /&gt;
=== Instalation on Debian/Ubuntu from debian archive files ===&lt;br /&gt;
As an alternative, you might wish to exploit the debain dpkg/apt/synaptic package management system on Ubuntu and other Debian linux distributions using (unofficial) &lt;br /&gt;
[http://diablo.ucsc.edu/~wgscott/debian/coot_hardy/  pre-compiled debian packages for coot and its dependencies]. (These will be discontinued when official packages become available.)&lt;br /&gt;
&lt;br /&gt;
To do so, simply download the deb files and install with the command&lt;br /&gt;
&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
dpkg will complain if a dependency is missing rather than install a broken program.&lt;br /&gt;
&lt;br /&gt;
=== Converting to rpm packages ===&lt;br /&gt;
You can convert any debian package file into an rpm file using the program &#039;&#039;alien&#039;&#039;.  I have done this and have made the [http://diablo.ucsc.edu/~wgscott/debian/rpm/coot/ resulting packages] available.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code via autobuild scripts ===&lt;br /&gt;
&lt;br /&gt;
Installation of coot and all of its dependencies are handled automatically through the autobuild scripts. There are two versions:&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it GTK1] - the old user interface. This script builds coot and all its dependencies.&lt;br /&gt;
* [http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple GTK2] - the new user interface. This script builds coot and most of the dependencies, excluding GTK2.&lt;br /&gt;
&lt;br /&gt;
To build Coot, all you should need to do is edit a few settings in the top of the build script, or alternatively specify those settings as environment variables. For example, the following sequence of instructions will build the latest pre-release of the GTK 2 version with python support:&lt;br /&gt;
&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/build-logs/build-it-gtk2-simple&lt;br /&gt;
 &lt;br /&gt;
 export AUTOBUILD_INSTALLED=${HOME}/autobuild/coot&lt;br /&gt;
 export AUTOBUILD_BUILD=${HOME}/autobuild/&lt;br /&gt;
 export LOGS=$AUTOBUILD_BUILD/logs&lt;br /&gt;
 export NIGHTLY_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export STABLE_DEST_DIR=$AUTOBUILD_BUILD&lt;br /&gt;
 export build_coot_prerelease=1&lt;br /&gt;
 &lt;br /&gt;
 bash build-it-gtk2-simple python &amp;gt; build.log&lt;br /&gt;
(This script works in bash. For tcsh, replace &#039;export&#039; with &#039;setenv&#039; and &#039;=&#039; with &#039; &#039;.&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to download additional development packages in order to build all the components.&lt;br /&gt;
&lt;br /&gt;
=== Installation from source code manually ===&lt;br /&gt;
&lt;br /&gt;
There are also instructions for [[Custom building Coot from source code]].&lt;br /&gt;
&lt;br /&gt;
=Running Coot=&lt;br /&gt;
==General Topics==&lt;br /&gt;
[[Image:Coot-screenshot-small.png]]&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
[[Image:Coot-controls-small.png|200px]]&lt;br /&gt;
&lt;br /&gt;
===External Links===&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/doc/user-manual.html On-line User Manual]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/ Coot&#039;s home page]====&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox/ Mailing list archives: (no longer) current]====&lt;br /&gt;
&lt;br /&gt;
====[http://www.ysbl.york.ac.uk/~emsley/coot/mbox-2004-2005/ Mailing list archives: 2004-05]====&lt;br /&gt;
&lt;br /&gt;
==Scheme Scripts==&lt;br /&gt;
&lt;br /&gt;
Coot can be scripted in scheme (guile) or python - support for each is more or less equal these days. &lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
===COOPS===&lt;br /&gt;
Coops generates a coot script from the output of molprobity, specifically probe, reduce, cluster and clashlist.&lt;br /&gt;
&lt;br /&gt;
For an explanation of the principals underlying reduce and clashlist see [http://kinemage.biochem.duke.edu/research/aac.php the Dots Page]. Get Molprobity software [http://kinemage.biochem.duke.edu/software/index.php here].&lt;br /&gt;
&lt;br /&gt;
Use Coot version 0.1 or higher.&lt;br /&gt;
&lt;br /&gt;
Invoke like this (from the directory in which you run coot):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ coops myfile.pdb&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The use Calculate-&amp;gt;Scripting to read in and run coops.scm&lt;br /&gt;
&lt;br /&gt;
Get COOPS [http://www.ysbl.york.ac.uk/~emsley/software/coops/coops-1.0.tar.gz here].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 1: Move to Molecule Centres===&lt;br /&gt;
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 as [[coot-scheme1]].&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 2: Demo a Few of Coot&#039;s Features===&lt;br /&gt;
&lt;br /&gt;
[[ Composite Example Script | Reading in a pdb file, an MTZ file and manipulating the model ]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The data files used in the example can be obtained [http://www.ysbl.york.ac.uk/~emsley/tutorial/rnasa-1.8-all_refmac1.mtz here] and [http://www.ysbl.york.ac.uk/~emsley/tutorial/tutorial-modern.pdb here].  Put them in the directory where you start coot.  Save the script &lt;br /&gt;
to your disk, then use Calculate -&amp;gt; Run Script... to activate it.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 3: Read CNS data===&lt;br /&gt;
This [[ CNS data reading script ]] is a Cootenization of the CN2COOT script written by Joel Bard (it is based on his csh [http://www.ysbl.york.ac.uk/~emsley/coot/cn2coot script]) and can be used to compare and contrast scheme programming &lt;br /&gt;
and shell script programming (the coot version is longer to some extent because it does extra error checking).&lt;br /&gt;
&lt;br /&gt;
As well as doing the conversion the resulting mtz/maps are loaded into Coot.&lt;br /&gt;
&lt;br /&gt;
It is part of Coot as of version 0.1.2.&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 4: Load the Latest Data and PDB files Automatically ===&lt;br /&gt;
&lt;br /&gt;
To load the most recent files, do this:&lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]]&lt;br /&gt;
&lt;br /&gt;
which enables the scripting function: (load-latest-files)&lt;br /&gt;
&lt;br /&gt;
For extra gui goodness (you will need 0.1.2): &lt;br /&gt;
&lt;br /&gt;
 coot --[[script latest-files.scm]] --[[script extensions.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 5: Saving a Partial model ===&lt;br /&gt;
&lt;br /&gt;
Here we create a small function to save part of a molecule and add a &lt;br /&gt;
gui interface, it can be used in the usual way (i.e. with --script on the command line, Calculate-&amp;gt;Run Script... or &lt;br /&gt;
add the script to your ~/.coot file.&lt;br /&gt;
  &lt;br /&gt;
 [[save-partial.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 6: Creating an interface for the Powermate Dial ===&lt;br /&gt;
&lt;br /&gt;
The Powermate dial can be used with coot.  One could just assign the rotations to +/-y keys and be done with it, but this script gives you a way of having positive and negative rotations in all three cartesian directions.  The F1 key is mapped to positive rotation, the F2 key to negative rotation, and the F3 key permits you to toggle through x, y, and z, on successive key presses.  I then map F1 and F2 into the ordinary rotations on the powermate (using send key equivalents) and then I map F3 into the single click on the dial, making it easy to toggle through x, y and z.  The press-and-rotate options remain available; I map these into scroll up and down, and put them on the slowest response setting, which makes contouring density easier to control than it is from my mouse scroll wheel.&lt;br /&gt;
&lt;br /&gt;
 [[powermate-coot.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example Scheme Script 7: Applying arbitrary value to &amp;quot;B&amp;quot; factor column ===&lt;br /&gt;
&lt;br /&gt;
Imagine you have a file of some property (Chemical Shifts, for example) of a residue that you wish to apply to the&lt;br /&gt;
atoms of a particular model from a pdb file as pseudo B factors.  Here&#039;s how to do that in Coot:&lt;br /&gt;
&lt;br /&gt;
We have a file &amp;quot;cs.tab&amp;quot; like this, the residue number then the chemical shift value (one for each residue in a particular chain):&lt;br /&gt;
&lt;br /&gt;
1 1.53159&lt;br /&gt;
&lt;br /&gt;
2 4.35884&lt;br /&gt;
&lt;br /&gt;
3 4.07123&lt;br /&gt;
&lt;br /&gt;
4 4.16932&lt;br /&gt;
&lt;br /&gt;
5 6.69103&lt;br /&gt;
&lt;br /&gt;
6 7.12071&lt;br /&gt;
&lt;br /&gt;
7 10.7419&lt;br /&gt;
&lt;br /&gt;
8 9.57176&lt;br /&gt;
&lt;br /&gt;
Use apply-cs.scm to apply these values as pseudo temperature factors. Typical usage, where &amp;quot;A&amp;quot; is the chain id, and cs.tab the file of values per residue.&lt;br /&gt;
&lt;br /&gt;
(apply-cs (read-pdb &amp;quot;test.pdb&amp;quot;) &amp;quot;A&amp;quot; &amp;quot;cs.tab&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
  --script [[apply-cs.scm]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example Script 8: Partial Occupancy Dialog===&lt;br /&gt;
&lt;br /&gt;
Imagine that you have a structure that has residues with partial occupancy. After refinement, it would be convenient to quickly navigate to all such residues.  How can that be done?&lt;br /&gt;
&lt;br /&gt;
Start coot with command line arguments:&lt;br /&gt;
&lt;br /&gt;
  --script [[partial-occupancy-navigation.scm]]&lt;br /&gt;
&lt;br /&gt;
This will provide an extra menu item called &amp;quot;Extras&amp;quot;, clicking on &amp;quot;Residues with low occupancy...&amp;quot; therein will lead you through the process.&lt;br /&gt;
Note that this will often work with SHELXL molecules, because they have atoms with negative (e.g -31) occupancies.&lt;br /&gt;
&lt;br /&gt;
Note also that you will need a recent version of Coot to use this, as it stands.  This will not work on stock Coot version 0.4.x.  You can enable this for use with 0.4.x if you update/replace your xxx/share/coot/scheme/coot-gui.scm file from [http://coot.googlecode.com/svn/trunk/scheme/coot-gui.scm here].&lt;br /&gt;
&lt;br /&gt;
===Example Script 9: A GUI for Chopping Back Sidechains from a Residue Range===&lt;br /&gt;
&lt;br /&gt;
This is a simple interface to the delete-sidechain-range function, it illustrates how arguments can be transfered&lt;br /&gt;
from the GUI to the scripting function.  It was written in response to a question from Byron DeLaBarre.&lt;br /&gt;
&lt;br /&gt;
Unfortunately (prior to 0.5) there was an error in the standard delete-sidechain-range function, which is why we over-ride it.&lt;br /&gt;
&lt;br /&gt;
  --script [[chop-side-chains-gui.scm]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: How do I bind a key to Toggle the display of NCS ghosts?===&lt;br /&gt;
&lt;br /&gt;
With this script: [[toggle-ncs-ghosts-script]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Paul Emsley&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Paul uses currently (add to your .coot file).&lt;br /&gt;
&lt;br /&gt;
[[pauls-key-bindings-for-coot]]&lt;br /&gt;
&lt;br /&gt;
===Optional Wrappers and (External) Shell Script Enhancements===&lt;br /&gt;
&lt;br /&gt;
I (wgscott) wrote a [http://xanana.ucsc.edu/Library/init/zsh/local-functions/xtal/coot coot] wrapper shell script that lets you convert xplor/cns maps on the fly (you need to install [http://xray.bmc.uu.se/usf mapman] first) and has a few other enhancements.&lt;br /&gt;
&lt;br /&gt;
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 &amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
[http://xanana.ucsc.edu/xtal/osx_xtal_applets.dmg.gz Download the Applet] (requires a separate working coot installation)&lt;br /&gt;
&lt;br /&gt;
==Python Scripts==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Bernhard Lohkamp&#039;s Key Bindings===&lt;br /&gt;
&lt;br /&gt;
Just so you get an idea of the customization by key bindings here are what Bernhard/Paul uses currently (add to your .coot file or put the file in .coot-preferences directory).&lt;br /&gt;
&lt;br /&gt;
[[bernhards_key_bindings_for_coot.py]]&lt;br /&gt;
&lt;br /&gt;
==Python to Scheme and return==&lt;br /&gt;
&lt;br /&gt;
===Translating between Python and Scheme===&lt;br /&gt;
Python scripting is different to (default) scheme scripting which is mainly described in Paul Emsley&#039;s documentation (although it&#039;s mentioned somewhere, fairly hidden). You have to change the commands in the following way:&lt;br /&gt;
&lt;br /&gt;
  GUILE scripting: (guile-command argument1 argument2 ...)&lt;br /&gt;
&lt;br /&gt;
  PYTHON scripting: python_command(argument1, argument2, ...)&lt;br /&gt;
&lt;br /&gt;
====Simple rules for Scheme to Python translations====&lt;br /&gt;
Here some simple rules how to translate from Scheme to Python. To translate the other way around, i.e. Python to Scheme, just turn the rules around:&lt;br /&gt;
&lt;br /&gt;
# replace all &#039;-&#039; with &#039;_&#039; (except in equation when you need arithmetic &#039;-&#039; minus signs)&lt;br /&gt;
# move the brackets around the argument(s)&lt;br /&gt;
# separate multiple arguments by commas rather than spaces&lt;br /&gt;
# replace &#039;define&#039; for functions with &#039;def&#039; and for assignments with an &#039;=&#039;&lt;br /&gt;
# Make sure to use indentation for the function content [Python is indentation sensitive] and a &#039;:&#039; after the function definition.&lt;br /&gt;
&lt;br /&gt;
====A simple example====&lt;br /&gt;
&lt;br /&gt;
In Scheme we may have the following script:&lt;br /&gt;
&lt;br /&gt;
 (define mol2-pdbFile &amp;quot;somePDBfile.pdb&amp;quot; )&lt;br /&gt;
 (define mol2-model (read-pdb mol2-pdbFile))&lt;br /&gt;
 (define (read-mol-again)&lt;br /&gt;
         (clear-and-update-model-molecule-from-file mol2-model mol2-pdbFile))&lt;br /&gt;
 (read-mol-again)&lt;br /&gt;
&lt;br /&gt;
Which will translate into Python:&lt;br /&gt;
&lt;br /&gt;
  mol2_pdbFile = &amp;quot;somePDBfile.pdb&amp;quot;&lt;br /&gt;
  mol2_model = read_pdb(mol2_pdbFile)&lt;br /&gt;
  def read_mol_again():&lt;br /&gt;
      clear_and_update_model_molecule_from_file(mol2_model, mol2_pdbFile)&lt;br /&gt;
  read_mol_again()&lt;br /&gt;
&lt;br /&gt;
===Running a Scheme/Python command from Python/Scheme===&lt;br /&gt;
&lt;br /&gt;
As of Coot 0.5 (and if you have both scripting languages available) you an use the following commands to run a script or command in the other language:&lt;br /&gt;
&lt;br /&gt;
  (run-python-command &amp;quot;python_command(arg1, arg2, ...)&amp;quot;)    [from guile/scheme]&lt;br /&gt;
&lt;br /&gt;
  run_scheme_command(&amp;quot;(scheme-command arg1 arg2 ...)&amp;quot;)      [from python]&lt;br /&gt;
&lt;br /&gt;
=Enhanced Menu Appearance=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==As of 0.4, coot works with gtk+2==&lt;br /&gt;
&lt;br /&gt;
This permits use of themes for a more OSX-like experience, among other things.&lt;br /&gt;
&lt;br /&gt;
Click on the thumbnail image below to see a full-size screenshot of Coot with a gtk+2 Aqua-like theme.&lt;br /&gt;
&lt;br /&gt;
[[Image:Thumb-coot-gtk2.png]]&lt;br /&gt;
&lt;br /&gt;
To get this effect, you need the Glossy_P gtk+2 theme:&lt;br /&gt;
&lt;br /&gt;
http://art.gnome.org/download/themes/gtk2/571/GTK2-Glossy_P.tar.gz&lt;br /&gt;
&lt;br /&gt;
Edit a file called ~/.gtkrc-2.0 and put into it the following line:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;/usr/share/themes/Glossy\ P/gtk-2.0/gtkrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Alternatively, if you use gnome or xfce4, you can open the theme manager and just make it open the downloaded Glossy_P tarball, and it should add this as a theme.&lt;br /&gt;
&lt;br /&gt;
=Assorted questions and answers (from the mailinglist)=&lt;br /&gt;
&lt;br /&gt;
Q: &lt;br /&gt;
I am sure this exists somewhere through scripting in COOT, but can I apply NCS edits to only a subset of NCS copies? In  other words, can I tell coot which are NCS related chains, and which aren&#039;t.  I am working on this nightmarish case of asymmetrical homodimers, where the sequences are very similar, but the structures are not, so I need to tell coot which chains are actually related to each other.&lt;br /&gt;
&lt;br /&gt;
A: Nightmare. If you have a recent [1632 or later for the scheme version, 1646 for the python version] Coot, you can do this:&lt;br /&gt;
&lt;br /&gt;
(manual-ncs-ghosts imol resno-start resno-end chain-id-list)&lt;br /&gt;
&lt;br /&gt;
where &lt;br /&gt;
* imol is 0 (say)&lt;br /&gt;
* resno-start and resno-end is the residue range for the LSQ fitting to return the NCS matrix,&lt;br /&gt;
* chain-id-list is the list of chain-ids, starting with the master/reference chain-id and followed by the peer chain-ids that are NCS related, e.g. (list &amp;quot;A&amp;quot; &amp;quot;B&amp;quot; &amp;quot;D&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The python interface is similar.&lt;br /&gt;
&lt;br /&gt;
There is also a GUI to activate this feature under Extensions -&amp;gt; NCS.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Description of problematic situation: I am using [[SHELXL]] to refine my 1.2 Å data and I am refining the hydrogen atoms. Subsequent rebuilding in coot is difficult though since hydrogens often does not &amp;quot;follow&amp;quot; when you do side chain rebuilding. For the moment I have quit transfering hydrogens to coot and add the hydrogens every refinement cycle, though it would be good I think if I could see them in coot without bothering about wrong positions. So these are my specific questions:&lt;br /&gt;
&lt;br /&gt;
Specific Q1: Using &amp;quot;edit chi angles&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: This fails because for chi angles Coot uses the Refmac dictionary to know what is connected to what (if it can).  The work-around is to rename the refmac dictionary so Coot can&#039;t find it - which will force Coot to find bond by distance criteria.&lt;br /&gt;
&lt;br /&gt;
Specific Q2: Using &amp;quot;real space refine&amp;quot; does not work properly.&lt;br /&gt;
&lt;br /&gt;
A: Yes this fails.  Hydrogens are named differently to SHELX hydrogens.  In principal this could be made to work if the dictionary was reworked to use SHELX hydrogen names.  This would also fix the chi angles problem too of course.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: improvement of image quality on machines with NVidia cards?&lt;br /&gt;
&lt;br /&gt;
A: After talking about antialiasing with Stuart McNicholas, I discovered a program called nvidia-settings. I found that if I do:&lt;br /&gt;
 Antialiasing Settings -&amp;gt; Override Application Setting, and set the slider to 16x&lt;br /&gt;
then I start Coot, I see that it starts up in nice antialiasing mode (which is a lot better that the poor mode that Coot has built-in).&lt;br /&gt;
I don&#039;t know if this works on other/newer systems, but it works for me on my oldish GeForce 6600. (Of course the FPS takes a hit.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Q: How to set the default to display symmetry related molecules?&lt;br /&gt;
&lt;br /&gt;
A: Add (set-show-symmetry-master 1) to the appropriate file. &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Q: I still have a &amp;quot;.coot&amp;quot; file in my home folder for a few coot preferences that I couldn&#039;t find in the new &amp;quot;.coot-preferences/coot-preferences.scm&amp;quot;. There is a warning that I should not add commands to this file. So is a &amp;quot;~/.coot&amp;quot; still the proper place to add default commands for coot? &lt;br /&gt;
&lt;br /&gt;
A: Coot does not create a ~/.coot file for you, but will read it if it exists.  Likewise, ~/.coot.py in which you can write python commands.~/.coot-preferences is a directory in which all .scm files and .py files are executed.  coot-preferences.scm and coot_preferences.py there are generated by using the Edit -&amp;gt; Preferences dialog (and thus it overwrites older versions - hence the warning).&lt;br /&gt;
&lt;br /&gt;
If you want to create a script that will be read by everyone then put those files into a directory defined by environment variable $COOT_SCHEME_EXTRAS_DIR (for *.scm) or $COOT_PYTHON_EXTRAS_DIR (*.py). All *.scm in $COOT_SCHEME_EXTRAS_DIR and *.py files in $COOT_PYTHON_EXTRAS_DIR will be executed at start up.&lt;br /&gt;
&lt;br /&gt;
So you have a variety of places. Personally I mostly use ~/.coot. &lt;br /&gt;
----&lt;br /&gt;
It should be noted that the answers (&amp;quot;A&amp;quot;) are from Paul Emsley himself (and were maybe slightly edited).&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1275</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1275"/>
		<updated>2008-12-22T19:19:29Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Now add the refmac dictionaries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to [[Coot#Installation_from_a_distributed_binary_tarball_package |download a pre-compiled binary]], or to use [[Coot#Installation_from_source_code_via_autobuild_scripts |the autobuild scripts]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot | Installing Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
 &lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/refmac/data/refmac_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5.2/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5.2/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1206</id>
		<title>List of coot dependencies</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1206"/>
		<updated>2008-11-17T16:24:17Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is current as of 0.5-2:&lt;br /&gt;
&lt;br /&gt;
I generated this list with the following unix command:&lt;br /&gt;
&lt;br /&gt;
 dpkg -S $(  ldd /usr/local/xtal/coot/bin/coot-real | awk &#039;{print $3}&#039; | sort -u | grep -v \(  )| cut -f 1 -d &amp;quot;:&amp;quot; | sort -u | perl -pi -e &#039;s|\n|\, |g&#039; &amp;gt;| dependencies.txt   &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Depends: clipper, freeglut3, gpp4, guile-1.8-libs, guile18-gtk, libart-2.0-2, libatk1.0-0, libc6-i686, libcairo2, libexpat1, libfontconfig1, libfreetype6, libgail18, libgcc1, libgl1-mesa-glx, nvidia-glx-new, libglade2-0, libglib2.0-0, libglu1-mesa, libgmp3c2, libgnomecanvas2-0, libgsl0ldbl, libgtk2.0-0, libgtkglext1, libice6, libltdl3, libpango1.0-0, libpcre3, libpixman-1-0, libpng12-0, libsm6, libstdc++6, libx11-6, libxau6, libxcb-xlib0, libxcb1, libxcomposite1, libxcursor1, libxdamage1, libxdmcp6, libxext6, libxfixes3, libxi6, libxinerama1, libxml2, libxmu6, libxrandr2, libxrender1, libxt6, mmdb, nvidia-glx-new, python2.5, ssm, zlib1g&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1205</id>
		<title>List of coot dependencies</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1205"/>
		<updated>2008-11-17T16:23:59Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is current as of 0.5-2:&lt;br /&gt;
&lt;br /&gt;
I generated this list with the following unix command:&lt;br /&gt;
&lt;br /&gt;
dpkg -S $(  ldd /usr/local/xtal/coot/bin/coot-real | awk &#039;{print $3}&#039; | sort -u | grep -v \(  )| cut -f 1 -d &amp;quot;:&amp;quot; | sort -u | perl -pi -e &#039;s|\n|\, |g&#039; &amp;gt;| dependencies.txt   &lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Depends: clipper, freeglut3, gpp4, guile-1.8-libs, guile18-gtk, libart-2.0-2, libatk1.0-0, libc6-i686, libcairo2, libexpat1, libfontconfig1, libfreetype6, libgail18, libgcc1, libgl1-mesa-glx, nvidia-glx-new, libglade2-0, libglib2.0-0, libglu1-mesa, libgmp3c2, libgnomecanvas2-0, libgsl0ldbl, libgtk2.0-0, libgtkglext1, libice6, libltdl3, libpango1.0-0, libpcre3, libpixman-1-0, libpng12-0, libsm6, libstdc++6, libx11-6, libxau6, libxcb-xlib0, libxcb1, libxcomposite1, libxcursor1, libxdamage1, libxdmcp6, libxext6, libxfixes3, libxi6, libxinerama1, libxml2, libxmu6, libxrandr2, libxrender1, libxt6, mmdb, nvidia-glx-new, python2.5, ssm, zlib1g&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1204</id>
		<title>List of coot dependencies</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1204"/>
		<updated>2008-11-17T02:26:52Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: updated dependency list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is current as of 0.5:&lt;br /&gt;
&lt;br /&gt;
clipper&lt;br /&gt;
freeglut3&lt;br /&gt;
freeglut3-dbg&lt;br /&gt;
gpp4&lt;br /&gt;
guile-1.8-libs&lt;br /&gt;
guile18-gtk&lt;br /&gt;
libart-2.0-2&lt;br /&gt;
libatk1.0-0&lt;br /&gt;
libc6&lt;br /&gt;
libc6-i686&lt;br /&gt;
libcairo2&lt;br /&gt;
libexpat1&lt;br /&gt;
libfontconfig1&lt;br /&gt;
libfreetype6&lt;br /&gt;
libgail18&lt;br /&gt;
libgcc1&lt;br /&gt;
libgl1-mesa-glx&lt;br /&gt;
libgl1-mesa-glx-dbg&lt;br /&gt;
libglade2-0&lt;br /&gt;
libglib2.0-0&lt;br /&gt;
libglu1-mesa&lt;br /&gt;
libgmp3c2&lt;br /&gt;
libgnomecanvas2-0&lt;br /&gt;
libgsl0ldbl&lt;br /&gt;
libgtk2.0-0&lt;br /&gt;
libgtkglext1&lt;br /&gt;
libice6&lt;br /&gt;
libltdl3&lt;br /&gt;
libpango1.0-0&lt;br /&gt;
libpcre3&lt;br /&gt;
libpixman-1-0&lt;br /&gt;
libpng12-0&lt;br /&gt;
libsm6&lt;br /&gt;
libstdc++6&lt;br /&gt;
libx11-6&lt;br /&gt;
libxau6&lt;br /&gt;
libxcb-xlib0&lt;br /&gt;
libxcb1&lt;br /&gt;
libxcomposite1&lt;br /&gt;
libxcursor1&lt;br /&gt;
libxdamage1&lt;br /&gt;
libxdmcp6&lt;br /&gt;
libxext6&lt;br /&gt;
libxfixes3&lt;br /&gt;
libxi6&lt;br /&gt;
libxinerama1&lt;br /&gt;
libxml2&lt;br /&gt;
libxmu6&lt;br /&gt;
libxrandr2&lt;br /&gt;
libxrender1&lt;br /&gt;
libxt6&lt;br /&gt;
mmdb&lt;br /&gt;
nvidia-glx-new&lt;br /&gt;
nxnode&lt;br /&gt;
python2.5&lt;br /&gt;
python2.5-dbg&lt;br /&gt;
ssm&lt;br /&gt;
zlib1g&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1203</id>
		<title>List of coot dependencies</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=List_of_coot_dependencies&amp;diff=1203"/>
		<updated>2008-11-17T02:25:41Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: updated dependency list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is current as of 0.5:&lt;br /&gt;
&lt;br /&gt;
 clipper, freeglut3, freeglut3-dbg, gpp4, guile-1.8-libs, guile18-gtk, libart-2.0-2, libatk1.0-0, libc6, libc6-i686, libcairo2, libexpat1, libfontconfig1, libfreetype6, libgail18, libgcc1, libgl1-mesa-glx, libgl1-mesa-glx-dbg, libglade2-0, libglib2.0-0, libglu1-mesa, libgmp3c2, libgnomecanvas2-0, libgsl0ldbl, libgtk2.0-0, libgtkglext1, libice6, libltdl3, libpango1.0-0, libpcre3, libpixman-1-0, libpng12-0, libsm6, libstdc++6, libx11-6, libxau6, libxcb-xlib0, libxcb1, libxcomposite1, libxcursor1, libxdamage1, libxdmcp6, libxext6, libxfixes3, libxi6, libxinerama1, libxml2, libxmu6, libxrandr2, libxrender1, libxt6, mmdb, nvidia-glx-new, nxnode, python2.5, python2.5-dbg, ssm, zlib1g&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1202</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1202"/>
		<updated>2008-11-16T19:57:18Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: added link Coot#Installation_from_a_distributed_binary_tarball_package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to [[Coot#Installation_from_a_distributed_binary_tarball_package |download a pre-compiled binary]], or to use [[Coot#Installation_from_source_code_via_autobuild_scripts |the autobuild scripts]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot | Installing Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
 &lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac5.4_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1201</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1201"/>
		<updated>2008-11-16T19:56:02Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: better link to autobuild scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to download a pre-compiled binary, or to use [[Coot#Installation_from_source_code_via_autobuild_scripts |the autobuild scripts]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot | Installing Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
 &lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac5.4_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1200</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1200"/>
		<updated>2008-11-16T19:53:27Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Avoiding manual installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to download a pre-compiled binary, or to use the autobuild scripts:&#039;&#039;&#039; [[Coot]].&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot | Installing Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
 &lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac5.4_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1199</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1199"/>
		<updated>2008-11-16T19:52:17Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to download a pre-compiled binary, or to use the autobuild scripts:&#039;&#039;&#039; [[Coot]].&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
 &lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac5.4_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
	<entry>
		<id>https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1198</id>
		<title>Custom building Coot from source code</title>
		<link rel="alternate" type="text/html" href="https://wiki.uni-konstanz.de/ccp4/index.php?title=Custom_building_Coot_from_source_code&amp;diff=1198"/>
		<updated>2008-11-16T19:51:37Z</updated>

		<summary type="html">&lt;p&gt;Wgscott: /* Debian packages for Coot and its Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Return to [[coot]]&lt;br /&gt;
&lt;br /&gt;
These instructions are current as of coot release 0.5.&lt;br /&gt;
&lt;br /&gt;
The following is specific to Ubuntu linux, but should be generalizable to any recent linux distribution.&lt;br /&gt;
&lt;br /&gt;
This is a so-called &amp;quot;advanced&amp;quot; task. Don&#039;t attempt it unless you would rather compile your own software than use pre-compiled versions. The standard (supported) method for installing Coot is to download a pre-compiled binary, or to use the autobuild scripts: [[Coot]].&lt;br /&gt;
&lt;br /&gt;
==Installing pre-compiled Coot binaries==&lt;br /&gt;
&lt;br /&gt;
===Avoiding manual installation===&lt;br /&gt;
&lt;br /&gt;
This page describes full manual installation, for those who want (or need) to do it.  It is not necessary on most systems. For autobuild and for installation of precompiled Coot binaries, see [[Coot#Installing_Coot]]&lt;br /&gt;
&lt;br /&gt;
===Debian packages for Coot and its Dependencies===&lt;br /&gt;
&lt;br /&gt;
Please be aware that everything compiled below has been archived as [[Coot#Instalation_on_Debian.2FUbuntu_from_debian_archive_files | Debian archive files]] that you can easily install.&lt;br /&gt;
&lt;br /&gt;
==Install gpp4 and other dependencies on Linux.==&lt;br /&gt;
&lt;br /&gt;
Instead of using ccp4-onlylibs-dev, we want to use ssm, mmdb, gpp4 and clipper packages.     &lt;br /&gt;
&lt;br /&gt;
To keep things tidy, I suggest installing everything into /usr/local/xtal     &lt;br /&gt;
&lt;br /&gt;
Install these in the order described:&lt;br /&gt;
&lt;br /&gt;
===mmdb===&lt;br /&gt;
 wget http://www.ebi.ac.uk/~keb/cldoc/downloads/mmdb-1.19.tar.gz&lt;br /&gt;
 ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===ssm===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/ssm-0.1.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===gpp4===&lt;br /&gt;
 wget ftp://ftp.bioxray.au.dk/pub/mok/src/gpp4-1.0.4.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===fftw===&lt;br /&gt;
We need to compile fftw in a way that differs from that used to make the standard linux distribution of fftw. So to do that, we will install our own in /usr/local/xtal/lib, so it will remain hidden from the rest of the system, unless directed to look for it there.&lt;br /&gt;
 ftp://ftp.fftw.org/pub/fftw/old/fftw-2.1.5.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include --enable-float&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
===clipper===&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~cowtan/clipper/clipper20ac.latest.tar.gz&lt;br /&gt;
 CPPFLAGS=-I/usr/local/xtal/include ./configure --prefix=/usr/local/xtal --includedir=/usr/local/xtal/include -enable-shared --with-gpp4=/usr/local/xtal --with-mmdb=/usr/local/xtal --with-fftw=/usr/local/xtal --enable-mmdb --enable-minimol --enable-cif --enable-cns --enable-gpp4&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that if the primary server for the source code is down, you can often find what you need mirrored elsewhere, eg:&lt;br /&gt;
&lt;br /&gt;
http://distfiles.msn.wi.us.finkmirrors.net/mirrors/fink/distfiles&lt;br /&gt;
&lt;br /&gt;
==Make sure the other needed dependencies are installed==&lt;br /&gt;
&lt;br /&gt;
These include at least the following dependencies:&lt;br /&gt;
&lt;br /&gt;
===Ubuntu packages===&lt;br /&gt;
&lt;br /&gt;
A [[list of coot dependencies]] that is probably only a subset&lt;br /&gt;
&lt;br /&gt;
===Others that you have to make yourself: ===&lt;br /&gt;
[http://download.gna.org/guile-lib guile-lib] (I had to compile this myself as described below)&lt;br /&gt;
&lt;br /&gt;
[http://arglist.com/guile/goosh-1.3/ goosh] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ossau.uklinux.net/guile/ guile-gui]  (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.gnu.org/software/guile-gtk/ guile-gtk-2.0] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
[http://www.ysbl.york.ac.uk/~emsley/software/extras/net-http-0.3.1.tar.gz net-htttp] (I had to compile this myself)&lt;br /&gt;
&lt;br /&gt;
To compile these, use the commands&lt;br /&gt;
&lt;br /&gt;
 configure --prefix=/usr&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
This puts stuff into /usr, rather than /usr/local or /usr/local/xtal, which you might not want to do.  The aim is to eventually get these into the standard system distribution, in which case they will reside in /usr with the other guile extensions. All of these should work with guile-1.8.&lt;br /&gt;
&lt;br /&gt;
==Configuring and building coot ==&lt;br /&gt;
&lt;br /&gt;
===Start a root shell session===&lt;br /&gt;
&lt;br /&gt;
If root is enabled, log into a root shell, or else if you have sudo (debian, ubuntu, etc), use the command&lt;br /&gt;
&lt;br /&gt;
 sudo zsh &lt;br /&gt;
&lt;br /&gt;
(or whatever shell) to open a root shell, and issue the following commands as indicated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Fix a configure bug===&lt;br /&gt;
&lt;br /&gt;
First, issue the following command to fix a configure bug when compiling with gpp4:&lt;br /&gt;
&lt;br /&gt;
 perl -pi -e &#039;s|lccp4c|lgpp4|g&#039; configure &lt;br /&gt;
&lt;br /&gt;
===Now configure this way: ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PATH=&amp;quot;/usr/local/xtal/bin:$PATH&amp;quot; \&lt;br /&gt;
CPPFLAGS=&amp;quot;-I/usr/local/xtal/include -I/usr/local/xtal/include/clipper -I/usr/local/xtal/include/gpp4 -I/usr/local/xtal/include/mmdb -I/usr/local/xtal/include/ssm&amp;quot; \&lt;br /&gt;
./configure --prefix=$PWD \&lt;br /&gt;
--with-gpp4=/usr/local/xtal \&lt;br /&gt;
--with-mmdb-prefix=/usr/local/xtal \&lt;br /&gt;
--with-ssmlib-prefix=/usr/local/xtal \&lt;br /&gt;
--with-clipper-prefix=/usr/local/xtal \&lt;br /&gt;
--with-fftw=/usr/local/xtal \&lt;br /&gt;
--with-glut-prefix=/usr --with-gl-prefix=/usr/X11R6 \&lt;br /&gt;
--with-gtk2 --with-gnomecanvas-prefix=/usr \&lt;br /&gt;
--with-imlib-prefix=/usr --with-gtkgl-prefix=/usr \&lt;br /&gt;
--with-glib-prefix=/usr --with-guile-gtk \&lt;br /&gt;
--with-guile-gtk-prefix=/usr --with-gsl-prefix=/usr \&lt;br /&gt;
--with-guile --with-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Then, remake the  src/coot_wrap_python.cc and src/coot_wrap_guile.cc files: ===&lt;br /&gt;
&lt;br /&gt;
 /bin/rm -f **/coot_wrap_**.cc&lt;br /&gt;
 cd src&lt;br /&gt;
 touch c-interface-database.hh&lt;br /&gt;
 make coot_wrap_guile.cc&lt;br /&gt;
 make coot_wrap_python.cc&lt;br /&gt;
 cp coot_wrap_guile_pre.cc coot_wrap_guile.cc&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
===Now compile coot:===&lt;br /&gt;
 make &lt;br /&gt;
 make -i install&lt;br /&gt;
&lt;br /&gt;
===To make it play nice with python, I have had to do the following: ===&lt;br /&gt;
 perl pi -e &#039;s|PYTHONHOME=\$COOT_PREFIX|\#PYTHONHOME=\$COOT_PREFIX|g&#039; bin/coot&lt;br /&gt;
 cp src/coot.py python/.&lt;br /&gt;
 cp src/coot.py share/coot/python/.&lt;br /&gt;
 &lt;br /&gt;
===Now add the reference structures: ===&lt;br /&gt;
 cd share/coot&lt;br /&gt;
 wget http://www.ysbl.york.ac.uk/~emsley/software/coot-reference-structures.tar.gz&lt;br /&gt;
 tar xvfz coot-reference-structures.tar.gz ; rm coot-reference-structures.tar.gz&lt;br /&gt;
&lt;br /&gt;
=== Now add the refmac dictionaries===&lt;br /&gt;
(eg using coot-0.5 and refmac 5.4; change as required):&lt;br /&gt;
&lt;br /&gt;
 cd /tmp&lt;br /&gt;
 wget  wget http://www.ysbl.york.ac.uk/refmac/data/refmac5.4_dictionary.tar.gz&lt;br /&gt;
 tar xvfz refmac5.4_dictionary.tar.gz&lt;br /&gt;
 mkdir -p  /usr/local/xtal/coot-0.5/lib/data&lt;br /&gt;
 cp -r dic /usr/local/xtal/coot-0.5/lib/data/monomers&lt;br /&gt;
&lt;br /&gt;
===Export the COOT_REFMAC_LIB_DIR variable ===&lt;br /&gt;
(you can edit bin/coot): &lt;br /&gt;
  export COOT_REFMAC_LIB_DIR=$COOT_PREFIX/lib&lt;br /&gt;
&lt;br /&gt;
===Notes on the above: ===&lt;br /&gt;
The configure command is all one line; I&#039;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).&lt;br /&gt;
&lt;br /&gt;
The&#039;&#039;&#039; make -i install&#039;&#039;&#039; is needed if you choose --prefix=$PWD because it tries to install some files where they are presently situated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==If you want to make it more portable==&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to do this to run coot; this is only handy if you need to redistribute it (or make say a debian package).&lt;br /&gt;
&lt;br /&gt;
You can see what dynamic libraries coot needs to load by issuing the command&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real &lt;br /&gt;
&lt;br /&gt;
or, if you just want to see the full path to the libraries, issue&lt;br /&gt;
&lt;br /&gt;
 ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | sort -u&lt;br /&gt;
&lt;br /&gt;
You can use additional grep filters to select the ccp4 libs, clipper libs, eliminate coot&#039;s own libaries (that are already in the lib directory) and so forth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(The &#039;&#039;&#039;ldd&#039;&#039;&#039; command is equivalent to &#039;&#039;&#039;otool -L&#039;&#039;&#039; on Mac OS X.)  Then you can copy these into coot&#039;s lib directory. I used the following commands in zsh to copy in the needed directories (this is overkill, but wtf).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 cd /usr/local/xtal/coot/bin&lt;br /&gt;
 foreach dylib in $(ldd coot-real | awk &#039;{print $3}&#039; | grep -v fff | grep -v &amp;quot;usr/local/xtal/coot&amp;quot; | sort -u )&lt;br /&gt;
      print copying $dylib &lt;br /&gt;
      sudo cp -i $dylib /usr/local/xtal/coot/lib/.&lt;br /&gt;
 end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, the guile modules can all be put in one centralized location:&lt;br /&gt;
&lt;br /&gt;
 cp -R /usr/share/guile* /usr/local/xtal/coot/share/.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to [[coot]]&lt;/div&gt;</summary>
		<author><name>Wgscott</name></author>
	</entry>
</feed>