Chemtool is a program for drawing organic molecules. It runs under the X Window System using the GTK widget set.
Most operations in chemtool can be accomplished using the mouse - the first (usually the left) button is used to select or place things, the middle button modifies properties (e.g. reverses the direction of a bond), and the right button is used to delete objects.
The program offers essentially unlimited undo/redo, two text fonts plus symbols, seven colors, drawing at several zoom scales, and square and hexagonal backdrop grids for easier alignment.
Bonds can be drawn in 4 different angle settings - hexagon with 30 degree intervals, two pentagons with 72 degree intervals (in different orientations), and a 45 degree octagon). Intermediate angles are possible in all of these modes as well - just ignore the marker points in this case.
Pressing the first (left) mouse button sets the starting point of a bond and also displays a set of markers at the appropriate angular positions. Dragging the mouse while holding down the button draws a line in the desired direction.
The bond style chooser in the center of the button bar determines the type of bond that is drawn - initially, this is a single bond. If you want to change the type of a bond later, either click on it with the middle button of your mouse to advance to the next type(s), or select the appropriate type in the chooser and then switch to bondtype mode and pick all bonds that you want to change over to the new type. Pressing the middle mousebutton on a bond when in 'Bondtype' mode reverses the direction of that bond.
The bond types available in chemtool are
Pressing the third (usually the right) mouse button deletes the bond next to the cursor position.
Rings of 3 to 12 members can be drawn easily by holding down the Ctrl key
while drawing a line. This line will then become the first segment of a ring
that is automatically drawn in clockwise direction. The size of the ring
defaults to that appropriate for the selected drawing mode (i.e. 5, 6 or 8
sides), but it can be set on a per-ring basis by pressing Ctlr-
Curved lines for objects like arrows or orbital lobes can be drawn in spline curve mode by specifing four control points that form a bounding polygon (startpoint, two points on either side of the peak, endpoint). Of the regular bondtypes available in the Style menu, the 'single line', 'semiarrow', arrow and 'dashed line' retain their usual function, while the 'wide line' type is used to denote a filled polygon. The control points are only visible in 'Move' mode, where they can be dragged around to change the form of a curve after it is drawn.
For drawing curved arrows, there is also a predefined function in the bond
style chooser. This is actually a shortcut for one of the curve drawing
functions described above, with the second and third control points
automatically generated. As such, it can not be converted to or from any
of the conventional bond types.
(One can, however, convert it to any of the other curve types, e.g. to change the type of arrowhead). The shape of the arrow will usually need to be adjusted by shifting the control point that appears alongside it in 'Move' mode.
Text written into the text box can be positioned with the cursor and may appear left, middle or right-aligned in the drawing. The font size can be selected from the chooser to the right of the text entry field, while the 't/T' button next to the text-alignment buttons lets you switch between two fonts - Helvetica for regular labels, and Times Roman for descriptions. Like the line drawings, text can be in any of the colors available on the color selector. If you want to change the color, font or alignment of a label afterwards, just choose the appropriate combination of settings and then select the desired label with the left mouse button. When the text entry area is empty, this will just update the properties without changing the text itself. When the text entry area is not empty, its contents will also replace the text of the label. Copying the text of a label to the entry area is done with the middle mouse button, while the right mouse button deletes the selected label.
There are two special characters to be used for sub- and superscripting the following character:
'^' to shift up (e.g. N^+ for N+)
'_' to shift down (e.g. CH_3 for CH3)
The control character '|' is used to itializise the following character,
as in |t-Bu (
The special character '@' switches to symbol mode, which uses the standard X11 symbol font. All alphabetic keys produce the corresponding greek characters in this mode, and several other symbols are available if their standard latin1 equivalents are already mapped onto the keyboard:
|latin 1||symbol character|
The symbols 'plusminus' and 'registered' (trademark) are already in the standard font, although they are not normally available on the keyboard. Use the following commands (or add the declarations to your .xmodmaprc ) to make them available via <AltGr>+<Key> (<RightAlt>+<Key>):
xmodmap -e 'keysym r = r R registered' \ -e 'keysym o = o O yen' \ -e 'keysym p = p P plusminus' \ -e 'keysym u = u U hyphen' \ -e 'keysym d = d D macron'
For 'dots-and-crosses' diagrams, the following mappings to the symbol
font might be useful:
acute -> cross (e.g. keysym x = x X acute)
middle dot -gt; filled dot (e.g. keysym d = d D periodcentered) (using the degree sign for the open dot).
When you want to use symbols as sub- or superscripts, place the sub- or superscripting character before the '@' character, e.g. K_@a .
The right mousebutton can be used to delete text anchored at the cursor position.
In all bond drawing modes, several keyboard shortcuts are available to add atom symbols without having to leave drawing mode. The label is placed at the current drawing position (the endpoint of the last line drawn, or the spot last clicked on).
The keys 'c','h','n','o','s','p' and 'r' insert the corresponding capital letter, 'l' (lowercase L) inserts 'Cl', while '1', '2', '3' insert CH,CH_2 and CH_3, respectively. The asterisk key (*) inserts a filled circle.
Pressing the space bar once allows you to enter arbitrary labels, which will be placed at the current position when you press the Return key.
The keys of the numeric keypad can be used to draw short 'electron pair' lines next to an element symbol - if one imagines the element symbol to be sitting on the central '5' key, each key draws the appropriate electron pair for its position.
For quick numbering of the atoms in a molecule, switch to one of the text modes, hold down the Control key and pick each atom in succession with the left mouse button. Numbering starts at 1, and the sequence can be reset at any time by clicking the right mouse button. If you need to use your own numbering scheme, clicking the middle button (while still holding down the Control key) makes it pick up whatever number is in the text entry field.
Using the 'Mark' button, you can easily select parts of the current drawing by enclosing them with a 'rubberband' rectangle. If you need to add atoms outside of the rectangular area to your selection, simply draw another rubberband around them while holding down the Ctrl key.
The selected parts will appear highlighted in blue and are immediately available for
If there is not enough space for your molecule you can put it in the middle of the sheet with the center button.
You can export your molecules as
The PicTeX and Postscript output functions rely on the fig2dev program from the transfig package.
You can create the outputs in different sizes according to the current zoom scale. The PicTeX and Postscript modes additionally allow scaling to an arbitrary percentage selectable on the export menu .
To include the PicTeX-file in your LaTeX document, you will need the pictex
macro package. Depending on the versions you use, you might also have to load
the 'color' package in the preamble of your LaTeX file.
If you experience 'TeX capacity exceeded' error messages, increase the extra_mem_bot parameter in your texmf.cnf file (usually located in /usr/share/texmf/web2c, /usr/local/texmf or /etc/texmf).
Pictex is known for its unusual (by tex standards) memory requirements, and the standard settings often do not account for this (although you may find a comment a la 'change this if you use pictex' in the texmf.cnf file).
Something like extra_mem_bot=400000 should not hurt on any moderately modern system.
Since version 1.5, direct printing of diagrams to a Postscript-capable printing device (or more typically a print queue running ghostscript) is possible.
The paper size, magnification, printer name and the print command to use (currently either lp or lpr) can be stored in the Configuration Dialog.
To add another molecule from a previously saved chemtool drawing, select its filename in the dialog window that comes up when you press the 'Add' button. Marking a file in the dialog automatically displays its contents in a small preview window.
The newly added molecule is automatically made active so that it can be repositioned as desired. If you want to add it to a predefined position on another molecule, you can mark that attachment site by left-clicking on it instead of dragging the marker rectangle. A small green dot will appear at what is now the reference position for the new part. If you save molecules with such a marker set, it will in turn define their attachment site when they are added to another drawing.
Choosing 'Templates' from the 'Tools' menu opens a second window with a small collection of predefined structures.
Simply click on the image of the desired molecule to add it to your drawing. The Template window can be kept open throughout a chemtool session - if it is hidden by another window, you can move it to the front by clicking the 'Template' button in chemtool again.
The data in the template system differ from normal chemtool drawings only by the fact that they are stored within the program, and in a slightly awkward format (x and y coordinates listed separately in the source file templates.h). These are meant to provide a convenient basis set available to all users, but not individually extendable (you can use the 'Add' function for your own structures). Please let us know if you want specific molecules added to the templates - their name or ideally a regular chemtool drawing file is all we need. (send email to email@example.com)
Chemtool is able to import files written either in the PDB format originally used by the Protein Databank (which is now also written by most modeling packages), or in the molfile (V2000) format developed by MDL Inc. for their ISIS products.
As both formats can contain 3D information, while chemtool at least currently does 2D drawing only, the molecule is imported as a temporary 3D image first, which can be rotated using the mouse (with Z-axis rotation initiated by pressing the Ctrl key simultaneously with the (left) mouse button 1). After pressing the Return key, the current orientation is stored as a 2D projection that can be further edited. All editing commands except zooming are disabled in 3d mode.
The PDB import offers a choice which of the atom symbols to import - you can either import all labels, only those of non-hydrogen atoms, optionally omitting any trailing sequence numbers, or no labels at all. Bonds are read from CONECT records, if present, or guessed from the interatomic distances. In MDL import mode, C atom labels are automatically suppressed, and bond types are preserved where possible.
If you have a version of the BABEL program installed - either the original Babel written by Pat Walters or the current OpenBabel effort - chemtool will automatically offer a menu option for importing from any of the file formats this supports.
The distribution contains a helper program, cht, by Radek Liboska (Prague) to calculate sum formula and (exact) molecular weight from a chemtool drawing file. It is also available from within chemtool to calculate these data for the current structure or a marked fragment of it. Cht can be misled by duplicate bonds ( chemtool does not remove overlapping bonds, such as they might result from fusing ring systems, automatically), by reaction arrows and by the 'aromatic ring' symbol, so you should avoid these and check the plausibility of the generated sum formula where possible.
cht recognizes the following commonly used abbreviations:
|Ac||C2 H3 O||Acetyl|
|Ade||C5 H4 N5||Adeninyl|
|Bz||C7 H5 O||Benzoyl|
|BOC||C5 H9 O2||Butyloxycarbonyl|
|CE||C3 H4 N||Cyanoethyl|
|Cyt||C4 H4 N3 O||Cytosinyl|
|DBAM||C9 H19 N||Dibutylaminomethylene, biradical|
|DMAM||C3 H7 N||Dimethylaminomethylen, biradical|
|DMTr||C21 H19 O2||Dimethoxytrityl|
|Gua||C5 H4 N5 O||Guaninyl|
|Ms||C H3 S O2||Mesyl|
|MOC||C2 H3 O2||Methoxycarbonyl|
|MOM||C2 H5 O||Methoxymethyl|
|MMTr||C20 H16 O||Monomethoxytrityl|
|@F(greek phi)||C6 H5||Phenyl|
|TBDMS||C6 H15 Si||tert-Butyldimethylsilyl|
|TBDPS||C16 H19 Si||tert-Butyldiphenylsilyl|
|Tf||C F3 S O2||Triflyl|
|Thy||C5 H5 N2 O2||Thyminyl|
|TMS||C3 H9 Si||Trimethylsilyl|
|TMTr||C22 H22 O3||Dimethoxytrityl|
|Tol||C8 H7 O||Tolyl|
|Ts||C7 H7 S O2||Tosyl|
|Ura||C4 H3 N2 O2||Uracilyl|
|Z||C8 H7 O2||Benzyloxycarbonyl|
For features not currently supported by chemtool, like patterns or general line-drawing functions, getting Brian Smith's XFig drawing package from www-epb.lbl.gov/xfig is highly recommended. About the only thing it does not offer is support for 'chemical' linetypes and drawing angles - which is why chemtool was written as a sort of companion program. (There will probably be more of the most sorely needed drawing options added to chemtool over time, but duplicating the more general-purpose features of xfig seems rather pointless.)
For license information see the file 'COPYING' in this package, i.e. the GNU General Public License. This software comes with ABSOLUTELY NO WARRANTY.