In SMILES, rings are represented by numbers that show where the ring opens and closes.
The same number indicates start and end of a ring.
Example:
C1CCCCC1 → forms a 6-membered carbon ring (cyclohexane).
The “1” after the first C means “start of ring 1,”
and the “1” after the last C means “end of ring 1.
Let’s show this step-by-step in RDKit with simple examples.
Cyclopropane (Figure 1)
Code:
cyclopropane = Chem.MolFromSmiles("C1CC1")
cyclopropane
Figure 1: Structure of Cyclopropane.
2. Cyclobutane (Figure 2)
Code:
cyclobutane = Chem.MolFromSmiles("C1CCC1")
cyclobutane
Figure 2: Structure of Cyclobutane.
3. Cyclopentane (Figure 3)
Code:
cyclopentane = Chem.MolFromSmiles("C1CCCC1")
cyclopentane
Figure 3: Structure of Cyclopentane.
4. Cyclohexene (Figure 4), A 6-membered ring with a double bond.
The “=” indicates a double bond between C2 and C3.
Code:
cyclohexene = Chem.MolFromSmiles("C1C=CCCC1")
cyclohexene
Figure 4: Structure of Cyclohexene.
5. Cyclohexanol (Figure 5). The O in parentheses means the OH group branches off one of the carbons in the ring.
Code:
cyclohexanol = Chem.MolFromSmiles("C1CC(O)CCC1")
cyclohexanol
Figure 5: Structure of Cyclohexanol
6. Benzene (Figure 6). Lowercase “c” indicates aromatic carbon atoms
Code:
Benzene = Chem.MolFromSmiles("c1ccccc1")
Benzene
Figure 6: Structure of Benzene
7. Naphthalene (Figure 7). Two fused benzene rings. The numbers 1 and 2 below mark two ring closures, showing how rings can share atoms.
Code:
naphthalene = Chem.MolFromSmiles("c1ccc2ccccc2c1")
naphthalene
Figure 7: Structure of Naphthalene
8. Pyridine (Figure 8). A six-membered aromatic ring with one nitrogen.
Code:
pyridine = Chem.MolFromSmiles("c1ccncc1")
pyridine
Figure 7: Structure of Pyridine