Draws a bond of the selected type. Or changes a bond to the selected type by clicking on an existing bond.
Draws a chain of single bonds. The tool has two different modes of operation:
By dragging the mouse
This will construct a chain in a desired direction. An existing atom can be used as starting point.
By using a keystroke
By pressing the number keys 1-9 a chain of the corresponding length will be drawn. If the mouse cursor is above an atom this atom will be chosen as starting point. If the mouse cursor is over the blank canvas that specific point will be used as initial point for drawing the chain.
Draws a ring. When a ring tool is selected clicking on a bond will result in a ring which contains the bond.
Centers the molecule or molecules on the drawing canvas.
This tool can be used to move a molecule on the drawing canvas. If multiple molecules are present clicking on an individual molecule has the effect of only moving the fragment in question. By clicking somewhere on the blank canvas all fragments can be move simultaneously.
Keystrokes
MolDrawer defines several keystrokes which are supposed to make your work easier. The indications below are the standard behaviour. Some tools like the "draw chain" function override the key behaviour.
When the mouse cursor is. The behaviour can be different if
Number keys 0-9
Pressing a number key whilst over an atom will change the atoms charge to the specified value. By pressing the same number key twice the charge will be negative.
Left and right cursor keys
You can use the left and right cursor keys to change the type of atom.
Number keys 1-3
Changes the bond order to the value specified.
Atom Popup Menu
By clicking the on an atom with the left mouse key a popup menu will open which offers you additional functions. On apple: If you have the standard one button mouse you need to press shift in addition to open the popup menu.
Adding functional groups
One of the key features of the atom popup menu is the functional group submenu which makes adding functional groups quick and easy. The logic of adding a functional group depends on the topology of the atom. If the atom is the end of a chain the atom itself will be converted into a functional group. Otherwise a single bond will be inserted between the functional group and the atom. An example is given below:
The applet
In order to integrate the Applet into your website you should download the MoldrawerApplet.jar from the download section. Below a sample code is given for adding the applet to an html page. You will have to change some attributes to make it work!
The applet defines several public methods that you can use directly from JavaScript or from Java.
public void setMolFile(String molFile)
Sets the molecule to the one specified in molFile.
public String getMolFile()
Returns the molFile of the current molecule.
public void setMolFileURL(String strUrl)
This is an alternative to setMolFile which lets you specify the location of the MOL-file via a URL. Please keep in mind that for unsigned applets a same origin policy applies