1CHEMTOOL(1) User commands CHEMTOOL(1)
2
3
4
6 chemtool - chemical structures editor
7
8
10 chemtool [filename]
11
12
14 chemtool is a program for drawing organic molecules and exporting them
15 as a X bitmap, PNG, PicTeX, Xfig, SVG, SXD, MDL or EPS file. It runs
16 under the X Window System using the GTK widget set.
17
18 The program offers essentially unlimited undo/redo, two text fonts plus
19 symbols, seven colors, drawing at several zoom scales, and square and
20 hexagonal backdrop grids for easier alignment.
21
22
24 In all drawing and editing modes, mouse button one (usually the left
25 button) is used to mark or draw objects, while button three (the right
26 button) can be used to delete objects of the current type. The middle
27 button is mainly used in the bond drawing modes where it allows fast
28 changing of bondtypes. Starting with version 1.5, the default storage
29 directory for datafiles, and the filename extension to use, can be
30 saved via a configuration dialog.
31
32 Drawing of bonds:
33 Bonds can be drawn in 4 different angle settings (hexagon with 30°
34 intervals, two pentagons with 72° intervals (different orientation),
35 and a 45° i octagon). (Intermediate angles are possible in all of these
36 modes as well - just ignore the marker points in this case).
37
38 The bond style chooser in the center of the button bar determines the
39 type of bond that is drawn - initially, this is a single bond. If you
40 want to change the type of a bond later, either click on it with the
41 middle button of your mouse to advance to the next type(s), or select
42 the appropriate type in the chooser and then switch to bondtype mode
43 and pick all bonds that you want to change over to the new type. (The
44 color used for the bond is updated at the same time if necessary.)
45 Pressing the middle mousebutton on a bond when in 'Bondtype' mode
46 reverses the direction of that bond.
47
48 Using the third (usually the right) mouse button deletes the bond next
49 to the cursor position.
50
51 The available bond types are:
52
53 · single bond
54
55 · double bond
56
57 · double bond (shorter line on the other side)
58
59 · centered double bond
60
61 · triple bond (flanking lines shorter than central)
62
63 · triple bond (with equal line lengths)
64
65 · quadruple bond
66
67 · wedge-shaped bond
68
69 · dashed wedge-shaped bond
70
71 · wavy line
72
73 · half arrow
74
75 · regular arrow
76
77 · wide bond
78
79 · circle
80
81 · dotted line
82
83 · overlapping single bond (which cuts out a segment from any
84 bond it crosses)
85
86 · light pi orbital lobe
87
88 · dark pi orbital lobe
89
90
91 Semiautomatic drawing of rings:
92 Rings of 3 to 12 members can be drawn easily by holding down the Ctrl
93 key while drawing a line. This line will then become the first segment
94 of a ring that is automatically drawn in clockwise direction. The size
95 of the ring defaults to that appropriate for the selected drawing mode
96 (i.e. 5, 6 or 8 sides), but it can be set on a per-ring basis by press‐
97 ing Ctlr-<number> before drawing the ring, where numbers 3-9 correspond
98 to 3 to 9-membered rings, while 0 to 2 select 10, 11 and 12-membered
99 rings, respectively.
100
101 Newly drawn rings can be deleted by pressing Ctrl and mouse button 3
102 together.
103
104
105 Drawing of curved lines:
106 Curved lines for objects like arrows or orbital lobes can be drawn in
107 spline curve mode by specifying four control points that form a bound‐
108 ing polygon (startpoint, two points on either side of the peak, end‐
109 point). Of the regular bondtypes available in the Style menu, the 'sin‐
110 gle line', 'semiarrow', arrow and 'dashed line' retain their usual
111 function, while the 'wide line' type is used to denote a filled poly‐
112 gon. The control points are only visible in Move mode, where they can
113 be dragged around to change the form of a curve after it is drawn.
114
115
116 Setting bond style
117 In bond style mode, clicking on any bond in the diagram changes its
118 representation to the type selected in the pull-down menu next to the
119 Type button.
120
121 The additional bond type available in the pulldown menu,
122
123 curved arrow
124
125 is only available for drawing. It is actually a shortcut for one of the
126 curve drawing functions described above, with the second and third con‐
127 trol points automatically generated. As such, it can not be converted
128 to or from any of the conventional bond types.
129
130 (One can, however, convert it to any of the other curve types, e.g. to
131 change the type of arrowhead). The shape of the arrow will usually need
132 to be adjusted by shifting the control point that appears alongside it
133 in 'Move' mode.
134
135
136 Inserting text
137 Text written into the text box can be positioned with the cursor and
138 may appear left, middle or right-aligned in the drawing. Text size and
139 color is selectable from a fixed list of choices. There are two spe‐
140 cial characters to be used for sub- and superscripting the following
141 character:
142
143 '^' to shift up (e.g. N^+)
144
145 '_' to shift down (e.g. CH_3)
146
147
148 The control character '|' is used to italicise the following character,
149 as in |t-Bu.
150
151 A bold fonttype, typically used for numbering compounds, can be
152 selected by preceding the character with a '#'.
153
154 The special character '@' switches to symbol mode, which uses the stan‐
155 dard X11 symbol font. All alphabetic keys produce the corresponding
156 Greek characters in this mode, and several other symbols are available
157 if their standard Latin1 equivalents are already mapped onto the key‐
158 board:
159
160 yen -> infinity
161
162 hyphen -> uparrow
163
164 macron -> downarrow
165
166
167 The symbols 'plusminus' and 'registered' (trademark) are already in the
168 standard font, although they are not normally available on the key‐
169 board. Use the following commands (or add the declarations to your
170 .xmodmaprc ) to make them available via <AltGr>+<Key> (<Righ‐
171 tAlt>+<Key>):
172
173 xmodmap -e 'keysym r = r R registered' \
174 -e 'keysym o = o O yen' \
175 -e 'keysym p = p P plusminus' \
176 -e 'keysym u = u U hyphen' \
177 -e 'keysym d = d D macron'
178
179 (this leads to AltGr-P = plusminus, AltGr-R = registered in normal mode
180 and AltGr-O = infinity, AltGr-U = uparrow, AltGr-D = downarrow in sym‐
181 bol font).
182
183
184 For 'dots-and-crosses' diagrams, the following mappings to the symbol
185 font might be useful: acute -> cross (e.g. keysym x = x X acute) mid‐
186 dle dot -> filled dot (e.g. keysym d = d D periodcentered) (using the
187 degree sign for the open dot).
188
189
190 Circled versions of the plus and minus signs for denoting ionic charge
191 are available as @+ and @- .
192
193
194 When you want to use symbols as sub- or superscripts, place the sub- or
195 superscripting character before the '@' character, e.g. K_@a .
196
197 In text mode, the right mouse button deletes the label at the cursor
198 position. Changing the size, font or color of a label can be done by
199 left-clicking on it after choosing the desired combination of settings.
200 When the text entry box above the drawing area is empty, only the set‐
201 tings are updated without changing the contents of the label, otherwise
202 the label text is replaced as well. If you want to copy the text of an
203 existing label to the text entry box, click on it with the middle mouse
204 button.
205
206
207 Labeling shortcuts
208 In all bond drawing modes, several keyboard shortcuts are available to
209 add atom symbols without having to leave drawing mode. The label is
210 placed at the current drawing position (the endpoint of the last line
211 drawn, or the spot last clicked on).
212
213 The keys 'c','h','n','o','s','p' and 'r' insert the corresponding capi‐
214 tal letter, 'l' (lowercase L) inserts 'Cl', while '1', '2', '3' insert
215 CH,CH_2 and CH_3, respectively. The asterisk key (*) inserts a filled
216 circle.
217
218 Pressing the space bar once allows you to enter arbitrary labels, which
219 will be placed at the current position when you press the Return key.
220
221
222 Drawing electron pairs
223 The keys of the numeric keypad can be used to draw short 'electron
224 pair' lines next to an element symbol - if one imagines the element
225 symbol to be sitting on the central '5' key, each key draws the appro‐
226 priate electron pair for its position. When used together with the
227 Shift key, two dots are drawn instead of a line - simply delete one of
228 the dots again if you need an odd number of electrons.
229
230
231 Numbering atoms
232 For quick numbering of the atoms in a molecule, switch to one of the
233 text modes, hold down the Control key and pick each atom in succession
234 with the left mouse button. Numbering starts at 1, and the sequence can
235 be reset at any time by clicking the right mouse button. If you need to
236 use your own numbering scheme, clicking the middle button (while still
237 holding down the Control key) makes it pick up whatever number is in
238 the text entry field.
239
240
241 Centering
242 If there is not enough space for your molecule you can put it in the
243 middle of the sheet with the center button.
244
245
246 Exporting to foreign formats:
247 You can export your molecules as an X bitmap, a PNG or EMF image, an
248 encapsulated postscript file, an input file for Brian Smith' xfig(1)
249 program, an MDL ver. 2000 molfile for data exchange with commercial
250 packages, an SVG file for XHTML web pages, or in the PicTeX format for
251 direct inclusion in LaTeX documents. The PicTeX, PNG, EMF and Post‐
252 script output functions rely on the fig2dev81) program from the trans‐
253 fig(1) package and are only available when this program was detected on
254 startup. If the fig2sxd(1) program is installed, an additional export
255 option is available for OpenOffice SXD format. Likewise, if the
256 (open)babel program is installed, an additional Export menu providing
257 access to all filetypes supported by this tool becomes available.
258
259 You can create the outputs in different sizes according to the current
260 zoom scale. Postscript and PicTeX files can also be created at arbi‐
261 trary scales selectable on the export file menu.
262
263 An option in the configuration menu can be set to call fig2dev in
264 international language mode, which will automatically render any text
265 written in the alternate (Times) font using the postscript font appro‐
266 priate for the current locale (currently Croatian, Cyrillic, Czech,
267 Hungarian, Japanese, Korean, Polish). See the fig2dev documentation
268 for details.
269
270 To include the PicTeX-file in your LaTeX document, you will need the
271 pictex macro package. Depending on the versions you use, you might also
272 have to load the 'color' package in the preamble of your LaTeX file.
273 If you experience 'TeX capacity exceeded' error messages, increase the
274 extra_mem_bot parameter in your texmf.cnf file (usually in
275 /usr/share/texmf/web2c, /usr/local/texmf or /etc/texmf). Pictex is
276 known for its unusual (by tex standards) memory requirements, and the
277 standard settings do not account for this (although you may find a com‐
278 ment a la 'change this if you use pictex' in the texmf.cnf file).
279 Something like extra_mem_bot=400000 should not hurt on any moderately
280 modern system.
281
282
283 Printing drawings
284 Since version 1.5, direct printing of diagrams to a Postscript-capable
285 printing device (or more typically a print queue running ghostscript)
286 is possible. The paper size, magnification, printer name and the print
287 command to use (currently either lp(1), lpr(1) or kprinter(1)) can be
288 stored in the Configuration Dialog.
289
290
291 Selecting all or parts of a drawing for transformations:
292 Using the 'Mark' button, you can easily select parts of the current
293 drawing by enclosing them with a 'rubberband' rectangle.
294
295 If you need to add atoms outside of the rectangular area to your selec‐
296 tion, simply draw another rubberband around them while holding down the
297 Ctrl key.
298
299 The selected parts will appear highlighted in blue and are immediately
300 available for
301
302
303 moving simply drag the fragment to the desired position with the
304 mouse while holding down the left mouse button. (If you
305 only need to move individual atoms or bonds, you can simply
306 pick and drag them in 'Move' mode without having to mark
307 them first).
308
309 rotating horizontal movement of the mouse translates to smooth rota‐
310 tion around the pivot point selected when pressing the
311 mouse button
312
313 flipping (mirroring) the fragment about a horizontal or vertical
314 mirror plane through its center: this is performed by
315 clicking on the appropriate menu button
316
317 copying clicking on the 'Copy' menu button creates an exact copy of
318 the selected fragment slightly offset to the original. The
319 mark is automatically transferred to the new copy.
320
321 rescaling horizontal mouse movement is translated into a smooth
322 increase or decrease of size of the marked fragment
323
324 deleting to delete the marked fragment, simply click the third (usu‐
325 ally the right) mouse button after it is highlighted.
326
327 framing choosing one of the icons from the drop-down list of frame
328 and bracket styles draws the corresponding object, e.g. a
329 pair of round parentheses, around the highlighted fragment.
330
331 optimizing clicking on the 'bucket and broom' symbol invokes a func‐
332 tion that removes overlapping (duplicate) bonds and labels
333 from the drawing and straightens lines that are almost hor‐
334 izontal or vertical.
335
336
337 Adding previously saved figures:
338 To add another molecule from a previously saved chemtool drawing,
339 select it in the file selection window that comes up when you press the
340 'Add' button. Single clicking on any filename in the list displays a
341 small preview of the molecule to aid in selection. The newly added
342 molecule is automatically made active so that it can be repositioned as
343 desired.
344
345 If you want to add it to a predefined position on another molecule, you
346 can mark that attachment site by left-clicking on it instead of drag‐
347 ging the marker rectangle. A small green dot will appear at what is now
348 the reference position for the new part. If you save molecules with
349 such a marker set, it will in turn define their attachment site when
350 they are added to another drawing.
351
352
353 Adding one of the predefined templates:
354 Selecting 'Templates' from the 'Tools' menu opens a second window with
355 a small collection of predefined structures. Simply click on the image
356 of the desired molecule to add it to your drawing. The Template window
357 can be kept open throughout a chemtool session - if it is hidden by
358 another window, you can move it to the front by selecting the 'Tem‐
359 plate' menu in chemtool again.
360
361 The data in the template system differ from normal chemtool drawings
362 only by the fact that they are stored within the program, and in a
363 slightly awkward format (x and y coordinates listed separately in the
364 source file templates.h). These are meant to provide a convenient
365 basis set available to all users, but not individually extendable (you
366 can use the 'Add' function for your own structures). Please let us know
367 if you want specific molecules added to the templates - their name or
368 ideally a regular chemtool drawing file is all we need. (send email to
369 martin@ruby.chemie.uni-freiburg.de)
370
371
372 Importing foreign file formats:
373 Chemtool provides functions for importing files in both the PDB format
374 used by the Protein Database (and by most molecular modeling packages)
375 and the proprietary MDL molfile format used by ISISdraw and understood
376 by other structure drawing packages and database frontends.
377
378 As both are 3D file formats, while chemtool only handles 2D projec‐
379 tions, imported molecules are read into a temporary storage at first
380 and displayed in blue on the canvas. This 3D representation can then be
381 rotated using the mouse. Only after pressing the Return key on the key‐
382 board is it converted into the final 2D projection that can be edited.
383 While such a 3d import is in progress, all normal drawing and editing
384 functions are disabled.
385
386 With MDL molfile import, the carbon atom labels are automatically dis‐
387 carded. For PDB import, the amount of labeling can be chosen in the
388 file selection dialog, which offers retention of either all labels,
389 only those of non-hydrogen atoms, or only the non-numeric part of the
390 labels.
391
392 If the program babel is installed - either the original version written
393 by Pat Walters or the more recent OpenBabel effort - chemtool will
394 automatically offer a menu option for importing from any of the file
395 formats this supports.
396
397
398 Determining sum formula and molecular weight:
399 The distribution contains a helper program, cht(1), by Radek Liboska
400 (Prague) to calculate sum formula and (exact) molecular weight from a
401 chemtool drawing file. It is also available from within chemtool to
402 calculate these data for the current structure or a marked fragment of
403 it. cht can be misled by duplicate bonds ( chemtool does not remove
404 overlapping bonds, such as they might result from fusing ring systems,
405 automatically) and by the 'aromatic ring' symbol, so you should avoid
406 these and check the plausibility of the generated sum formula where
407 possible.
408
409
410 Drawing functions not available within Chemtool:
411 For features not currently supported by chemtool, like general line-
412 drawing functions, getting Brian Smith's XFig drawing package xfig is
413 highly recommended. About the only thing it does not offer is support
414 for 'chemical' linetypes and drawing angles - which is why chemtool was
415 written as a sort of companion program. (There will probably be more of
416 the most sorely needed drawing options added to chemtool over time, but
417 duplicating the more general-purpose features of xfig seems rather
418 pointless.)
419
420
422 chemtool and its companion program cht are available under the terms of
423 the GNU General Public License (see the file 'COPYING' in the package).
424 This software comes with ABSOLUTELY NO WARRANTY.
425
426
428 Thomas Volk
429 Original author and maintainer up to 1.1.1.
430
431 Dr. Martin Kroeker <martin@ruby.chemie.uni-freiburg.de>
432 Maintainer and primary author since 1.1.2.
433
434 Radek Liboska, PhD <liboska@uochb.cas.cz>
435
436 Michael Banck <mbanck@gmx.net>
437
438 and many others.
439
440
442 babel(1), cht(1), fig2dev(1), fig2sxd(1), transfig(1), xfig(1)
443
444 Homepage:
445 http://ruby.chemie.uni-freiburg.de/~martin/chemtool/chemtool.html
446
447
448
449
4501.6.13 23 Dec 2011 CHEMTOOL(1)