Demos > 2D Sketcher
The sketcher controls are modeled from the ChemDoodle® desktop application (learn more about the desktop software here). Those familiar with the ChemDoodle desktop application will immediately be comfortable drawing structures in this web-based sketching component.
The most basic sketcher input is received from mouse events. All aspects of the ChemDoodle desktop application are present, from locking bond lengths and angles, to the optimize zone to fragment previews. More information about how to use the ChemDoodle family of sketchers can be found in the ChemDoodle user guide. Pritt Balagopal has also put together a nice tutorial on the Chemistry StackExchange.
In addition to mouse input, there are buttons and keyboard shortcuts that are described in the other tabs.
The small grey dot that follows your cursor is an atom (carbon). All structures must begin with an atom. Click to place an atom. Hover and click on a placed atom to place a bond. You can make it so starting atoms are not required by clicking on the Require starting atom checkbox to the right of the sketcher.
There are two types of ChemDoodle Web Sketchers, the Full Sketcher and the Single Molecule Sketcher. You can choose either above in this demo. Based on the interface, you may be using one or the other or both. The Full Sketcher allows for the creation of multiple chemical structures, shapes and figures. The Single Molecule Sketcher provides a streamlined interface for drawing a single molecular structure.
If you are developer and would like to learn how to install this sketcher, please refer to the SketcherCanvas documentation.
Just like in the desktop version of ChemDoodle, the web-based sketcher implements a copious amount of keyboard shortcuts. In addition to the listed shortcuts, you can also use the arrow keys to nudge the molecule. All keyboard shortcuts will work regardless of the state or mode the sketcher is in. But keep in mind that many of these shortcuts also are shortcuts for the browser. So these shortcuts will only work if the mouse is over the sketcher.
Modifier shortcuts are executed by holding down the system meta key, which is ctrl on Windows and Linux and command on macOS.
a Selects all content in the Full Sketcher. c Copies selected content in the Full Sketcher. n Clears the sketcher, leaving a lone carbon atom. o Pops up a window to load a chemical file. s Pops up a window to save the structure in the sketcher in a chemical format. v Pastes selected content in the Full Sketcher. x Cuts selected content in the Full Sketcher. y Redoes the last undone action. z Undoes the last performed action. + Zooms in. - Zooms out.
When Atoms are Hovered
When an atom is hovered, the following shortcuts will be active. An atom is hovered if the mouse is close enough to the atom such that the atom is surrounded by an amber circle.
Alphabet Cycles the hovered atom's label through the element symbols that begin with that letter of the alphabet. Digits Adds a carbon chain with length equal to the digit pressed in the most optimal orientation. The 0 key will add a chain of length 10. Shift+Digits Adds a ring with number of sides equal to the digit pressed (3+) in the most optimal orientation. Delete/Backspace Removes the hovered atom and any attached bonds and any small attached bonds. Leaves the largest fragment remaining in the Single Molecule Sketcher. +/- Increase/Decrease the charge amount of the atom. Space Open the atom label tool for the atom (in proprietary builds only).
When Bonds are Hovered
When a bond is hovered, the following shortcuts will be active. A bond is hovered if the mouse is close enough to the center of the bond such that the bond is encapsulated by two amber semicircles.
Digits Changes the bond's order to the digit. Only 1-3 work. 7 will change the bond to a protruding bond and 8 will change it to a recessed bond. Shift+Digits Adds a ring with number of sides equal to the digit pressed (3+) in the most optimal orientation. Delete/Backspace Removes the hovered bond. In the Single Molecule Sketcher, the bond is removed if and only if that bond is a member of a ring. f Flip the bond orientation.
When Shapes are Hovered
When a shape is hovered, the following shortcuts will be active. A shape is hovered if the mouse is close enough to the control points of the shape or over the shape such that the shape control points appear. These functions will only work in the Full Sketcher, because only the Full Sketcher allows shapes.
Delete/Backspace Removes the hovered shape.
These shortcuts will make it easier to work with the lasso tool. The functions are only available in the Full Sketcher.
Tab Select the next molecule. Shift+Tab Select the next shape. Space Empties the selection and starts the Single Bond tool. Delete/Backspace Removes the selected content. ←↑→↓ Arrow keys will nudge selected content.
Click the play button to watch an introduction video.Support
If the website implementing the web-based sketcher does not access iChemLabs services, then important functionality that you may benefit from is missing from their implementation. Please urge the providers of that service to contact us and provide users like you with premium services.
If you need help for any reason, please contact us.