Cookies help us deliver our services. By using our services, you agree to our use of cookies. More information


From CCP4 wiki


14,648 bytes added, 07:14, 10 September 2019
no edit summary
Coot is a graphics program for building, refining and analysing macromolecular models obtained with crystallographic procedures.
There is a [ homepage] with extensive [ / documentation]. The program may be downloaded for Linux, Mac and Windows computers from the [ primary server] (as of July 10, 2009 there's a new site at http:/Personal/ or, if that is not available, from an [ftp:binaries//turn5.biologie.unipre-konstanz.derelease/coot external mirrorprimary server]. The license of Coot is GNU GPL.
=Installing Coot=
==Installing Coot on OS X==
OS X install packages for nightly builds that work on 10.8.X and 10.9.X are available here: [ Coot OS X package installers]
Please refer to the [ Installing Coot on OS X] page
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) [ Coot FAQ] to find "Additional Notes" for your operating system.
In short, just go to (a mirror is at ) and pick a suitable binary, e.g.
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 "stable" binary, these are at
and install the library, again using yum (assuming yum is available in your distribution, otherwise use apt or whatever is there for this purpose).
=== Installation = Example: installing a 64bit nightly CentOS5 binary build on Debian/Ubuntu from debian archive files 64bit SL6.1 ====First of all, SL (Scientific Linux) is a derivative of RHEL, as is CentOS. So all three OSs behave exactly the same.The binaries with "x86_64" binaries are for 64bit systems; the "i386" binaries are for 32bit systems. Since my notebook is 64bits ("uname -a" reports "x86_64" more than once), I download coot-0.7-pre-1-revision-3999-binary-Linux-x86_64-centos-5-python-gtk2.tar.gz. As an alternativeroot, you might wish to exploit the debain dpkgI "cd /usr/aptlocal/synaptic package management system on Ubuntu src" and other Debian linux distributions using un-tar. Next, have to find out which libraries are missing. This can be achieved by (unofficial''note the use of LD_LIBRARY_PATH in the second command - do not permanently modify LD_LIBRARY_PATH !'') : [http:root@localhost]# cd coot-Linux-x86_64-centos-5-gtk2-python [root@localhost]# LD_LIBRARY_PATH=lib ldd bin//diablocoot-real | grep found => not found => not found 6 => not found pre-compiled debian packages for coot and its dependencies] (These will 6 => not found So only two libraries are missing! Either they can be discontinued when official packages become installed using yum, or they are already available, but have a higher version.* First possibility: find out about installable RPM packages (preferred way):
To do [root@localhost src]# yum provides Loaded plugins: refresh-packagekit openssl098e-0.9.8e-17.el6.i686 : A compatibility version of a general : cryptography and TLS library Repo : sl Matched from: Other : ... (the package is repeated, simply download and is also mentioned): Now don't just install the deb files openssl098e-0.9.8e-17.el6.i686 and install its dependencies - it is a 32bit library (the name ends with ".i686")! Installing it does not solve the problem - we need a 64bit library. Unfortunately "yum provides" does not tell us about the command64bit library (is that a yum bug?). By specifying just the package name (openssl098e.x86_64 would also work, and would avoid any 32bit package) yum install openssl098e: we install both and in their 64bit versions - done!
* Second possibility: find out if the system already has a higher version of the two libraries: [root@localhost locate /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ sudo dpkg -i */usr/lib64/
dpkg will complain : So the answer is: there is /usr/lib64/ which is at version 10, which is compatible with the version we need (6). For the same is true. So just cd coot-Linux-x86_64-centos-5-gtk2-python/lib/ ln -s /usr/lib64/ ln -s /usr/lib64/ The way these symlinks are made they would even work if a dependency is missing rather than install a broken programRHEL upgrades libssl or libcrypto to higher versions. Works for me.
=== Converting Final step (this does not need to rpm packages ===be repeated for a new coot version): create /usr/local/bin/coot with #!/bin/csh -f setenv LANG CYou can convert any debian package file into an rpm file using the program ''alien''. I have done this and have made the [http:exec /usr/diablo.ucsc.edulocal/~wgscottsrc/debiancoot-Linux-x86_64-centos-5-gtk2-python/rpmbin/coot$*and make it executable with chmod a+x /usr/local/ resulting packages] available.bin/coot
=== Installation from source code via autobuild scripts ===
==== Side-by-Side ====
Either cross-eyed or wall-eyed split-screen stereo mode can be invoked using the "Stereo" menu item under "Draw", as is shown in the image below:
==== Hardware Stereo ====
Similarly, hardware stereo can be invoked (assuming you have the CRT, correct graphics card, emitter, etc) using the same menu item, by selecting "Hardware Stereo".
[[Image:a_zalman_zm_m220w__2d_35_pic.jpg|150px|thumb|right|3d lcd]]
==== Zalman Stereo ====
The first viable LCD monitor for stereographics display is made by Zalman and costs about $300: [ Zalman ZM-M220W]
The attributes for this monitor have been tested and [ described rather extensively by Warren DeLano] on the PyMOL site. Please read it for important details and suggested purchasing sources.
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.
Note that the stereo effect is very sensitive to the vertical position of your eyes relative to the screen: if you don't see stereo, try tilting the screen.
=== Stereo: left/right (and front/back) interchanged? ===
Establish an additional toolbutton "swap stereo":
Main Toolbar -> right mouse click-> Manage buttons-> select Swap Stereo
Or for the script minded:
This will toggle the stereo images left and right.
===External Links===
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.
[[ powermate-coot.scm]]
===Example Scheme Script 7: Applying arbitrary value to "B" factor column ===
For (re-)colouring maps blue:
# bluefy last map def blue_map_func1(): ls = map_molecule_list() ls[[blueify_map_keys.reverse() for map_mol in ls: if (not map_is_difference_map(map_mol)): set_map_colour(map_mol, 0.1, 0.5, 0.68) graphics_draw() break add_key_binding("Blueify the Latest 2FoFc Map", "b", lambda: blue_map_func1())py]]
# bluefy all 2FoFc maps def blue_map_func2To (re-)colour coordinate molecules yellow: for map_mol in map_molecule_list(): if (not map_is_difference_map(map_mol)): set_map_colour(map_mol, 0.1, 0.5, 0.68) graphics_draw() add_key_binding("Blueify all 2FoFc Maps", "B", lambda: blue_map_func2())
[[]] ===Example 3: NCS Rotamer differences=== To show NCS where NCS-related side-chains have different rotamers: [[]] ===Example 4: Morphing GUI=== GUI to easily access jiggle fit and morphing (recurrently pre-release Coot required, may be moved into trunk)colour coordinate molecules yellow[[]] ===Example 5: Ensemble GUI===
# yellowify last coordinate molecule # Note: this may overwrite the 'usual' short-cut of 'y' GUI to add a terminal residue def yellow_coords_func1(): ls = model_molecule_list() if (len(ls) > 0): set_molecule_bonds_colour_map_rotation(ls[-1], 20) graphics_draw() add_key_binding("Yellowify last coordinates", "y", lambdaallow navigation through structural ensembles as obtained e.g. from ensemble refinement: yellow_coords_func1())
# yellowify all coordinate molecules add_key_binding("Yellowify all coordinates", "Y", lambda: (map(lambda imol: set_molecule_bonds_colour_map_rotation(imol, 20), model_molecule_list()), graphics_draw()))[[]]
==Python to Scheme and return==
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:
# replace Replace all '-' with '_' (except in equation when you need arithmetic '-' minus signs)# move Move the brackets around the argument(s)# separate Separate multiple arguments by commas rather than spaces# replace Replace 'define' for functions with 'def' for functions and for assignments with an '='for assignments
# Make sure to use indentation for the function content [Python is indentation sensitive] and a ':' after the function definition.
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.
=Assorted questions and answers (from the mailinglist)= It should be noted that the answers ("A") are from Paul Emsley himself (and were maybe slightly edited). ==Coot development== Q: How can I get involved with Coot development?= 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. 
Join == Get rid of the [[Coot Janitors]] project. This "fix nomenclature" check ==Q: Is it possible to deactivate the nomenclature errors check? Sometimes this check is a project not very useful and it becomes rather annoying when one has several molecules loaded only wants 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 themlook at the structures...
=Assorted questions and answers A: Add to your ~/.coot or whatever: (from the mailinglistset-nomenclature-errors-on-read "ignore")=
It should be noted that the answers ("A") are from Paul Emsley himself (and were maybe slightly edited).
==NCS edits==
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.
Specific Q3: I am unable to open the output pdb file from ShelXL in Coot.
A: Well, it's hard to know what'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 "header" information.
Another answer to questions 1+2 is to rename the hydrogen atoms in the shelxl res-file to match the mmCIF dictionaries used by Coot. This only needs to be done once as shelxl does not modify these names. Except for a few manual editions, the renaming can be done semi-automatically using regular expressions (replacing A->1, B->2, etc).
Concerning question 3, the Coot -> Extensions -> Module -> SHELXL menu entry works really well now. It reads in all relevant shelxl files and provides a menu highlighting the problematic areas in the model.
==Image quality on NVidia cards==
(apply density-at-point (imol-refinement-map) (rotation-centre))
There is no user access to the peak integration code of coot as yet.
==Disulfide bond across crystallographic axis==
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.
A: For the record, you can't refine symmetry-related disulfides in Coot (as of Nov 3, 2009).
==Macros in COOT==
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)?
A: The other language is a form of Lisp, called [ Scheme]. You can learn about programming python in many ways of course (not least the [ 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 "Python Scripting" [[|here]]. There is a growing collection of coot scripts in this Wiki article.
== building loops ==
Q: Is there any similar function in COOT as lego_auto_mainchain command in O program?
A: there are 2 loop fitting tools in Coot
# C alpha -> Mainchain [],[]
# DB Loop: (No good documentation) [] Extensions -> Modelling -> DB Loop...
==LSQ superpositions==
Q: Do an LSQ superposition using specified residues in multiple chains (superposing one oligomer on another).
A: Something like this then?
# specs for reference then moving
add_lsq_match(20, 90, "A", 20, 90, "A", 1)
add_lsq_match(20, 90, "B", 20, 90, "B", 1)
add_lsq_match(15, 75, "D", 15, 75, "D", 1)
apply_lsq_matches(1, 2)
which presumes that the reference molecule is in 1 and the moving molecule 2.
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.
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.
(define dynamic-lsq-range-extent 2) ;; ± 2 residues either side of centre residue
(define imol-ref (read-pdb "reference.pdb"))
;; convert between the input reference chain id and the chain id of
;; the moving molecule that corresponds to that chain
(define (mov-match-chain ref-chain-id)
(define (dynamic-lsq-match)
;; get the current residue and use that to make residue ranges for
;; an LSQ fit
(add-lsq-match (- aa-res-no dynamic-lsq-range-extent)
(+ aa-res-no dynamic-lsq-range-extent)
(- aa-res-no dynamic-lsq-range-extent)
(+ aa-res-no dynamic-lsq-range-extent)
(mov-match-chain aa-chain-id)
(apply-lsq-matches aa-imol imol-ref)))
(add-key-binding "Dynamic LSQ overlay" "Y" dynamic-lsq-match)
== reading MTZ file with experimental PHI and FOM using --auto ==
Q: There is the --auto <filename> 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.
A: use: coot --python -c 'make_and_draw_map("sad.mtz", "F", "PHI", "FOM", "/HKL_base/HKL_base/FOM",1, 0)'
== NCS Rotamer differences ==
Show me where NCS-related side-chains have different rotamers
(define (compare-ncs-rotamer imol chain-A chain-B)
(let ((n-residues (chain-n-residues chain-A imol))
(mismatched-rotamers '()))
(lambda (serial-number)
(let ((res-name-A (resname-from-serial-number imol chain-A serial-number))
(res-no-A (seqnum-from-serial-number imol chain-A serial-number))
(ins-code-A (insertion-code-from-serial-number imol chain-A serial-number))
(res-name-B (resname-from-serial-number imol chain-A serial-number))
(res-no-B (seqnum-from-serial-number imol chain-A serial-number))
(ins-code-B (insertion-code-from-serial-number imol chain-A serial-number)))
(if (not (= res-no-A res-no-B))
(format #t "sequence number for ~s do not match~%" res-no-A))
(if (not (string=? res-name-A res-name-B))
(format #t "residue names for ~s do not match~%" res-no-A))
(let ((rot-name-A (get-rotamer-name imol chain-A res-no-A ins-code-A))
(rot-name-B (get-rotamer-name imol chain-B res-no-B ins-code-B)))
(if (not (string=? rot-name-A rot-name-B))
(set! mismatched-rotamers
(cons (list imol chain-A res-no-A ins-code-A
(if (string=? rot-name-A "") "-" rot-name-A)
(if (string=? rot-name-B "") "-" rot-name-B))
(range n-residues))
(dialog-box-of-buttons "Mismatched Rotamers"
(cons 300 300)
(map (lambda(rotamer)
(let ((label (string-append " "
(list-ref rotamer 1)
" "
(number->string (list-ref rotamer 2))
(list-ref rotamer 3)
" "
(list-ref rotamer 4) ;; res-name
": "
(list-ref rotamer 5)
" vs. "
(list-ref rotamer 6)))
(thunk (lambda ()
(set-go-to-atom-molecule imol)
(list-ref rotamer 1)
(list-ref rotamer 2) " CA "))))
(list label thunk)))
" Close ")))
And one would use this something like:
;; example usage:
(let ((imol (read-pdb "test.pdb")))
(compare-ncs-rotamer imol "A" "B"))
== make RSR in coot 0.8.1 behave like in earlier versions ==
Q: We've noticed a new behavior in real space refinement in coot 0.8.1 whereby dragged atoms are more tightly restrained to their initial positions than in earlier versions. This seems to be described in the release notes by:
o BUG-FIX: The amount that the other atoms ove with moving the picked atom has been reduced (but is configurable)
A: Add e.g. this to your ~/ file:
Q: I'm wondering why this was changed. Does the optimum elasticity change with resolution, map quality, or another experimental limitation? Or does it more of a user preference?
A: Because of cis-peptides. My worry was that in the previous regime, it was
too easy to introduce cis-peptides when fitting to low resolution maps.
I believe the current default setting is much less likely to do that.
Q: I've tried various settings of refinement_drag_elasticity and I need to lower it to 0.5 or so before any semblance of earlier behavior appears.
A: It used to be 0.167, I think.
== Molprobity not active in COOT ==
Q: I am using COOT 0.8.1 EL that comes with the CCP4 6.5.010 on my Mac OS X 10.10.2. I wanted to run molprobity but the Validate > Probe clashes button in my pull down menu is not active. Is this function available in this COOT version?
A: Reduce and probe are separate programs available from the Richardson’s lab at Duke Download and install on your box. Then coot needs to be told in some instances where it can find these executables. I have the following lines in my ~/.coot file in Linux.
;; .coot
;; This file is required. As of coot 0.8pre no other mechanism for
;; enabling probe in coot works
;; This is full pathname of molprobity's probe program
(define *probe-command* "/apps/xray/bin/probe")
;; This is full pathname of molprobity's reduce program
(define *reduce-command* "/apps/xray/bin/reduce")
Untried: if you have Phenix installed: it comes with phenix.probe and phenix.reduce - you could insert the paths to these binaries into the above definitions.
== some symmetry mates not shown ==
Q: This structure has been solved and refined using phenix in the hexagonal setting of space group R 3. There is one copy per asymmetric unit in R 3. As you can see from the attached image, coot is rendering some but not all of the symmetry mates.
A: Turn up the radius a bit and use (set-symmetry-shift-search-size 3) . I would have thought that 2 is big enough, but maybe not in this case.

Navigation menu