Skip to content
Learn Motion
ExploreHow it worksMembership
Log in
Learn Motion

How AI Designs a Drug Molecule from Scratch

1Why Designing a Drug Molecule Is Hard2Turning Molecules into Something a Machine Can Read3How Generative Models Propose New Molecules4Scoring and Filtering the Candidates5Testing, Learning, and Improving the Design
Turning Molecules into Something a Machine Can Read

The Same Molecule as a Line of Text

2 / 4
Read the string as a walk. Start at the first letter and move to the next; each step is a bond. When you meet an opening parenthesis, you are stepping onto a side branch, and the closing parenthesis brings you back to where you left the main chain. A digit is a bookmark: the second time the same digit appears, those two atoms are joined, which is how a ring gets closed in a line of text. Now the important consequence. Because you may start the walk anywhere and go around a ring either way, one molecule has many valid strings. And because the text is only checked for form, not for chemistry, a string can be perfectly readable and still describe an atom with more bonds than it can hold.
0:00 / 0:00

A graph is convenient for a human and awkward for a model that reads sequences. SMILES solves that by flattening the graph into a string. The rules are few.

Atoms are written in order along a path through the molecule. A bond is implied between consecutive atoms unless stated otherwise. A branch is opened with an opening parenthesis and closed with a closing parenthesis, so the atoms inside the parentheses hang off the atom that precedes the opening parenthesis. A ring is written by labelling the two atoms that close it with the same digit, which tells the reader that those two atoms are bonded even though they are far apart in the string.

For ethanol, \(\mathrm{CCO}\), the string reads as a carbon bonded to a carbon bonded to an oxygen. For acetic acid, \(\mathrm{CC(=O)O}\), the third atom is a carbon that carries a branch: the \(\mathrm{=O}\) inside the parentheses is a double-bonded oxygen hanging off it, and the final \(\mathrm{O}\) continues the main chain. For benzene, \(\mathrm{c1ccccc1}\), the two \(\mathrm{1}\) labels close a six-membered ring; the lowercase letters signal aromatic carbons.

Two things follow. First, one molecule has many valid SMILES strings, because you may start the walk at any atom and go around a ring in either direction. Second, a string that looks perfectly well-formed can still describe something impossible, such as a carbon with five bonds — the syntax does not enforce the chemistry. Both facts matter later, when a model is asked to produce strings rather than read them.

References

  1. [1]SMILES — Wikipediaen.wikipedia.org
Previous2 / 4Next

Learn Motion

Generate a course. Learn it properly.

Operated by Wuhan Daoyin Technology Co., Ltd.

Contact: [email protected]
Privacy PolicyTerms of Service

© 2026 Learn Motion