Drawing and Editing Structures

  • Updated
Download Icon Download

Use the Structure Editor within STNext to draw and edit structures; the below videos demonstrate using the Structure Editor and its features:


Drawing Reaction Structure Queries

A reaction structure query will retrieve reactions that include the reactants, reagents, or products that you draw, either as complete structures, or as substructures. You can apply substructure query features to narrow or broaden the search for the substructures embedded in the substances matched.

Other query features are specific to reaction structure queries and are used to focus the search on the reaction transformation:

Specifying Reaction Roles

You can specify the reaction roles of the structures by drawing a reaction arrow.

  1. Draw the structures or fragments, and then click the Reaction Arrow rxn_arrow.png icon.
  2. Click or drag the cursor in the drawing area to draw the reaction arrow.

    Structures to the left of the arrow are assigned as reactants.
    Structures to the right of the arrow are assigned as products.

Alternatively, you can define the reaction role for each structure as product, reactant, reagent, reactant/reagent, or any role.

  1. Draw the structures or fragments, and then click the Reaction Role CASDraw-ReactionRole.png icon.
  2. Click the structure or fragment, and then select the specific role from the menu that appears.


  3. Click OK.


    The reaction role appears below the structures or fragments.

Marking Reaction Sites

Mark bonds that are changed (broken, formed, or change bond order) in the reaction.

  1. Draw the reaction, and then click the Mark Bonds mark_bonds.png icon.
  2. Click the bond(s) to mark the reaction site.


    The bonds are marked with a double line.
    To remove the reaction site, click the marked bond again.

Mapping Atom Pairs

Specify corresponding pairs of atoms present in the reactant and product.

  1. Draw the reaction, and then click the Map Atoms map_atom.png icon.
  2. Click the atom in the reactant, and then click the atom in the product.


    Map numbers appear on the atom pair.

Tip: Mapping atom pairs can significantly narrow your search results. Start by mapping the minimum number of atom pairs needed to focus your query.

Specifying a Substance by Functional Group

Instead of drawing a specific structure, you can represent a reactant, reagent, or product by a functional group term (e.g., Acyclic Ketone).

  1. Click the Functional Group funcgp.png icon. The Functional Groups dialog box appears.


  2. Click a functional group class to expand it.


    Select the class term (e.g., ALKYNES) or select a specific term (e.g., pi-Alkyne).

    Alternatively, you can start typing the functional group term into the text box. When you have entered at least three characters, the Structure Editor will display matching terms.


  3. Click the functional group term to select it.
  4. Click the drawing area to place the term.
  5. Specify the reaction role for the term by drawing a reaction arrow or by clicking the Reaction Role CASDraw-ReactionRole.png icon.

Drawing Substructure Queries

Substructure match displays substances that contain the structure query embedded within the chemical structure. Unless specified otherwise, the substructure must appear as drawn, and any substituent is allowed at any open atom position.


You can apply substructure query features to broaden or narrow your query:

Variable Atoms

Instead of requiring a specific atom at a particular site, you can use a variable to specify a generic atom type, such as X for "any halogen", or A for "any atom except hydrogen."


  1. Click the Variables variable.png icon.
  2. Click the variable atom type.


  3. Click the atom site on the structure where you want to place the variable.


  • Ak represents any carbon chain. The Ak group cannot be attached to another Ak group, including those within R-groups or repeating groups.
  • Ak only works when placed in a terminal position when searching DCR.
  • Cy represents any ring system of any size or composition, single or fused ring systems. Cy encompasses both Cb and Hy.
  • Cb is a subset of Cy and includes only carbon atoms.
  • Hy is a subset of Cy and includes at least one non-carbon atom.
  • Id is a generic node used to:
    • Show the SRU (Structural Repeating Unit) endpoints.


    • Define an ID molform.


    • Search for incompletely defined substances.


Derwent Superatoms

The Derwent Markush Resource (file DWPIM) includes 22 different generic nodes (also called superatoms) which allow for precise Markush structure searches. Even though they are unique to DWPIM, they are seamlessly integrated into the existing STN node hierarchy to enable a single structure (containing STN nodes) to be searched in all structure databases.

Overall, these superatoms represent:

  • Chemically defined open sets (e.g., Alkyl defines the superatom CHK [Carbon Chains, Carbocycles and Heterocycles])
  • Chemically defined closed sets (e.g., Alkali and alkaline earth metal defines the superatom AMX [Metals])
  • Set defined by a property (e.g., Polymer end group defines the superatom PEG [Miscellaneous])

They can be accessed in the structure editor:

  1. Click the Variables variable.png icon.
  2. Click the Derwent (DWPIM/DCR) generic nodes tab, and then click a category to expand it (in this example, Heterocycles).

    Note: In STNext, the Derwent superatoms are only applicable to DWPIM and not to DCR. The superatom HAL (halogens) and MX (metals) are not separately listed since they match to the corresponding STN nodes X and M, respectively).


For more detailed information on Derwent superatoms, please consult the DWPIM Reference Manual.


An R-group can contain atoms, variable atoms, shortcuts (functional groups), or fragments.

Note: An attachment point may be added to an R-group node.


  1. Click the R-group rgroup.png tool. The R-group Definitions dialog box appears.


  2. Select and then define an R-group (e.g., R1) using one of the methods described below. Note: Non-fragment R-group definitions will match what is set in Preferences.


    • Select one or more atoms from the Atoms periodic table menu.


    • Select one or more variables from the Variables menu. (If necessary, click the arrow to open the Variables section.)


    • Select one or more structure shortcuts from the Shortcuts menu. (If necessary, click the arrow to open the Shortcuts section.)


    • Select one or more structure fragments from the Fragments menu. (If necessary, click the arrow to open the Fragments section.)


      Fragments are drawn in the Structure Editor window and attachment points are assigned using the Fn fn.png tool. A fragment cannot have more than two attachment points.

      Or, type the symbols into the R-group field, separated by commas.


  3. To assign an R-group to the query structure, click the R-group (e.g., R2) in the R-group Definitions dialog box, and then click the atom site on the core structure.


  4. Repeat Step 3 until all the R-groups are assigned, and then click the X in the upper-right corner.


  • The generic groups Ak, Cb, Cy, and Hy are not allowed in rings or in R-groups that are placed in rings.
  • A maximum of 20 R-groups can be defined and included in a structure and an R-group can contain a maximum of 20 atoms, shortcuts, variables, or fragments.
  • The R-group designation (e.g., R2 ) appears in the Current Atom box and becomes the default atom until changed.
  • A fragment cannot have more than two attachment points.

R-group Attributes

When you define an R-group in STNext and use Variables, Atoms, or Shortcuts from the R-group Definitions window, the Markush Match Level and Element Count attributes will correspond to the defaults set in the Structure Editor preferences.

_STNext-StructureEditor-RgroupDefinitionsWindow.png _STNext-StructureEditorPreferences-Markush.png
When you mouse over the R-group node, no Attribute Values are highlighted in the right-hand column (and if you right-click, you see a message saying R-groups do not have attributes assigned to them).

However, if you create fragments, and then assign them to the R-group per the usual method, you may assign/edit the attributes by right-clicking the node. The R-group's current attributes are then highlighted on the right.

Unspecified Bond Type

You can apply an unspecified bond type to your substructure query. In the search, the unspecified bond sites will be matched by any type of bond.


  1. Click the Unspecified Bond unspecified.png tool in the Bonds palette.


  2. Click the bonds in the query that you want to allow to vary.

Repeating Groups

A repeating group within a substructure query allows the atoms in the group to repeat a specified number of times. The repeating group can consist of atoms, shortcuts, or variables.


  1. Click the Repeating Group repeating.png icon.
  2. Click to select an atom to be repeated, or click-and-drag to select a group of atoms and bonds to be repeated.


  3. The Information Bar changes to include From and To fields. Enter numeric values in these locations to specify the number of repetitions, and then click the Apply button.



  • The number of repetitions can be a single value or a range (0-20).
  • Any type of substitution placed on the atoms in the repeating group will also apply to each repeating unit retrieved.
  • There must be exactly two bonds to atoms outside the repeating group.
  • Repeating groups can be adjacent to each other when connected by a bond.
  • Stereo bonds cannot be included in a repeating group.
  • Bonds cannot join directly to Ak atoms.
  • The repeating group can be an atom or series of atoms in a ring or chain.
  • Molecular formula and weight do not display when the number of repetitions is stated as a range.

To Change the Number of Repetitions

  1. Click the Repeating Group repeating.png icon.
  2. Place your cursor on any portion of the repeating group structure, the bracket, or the repetition value. When the repeating group is highlighted, click to select it.
  3. Enter the new values in the From and To fields on the Information Bar.
  4. Click the Apply button.

To Remove a Repeating Group

  1. Click the Eraser eraser.png icon.
  2. Click a repeating group bracket or the repetition value.

Variable Attachment Points

The Variable Attachment Point tool is used to specify multiple positions on a ring system where a substituent can attach.


  1. Click the Variable Attachment Point vpa.png icon.
  2. Click-and-drag your cursor from the substituent (unattached atom) to a position on the ring to create an attachment line.


  3. (Optional) You can click the Marquee marquee.png icon to move the variable point of attachment to a new location for easier viewing.

Component Characteristics
Substituent Atoms

Can be:

  • A single atom or an atom in a larger fragment.
  • Or contain an element, variable, shortcut, R-group with no additional attachments, or repeating group.
  • Locked to prevent additional substitution.


  • Have variable attachments to more than one ring system.
  • Be part of a repeating group.
  • Have the substituent for a variable point of attachment contain the ring attachment for a different variable point of attachment.
Variable Attachment Atoms

Can be:

  • A single atom or an atom in a larger fragment.
  • Or contain a non-metal element or the X, Q, or A variables.
  • Locked to prevent additional substitution.


  • Be a shortcut, a metal atom, or the M, Ak, Cb, Cy, or Hy variables.
  • Have an atom in a Repeating group selected as part of the variable point of attachment.
  • Have the substituent for a variable point of attachment contain the ring attachment for a different variable point of attachment.
Variable Attachment Bonds
  • Can be a single, double, triple, or unspecified bond.
  • Cannot be a stereo bond.
Core Structure
  • One or more substituents can be variably attached to the same atoms in the ring system.
  • No more than 20 total substituents can be variably attached to an individual ring system.

To Remove a Variable Attachment Point

  1. Click the Eraser eraser.png icon.
  2. To remove one of the ring attachments, click the individual dashed line.


  3. To remove the entire variable, click the substituent (attached atom). To remove the bond line, dashed line, or asterisk, click the individual components.


Locking Atoms

The Lock Atoms tool is used to block additional substitution at an atom site. You can lock any number of atom sites within a structure. Terminal shortcuts (e.g., Me) are locked by definition.


  1. Click the Lock Atoms lockatoms.png icon.
  2. Click the atom that you want to lock. A box appears around the atom indicating that it is blocked from substitution.

To Remove Lock Atoms

  1. Click the Lock Atoms lockatoms.png icon.
  2. Click the locked atom. The box is removed indicating that substitution is allowed at the atom site.

Locking Rings

The Lock Rings tool is used to control ring formation in ring systems and chains. Apply this feature when you want to eliminate search answers in which fragments drawn as chains are included in rings, or additional rings are fused to drawn ring systems.


  1. Click the Lock Rings lockrings.png icon.
  2. Click any segment of the ring system or the chain. The entire ring system or chain changes to bold highlighting, indicating that it is locked from ring fusion or ring formation.

To Remove Lock Rings

  1. Click the Lock Rings lockrings.png icon.
  2. Click any segment of the locked ring system or chain. The bold highlighting on the ring system or chain is removed, indicating that fusion or ring formation is allowed.

Non-Hydrogen Counts

The non-hydrogen count is the number of non-hydrogen atoms attached to a specific atom (node). Existing connections are considered (e.g., every carbon atom in a cyclohexane ring has a non-hydrogen attachment count of 2, specifically 2 Ring non-hydrogen attachments.)

You can allow for or force substitution in a CSS (closed substructure search) or SSS (substructure search) by altering the non-hydrogen count of one or more atom nodes.

In the query structure below, the blue highlighted node is connected to two other carbon atoms with ring attachments, so its non-hydrogen count is Ring: 2. Note: A node's bond value does not contribute to the non-hydrogen count value (e.g., the blue-highlighted node has one single and one double bond, but the non-hydrogen value is still Ring: 2.)


If we right-click on the node, click Non-Hydrogen Count, and then set the count to a minimum of Ring/Chain: 2, we will also be able to retrieve substances with a substituent at this position.



Note: This value should not contradict (and therefore must include) the number and type of connections drawn in the structure query.

DWIPM Reference Manual