BKChem
Prev | Chapter 2. Drawing | Next

# 2.2. Simple drawing

## 2.2.1. Bond-by-bond drawing

The bond-by-bond drawing in BKChem is performed in the "draw mode".

The drawing is realized in a very intuitive way. You can just click on the drawing canvas and two atoms with a single bond between them will appear. By default the atoms are carbons and their symbol is not drawn. When you change the atom symbol to something else the symbol will appear. To attach more atoms to the currently drawn two, just focus one of them and click a mouse. By default the new atoms are added so that the new bond has angle of 120 deg. If you want to change that you can instead of a click on focused atom use dragging. Press down a mouse button on a focused atom and without releasing it move the mouse. You will find out that the new bond is drawn in a direction of your mouse move and keeps moving while you keep dragging. To help you with precision of the drawing, there are several possible resolutions of the angle produced by dragging. The default is 30deg and is suitable for usual drawing (perfect for 6 membered rings). The resolution of 18deg is great for five membered rings and the others (6 and 1) are for finer work. For completely freestyle drawing use the "freestyle" submode.

To create double or triple bonds, just click on a bond in a "draw mode" and the bond order will increase by 1. After triple bond it will fall back to simple bond. This way you can also change the centering of the double bond (whether the two lines that form double bond will be centered and when not on which side the second line will appear). If you only want to change the centering of double bond you can just click it while holding "Shift" key.

By changing the bond type of drawn bonds you can create stereo-bonds.

## 2.2.2. Templates

BKChem comes with set of ready-to-use templates of common rings. To use them just select the "template mode" and then select a template.

The behavior of template depends on where you place it. Clicking on the canvas just creates the molecule from the template. Clicking on atoms or bonds attaches the template to the existing molecule in different ways (depending on whether you clicked bond or atom and whether the atom had one or more other bonds) - just try it to see.

## 2.2.3. Arrows

For drawing of arrows use "arrow mode". The way to draw arrow resembles bond-by-bond drawing of molecules. The arrow can be extended from both sides points can be even inserted inside the arrow. To draw arrows in different than horizontal position used the dragging while drawing.

You can select on which side the arrow-head will be drawn by clicking the arrow (the line, not the point) in the arrow mode. The arrow-head position will cycle in the start-end-both-none cycle (so you can use the arrow also for drawing lines).

To change the appearance of existing arrow you can move individual points (after you select them - see the following parts of this chapter.

## 2.2.4. Text

Most of this section applies not only to texts but also to atoms that have visible text. To create or modify the text use the "text mode". The text can be set in any mode (there is a difference between setting and modifying text - when modifying text you can just change it, when setting it you have to retype the whole sequence).

### 2.2.4.1. Text formatting

To give the user a simple way to alter the font properties of text (italic, bold, subscript and superscript) the text is entered as an XML fragment. You do not specify the enclosing tag (this is done automatically by the program), just the formating. For instance the text "hi, <i>are you ready to <b>rock</b></i>?" will display "are you ready to" as italic and "rock" as bold-italic. For subscript and superscript use <sub> and <sup> respectively.

When using XML formating there is a problem with using characters as < and & because they are treated as special in XML. When you enter some text such as "a<b" that cannot be parsed as XML, the program will automatically "escape" all the special characters, thus giving you the right result. When you need only some of the special characters to be escaped (e.g. for <i>a<b</i>" you want to escape the < only in the "a<b") you must do it manually. This means entering an "escape sequence" instead of the special character. For "<" use "&lt;" and for "&" use "&amp;" (and "&amp;amp;" for "&amp;" :). Easy, isn't it?

### 2.2.4.2. Setting and modifying text

When you hit a "Space" button with some atoms or texts selected or when you click an atom or text in "text mode" or click the canvas in "text mode", the "edit pool" will be activated letting you enter your text. To apply the entered text hit "Enter" or press one of the buttons on side of "edit pool". To cancel the action hit "Escape". The three buttons are used for setting text in different modes. The "Set" button serves for applying the text just as it was entered, "Set & Interpret" will search the inner database of BKChem to find if the entered text has some known interpretation. The "Sub-numbers" is used to turn all numbers in subscript and is useful for molecular formulas that are not known to BKChem.

Prev | Home | Next
Drawing | Up | Modifying the drawing