Generic Labels and R-Groups
To draw a general alcohol, R-OH, you need an atom that means “any substituent”. A generic label is that kind of placeholder atom: an R for “any substituent”, an X for a halogen or leaving group, Nu for a nucleophile, A, X and E for VSEPR’s AXnEm notation, and so on. Molkit stores a placeholder as a special pseudo-atom, not as a carbon with a label, so a drawing such as H-X is never read as methane.
Placing a placeholder
The element column on the right edge of the canvas has R (tooltip “Generic substituent (R)”) and X (tooltip “Generic leaving group (X)”) buttons, and a More ▸ button (tooltip “More generic groups…”) for the rest. Pick one, then place it the same way you place an element; see Atoms and Elements.
The More ▸ flyout lists these placeholders:
- A, R, X, Y, Z, Nu, E, LG, Ar, Het, M, Q, G, D
- Nu⁻, E⁺ and [M] as single entries
Each of the first group opens a submenu of index forms: the bare label, one and two primes (R′, R″), subscripts 1 to 3 (R₁, R₂, R₃) and superscripts 1 to 3 (R¹, R², R³). The index is drawn as a true subscript or superscript next to the base letter.
Some placeholders share a symbol with a real element: Y (yttrium), Ar (argon, used here for “aryl”) and D (deuterium). Choosing them from the flyout marks them as placeholders on purpose.
You can also hover an atom and type a placeholder letter such as R, X, A or R1. It becomes the same generic placeholder the buttons create. Y is the exception: typed, it means yttrium, so pick Y from the flyout when you want the placeholder.
Converting an existing atom
Right-click a single atom and choose Convert to generic group to turn it into a placeholder. It keeps its custom label if it has one, and otherwise becomes R. On a placeholder, Convert to regular atom turns it back into carbon. Both are single undo steps.
To turn toluene into a general alkylbenzene, draw toluene, right-click the methyl carbon, and choose Convert to generic group. The methyl becomes R, the ring keeps its implicit hydrogens, and the status-bar formula readout goes blank because the structure no longer has a definite formula.
Older files
Earlier versions of Molkit stored placeholders as carbon atoms with a text label. When you open such a file, a carbon labelled A, R, X, Z, Nu, E, LG, Het, M, Q or G, or an R with an index (R1, R′, R₁, R¹), is converted to a placeholder. Labels that are also element symbols (Y, Ar, D) are left alone, so a real argon atom is never changed. A is on the list so that a drawn AX2E2 is read as a VSEPR formula, with no carbon at its centre.
How Molkit’s chemistry treats placeholders
A placeholder stands for something unspecified, so Molkit does not guess its properties:
- It has no valence, formal charge, oxidation state, lone pairs, hybridization or geometry, and it takes no implicit hydrogens. See Geometry and Hybridization.
- Validation does not check its bonds or charge.
- A structure containing one has no molecular formula or weight.
- A structure containing one cannot be shown in the 3D viewer, which explains that 3D is unavailable for generic groups because their geometry is undefined, and gets no net dipole arrow.
The atoms around a placeholder are still treated normally, so a carbon bonded to R still gets its implicit hydrogens.
Defining what an R-group stands for
You can record which substituents a placeholder represents, for example “where R = Me, Et, Ph”. Right-click a placeholder and choose Define R-groups…, or choose File > Define R-groups… to edit every placeholder on the canvas (or the selected ones) at once.
The Define R-groups dialog has one card per placeholder atom:
- Type in the field “Add a substituent (type to filter: Me, Et, Ph…)” to pick from Molkit’s abbreviation library, or enter a SMILES string in “…or a custom SMILES” and click Add. A custom SMILES needs a
[*]at the attachment point to be usable as a full structure; without one it is kept as a legend entry only. - The card shows a legend such as “where R = Me, Et” as you add members. One member is marked fixed; two or more are marked Markush family.
- Each placeholder atom has its own list. Two R atoms on the canvas are independent, even in the same molecule. When several share a label, each card names the atoms it is bonded to, and ⌖ Locate selects that atom on the canvas.
- Click Save to store the lists. The whole save is one undo step.
The definitions are saved with the atom and written into SVG exports, so the Molkit structure widget and other tools can show the legend or the individual family members.
Saving your own substituent
To add a substituent that is not in the library, draw it, select the whole fragment, and mark where it attaches: either draw a point-of-attachment squiggle across the attaching bond (see Squiggle tool) or right-click the attaching atom. Then right-click inside the selection and choose Save as R-group substituent, and give it a name in the Save R-group substituent dialog. It then appears in the picker of the Define R-groups dialog. An R-group has exactly one attachment point, so a fragment with two squiggles is rejected.