DEV Community

MolGod
MolGod

Posted on

From SMILES to a printable 3D model: how molecular models are prepared for 3D printing

Physical molecular models help students and researchers see geometry that flat structural formulas hide. This short guide describes the typical pipeline from a chemical identifier to a printable 3D model.

1. Start from a reliable identifier

Every substance can be pinned down with several identifiers: the CAS Registry Number, a SMILES string, an InChI and its hashed form, the InChIKey. For caffeine, for example, the CAS RN is 58-08-2. Using a CAS number together with a structure identifier avoids mixing up isomers and salts.

2. Generate 3D coordinates

A SMILES string only encodes connectivity. To get a 3D shape you need to:

  • add explicit hydrogens,
  • embed the molecule in 3D space (distance geometry or a similar method),
  • run a force-field optimisation to remove strained geometry,
  • check stereocenters against the source identifier.

3. Choose a representation

Ball-and-stick models show bonds clearly. Space-filling models show the van der Waals volume. For printing, ball-and-stick usually needs thicker bonds than the "real" proportions so the print stays sturdy.

4. Export and check the mesh

Export the geometry as STL, then verify that the mesh is watertight, that atoms overlap enough to be printed as one solid and that the model fits the printer bed. Scale so that the thinnest bond is at least a couple of nozzle widths thick.

5. Print and label

Print in a single colour or split by element for multi-colour printers. Label the model with the compound name and CAS number so it can be traced back to its record.

Ready-made examples

If you prefer to start from existing models, the MolGod caffeine 3D model page shows how a substance page can combine the CAS number, structure data and a print-ready STL file.

Questions or corrections are welcome in the comments.

Top comments (0)