3.4. To Add or Modify an Atom

To add or modify an atom, you can activate the Element Tool or the Fragment Tool:

3.4.1. To Add or Modify an Single Atom

Figure 3-9. Element Tool

With this tool, you can add an atom everywhere on the canvas or change the nature of an already existing atom. The element is chosen with the periodic table available in the view menu or by double clicking on the tool's button. The symbol of the currently selected element appears in the button of this tool. By default, carbon is the current element as shown on the screenshot above. While the left button remains pressed, the new atom or label appears coloured in green. If you move the mouse away from where the left button was pressed, the new atom disappears. The changes are effective when the button is released while the pointer stays on the new or changed atom. Attached hydrogens are automatically added for non metals.

To change the default element,use the Periodic Table Button.

It is also possible to change the nature of an atom using the keyboard: put the mouse cursor on the atom you want to modify, and then select the new element as described there. Note that this will also change the current element.

A local charge and explicit single electrons or electrons pairs can be added to the atom with the appropriate tool.

Carbon atom are normally not displayed when they have at least one bond. You can change this behaviour for each carbon atom using File->Display symbol in the contextual menu.

When a non metal has implicit hydrogen atoms, GChemPaint tries to infer if they should appear on the left or the right of the atomic symbol. If the automatic behavior is not what you wish, you can force a left or right position using File->Hydrogen atoms position in the contextual menu. The following dialog will pop up:

Figure 3-10. Hydrogen atoms position dialog box

Choose one of the options (Left, Right, Top, Bottom, or Auto). The chosen option will be instantly applied.

3.4.2. To Add or Modify a Group of Atoms

Figure 3-11. Fragment Tool

With this tool, you can add a formula just by typing some text. In GChemPaint, such text representing atoms is called a fragment. What you type with this tool is only partially analyzed. You must first type a valid atomic or group symbol. The fragment will be aligned on the center of this symbol and this allows you to include the fragment in a molecule by adding a bond. Fragments cannot have more than one single bond in the present version of GChemPaint. The bond can be added to any atom in the fragment. The bonded atom is the reference atom of the fragment. When editing, you must always have a valid symbol at its position.

This tool has several input modes. To switch between modes, you need to use the appropriate key combinations. Current mode is displayed in the status bar. Typing the shortcut for current mode always select normal mode.

Available modes:

In normal mode, figures are automatically displayed smaller than symbols and slightly lowered unless they are part of a charge. To add a charge in the fragment, first type the sign and then, either the figures or other signs: typing a + increments the current charge and typing a - decrements it.

To obtain Fe2+, you can type Fe+2 or Fe++.

Fragments also support local charges, but only if no charge is indicated in the fragment itself.

It is also possible to force some text to appear and be considered as a charge by switching to the charge input mode. Inside charges the - sign is replaced by an unicode minus character (−). GChemPaint will check if the entered text looks like a charge.

The fragment tool also converts existing atoms to fragment. This might be useful to change the position of attached hydrogens or to display terminal carbon atoms. In the other way, the Element Tool can also be used on fragments. It tries to replace the symbol at the position of the click by the current element symbol if there is no bond. If there is a bond, the symbol of the bonded atom is changed whereever you click. To transform a whole fragment into an ordinary atom, press the Control key while clicking on the fragment.


Saving a file containing fragments in a format different from the native one is very unsafe.