The Mobile Molecular DataSheet molecular structure editor relies extensively on use of templates. Template placement calls upon a variety of sophisticated placement algorithms to graft new structural fragments onto the existing structure. Several use-case scenarios of drawing with templates are described.

Overview

Starting with a Template

Building Ring Structures

Adding Functional Groups

Building Peptides

Metal Ligands

Summary

Overview


The Mobile Molecular DataSheet supports a variety of atom and bond construction techniques which can be accessed from button-bank menus or by touch gestures. While many molecular structures can be quickly drawn using only these techniques, most structures with any significant degree of complexity can be drawn more quickly by making use of the template system.

Before learning about templates, it is advisable to become familiar with the basics of structure drawing with MMDS: Introduction to Drawing (iPhone), Overview of Drawing Gestures (iPhone).

The template groups are accessed by selecting the Templates button from the molecule editor main command bank, which brings up a summary of each of the available template groups:

The template groups are each described by a miniature icon which is composed using the first 4 templates from within the group. More detail can be obtained by press-and-hold on any of the buttons, which will bring up the help text:

Selecting the Small Rings template group will bring up a list of all the templates from within the group:

Activating any of these template buttons will bring up the template fusion button bank:

In the above example, a benzene fragment has been placed at an arbitrary location on the screen. It is coloured in turquoise, which denotes that it has not yet been locked into place.

Template fusion mode consists of a collection of proposals for how the fragment could potentially be integrated into the existing structure. In the above example, the existing structure is blank, and so the new fragment is simply placed in the middle of the screen.

The proposals are ranked in order of most promising first. The best proposal is what is seen on the screen initially. Pressing the button with the arrow pointing to the right moves to the next proposal, which is the second most promising, and the arrow pointing to the left traverses in the opposite direction. When the best proposal has been selected, press the lock button, which will lock the template in place. This will add the atoms and bonds to the current structure. To cancel the template fusion, dismiss the button bank, by activating the grip with the cross mark.

NOTE: The Mobile Molecular DataSheet is provided with a collection of template groups, which are referred to in this document. When MMDS is installed, these templates are transferred into the user's working dataset, and can be edited just like normal datasheets: it is possible to add, modify, delete or reorder the templates within a group, as well as add new template groups. The default templates for MMDS are occasionally updated within the app itself, and when this happens, they are not automatically updated within your working dataset when you update your copy of MMDS. If the templates shown in this document do not match the templates on your device, you may need to open the main menu, select Configure, then select Restore Default Templates. This will reset all the template groups that are part of the default set, but it will not affect any new template groups that you may have created.

This article is written in the form of a tutorial, and illustrates several relevant case studies. For explicit details of how the template placement algorithm works, refer to the literature article:

Alex M. Clark: "Basic primitives for molecular diagram sketching", J. Cheminf. 2, 8 (2010) link

Starting with a Template


Very frequently when drawing a molecular structure, there is a core structural motif which is common enough to be included in a template library. For example, to start drawing using a steroid framework, open the Biomolecules template group, and select estrogen:

Because there are no atoms present, the default template placement proposal is based on copying the template to the centre of the screen, using the same orientation as found within the template datasheet. Additional proposals are generated by rotating the structure by increments of 15 degrees. Stepping through the list of possibilities before locking the template into place is a way to rotate the structure.

Building Ring Structures


Consider the following quinoxaline derivative:

There are a number of ways to build this structure quickly with MMDS, but the following sequence describes constructing it using one ring at a time. Start by opening up the Small Rings template group, and select the benzene fragment:

Tap on the vertical bond to the right to make it the current bond, then select the benzene template again:

The proposed template placement joins the template fragment with the current bond, as shown above. Note that this is a rare example of a case where there is just one proposed method of template placement. All alternative possibilities were considered ridiculous and were discarded. Therefore the arrows for selecting next and previous proposals are not shown.

Now pick one of the atoms in the beta position of the newly created naphthalene ring, and activate the benzene template again:

Because a single reference atom is provided, the template fusion method considers several possibilities, including adding a bridging bond rather than overlaying atoms. The proposal shown above is ranked as the most promising fusion structure, and it happens to be the desirable result.

Pick the naphthyl atom underneath the previous current atom, and activate the benzene template once again:

This time the default proposal is not what we want: if it were accepted, the above template fusion would convert the napthalene core into a phenanthrene ring block (one of the double bonds from the original naphthalene ring would be converted into a single bond). The reason why this option is favoured over the bridged structure that is sought after is due to atom proximity congestion being a factor in deciding which fusion modes are best.

To get to the fused structure that we want, step through the alternatives by activating the Next button:

Now a pendant 6:5 ring needs to be added, separated by a methylene linker. Draw two new bonds, and pick the terminal atom:

Activate the benzene template again, and accept the default placement:

Pick the bond to the far right, and activate the cyclopentadiene template:

Note the orientation of the double bond within the 5-membered ring: it happens to be placed in the desired position, but there is another proposed placement which has the alternate position.

To complete the structure, select the 4 heteroatoms and convert them to nitrogen:

Adding Functional Groups


Consider the following structure, which is composed of 2 phenyl rings and 3 moieties which are commonly referred to as functional groups:

Start the structure drawing by opening the Small Rings template group, and activating the benzene template. Pick a non-default orientation which features the hexagon with horizontal bonds. Pick the atom on the left:

Open the Functional Groups template group, and activate the cyano template:

Notice that the cyano icon features 3 nodes: N, C and X. The "X" atom is used as an optional template guide, which gives the template placement method a clue as to how the substituent is most likely to be placed:

As can be seen above, the "X" atom is superimposed on top of the current atom, and the desired orientation is presented as the one and only proposed placement.

Lock the cyano group in place, then select the aromatic carbon on the right hand side. Activate the sulfonic acid template:

The first placement is the desired one, although there are a number of suboptimal placements that can be examined by stepping through the list.

The next step is a bit more exotic: finishing the structure involves adding another 4-cyanophenyl moiety, and since we have already drawn one of these, it makes sense to reuse it. Select all of the atoms in the phenyl ring, and the substituent:

Use the main command bank, or the context bank, to Copy the selection to the clipboard. Because the selected atoms constitute a substructure that is attached to other atoms, the structure that is transferred to the clipboard is this:

Note the prominent "X" atom placeholder which substitutes for the disconnection site. When this structure is brought back from the clipboard, the placeholder will be used as a template guide, using exactly the same technique as for the predefined templates. Essentially we have defined a transient 4-cyanophenyl functional group template.

Clear the selection, pick the terminal oxygen atom on the right, and Paste the contents of the clipboard:

The first proposal is appropriate. Because the guide atom was stored in the clipboard fragment, the reattachment process is given a clue as to how the reconnection is most likely to work. Without the guide atom, the number of reasonable possibilities would be very large. In fact they are still generated, and can be stepped through using the arrow icons.

Building Peptides


Oligopeptides are often represented by a series of single-letter codes (e.g. CNGRCG), or a slightly more verbose string of three-letter codes, e.g. H-Cys-Asn-Gly-Arg-Cys-Gly-OH. The Amino Acids template group can be used to create 2D peptide structures very quickly and conveniently.

For a live demo, see Video Demo: Drawing an Oligopeptide.

To get started drawing a peptide structure, start with a blank structure, and open the Amino Acids template group:

As can be seen, the single-letter peptide codes are displayed on the command buttons for each of the templates. Also, the help text that is displayed for each button contains the name and 3-letter code, for reference purposes.

To create a small peptide such as ACD (H-Ala-Cys-Asp-OH), activate the first template and place the alanine (A) fragment as shown:

Pick the alpha carbon atom: it is important that this is the current atom, because it will be used to extend the chain.

Activate the cysteine (C) template, and accept the default placement:

The current atom has been automatically transferred to the new alpha carbonyl atom. This is a consequence of the template structure having two guide atoms, of which only one was used. The cystein template, oriented into position, is represented as:

The guide atom shown on the left was used to connect up with the carbonyl atom from the alanine fragment. The guide atom on the right was not connected to anything, and so its parent atom was used to define the new current atom.

To continue building, activate the aspartic acid (D) template:

Each new amino acid fragment addition involves two user actions: one to pick the template and another to confirm the placement orientation. Note that in some cases the 2D structure of a peptide can become highly congested, and so the desired placement may not be the first orientation, but it can be selected by stepping through the list.

For a linear peptide structure, the final carbonyl group will generally need a hydroxyl end-cap, which needs to be drawn manually.

Metal Ligands


Drawing of ligated metal complexes with precise geometry is often quite a difficult task. For a conventional desktop oriented sketcher interface, with the benefit of an accurate pointing device such as a mouse, it is often reasonably straightforward to achieve approximately the desired geometry. With MMDS, this luxury does not exist. Nonetheless, there are usually ways to draw an inorganic structure, which are quite convenient, and also very precise. The down side is that some creativity may be required.

Whenever possible, the placement algorithms of the template libraries should be exploited. Consider drawing the following platinum(II) structure:

One way is to start with a central platinum atom, and draw 4 emerging bonds at right angles. One way to do this is by opening the Bonds command bank and activating the Square Planar command four times:

Change two of the atoms into chlorine, then pick one of the other bonds:

Open the Monodentate Ligands group, and select trimethylphosphine:

The default template placement uses the guide atom to overlay on top of the current bond:

The second trimethylphosphine ligand can be added in the same way.

The square planar platinum complex is a simple example, but many metal complexes do not fall into a simple atom-centred geometry category, particularly those with multidentate ligands. A much greater challenge is presented by cyclopentadienyl ligands. Consider the following bimetallic structure:

Drawing this structure by hand is difficult under any circumstances, but with a little strategy, it can be accomplished with MMDS using only a few steps. Start by defining an iron atom, then using the Octahedral #1 command to create six equally spaced substituents:

Then select the top three and delete them:

Pick the iron atom, then open the Multidentate Ligands template group, and activate the cyclopentadienyl ligand:

The default placement is the desired orientation:

Note that the cyclopentadienyl ligand features a guide atom connected to all five of the aromatic carbon atoms, which is instrumental to providing an appropriate connection to the existing structure fragment.

Now open the Monodentate Ligands template group, and change two of the substituents into carbonyl ligands:

The last step is to duplicate the symmetrical structure, but first the substituent which is going to be used to connect the two icon atoms is not long enough to provide enough space. Pick the bond, and activate the Grow command several times to make it longer:

Once it is long enough, use the Select Other Side command to select every atom in the structure except for the terminal methyl:

Use the Copy command to copy the selected atoms onto the clipboard. Deselect the selected atoms, then make sure the iron-methyl bond is still current, and use the Paste command to bring in the symmetrical component:

The default placement is a good one, although depending on the length of the bond, other viable options may be available. Accept the placement to obtain the final structure.

Summary


Templates and the algorithms used to place them are an integral part of the molecular structure editor. Templates can be useful starting blocks, convenient drawing shortcuts, or essential features for drawing complex bonding geometries.

See Also


Annotated Screens (iPhone, iPad), Demonstration Videos, Introduction to Drawing (iPhone), Introduction to Reactions (iPhone), Introduction to SAR Table (iOS), Mobile Molecular DataSheet (iOS), Overview of Drawing Gestures (iPhone), Products