represents a molecule with atoms atomi and bonds bondi.


gives the molecule corresponding to the specified chemical name or SMILES string.


gives a molecule corresponding to a chemical entity.


attempts to give a molecule corresponding to an external identifier.


gives a molecule containing only atoms with indices idi, together with bonds between them.

Details and Options

  • Molecule[] evaluates, if possible, to the form Molecule[ atoms,bonds,].
  • Atoms can be specified in the following forms:
  • "sym"atom with atomic symbol "sym" (e.g. "C", "Cl")
    Entity["Element",element]atom of a given element
    Entity["Isotope",isotope]atom of the specified isotope
    Atom[elemspec,"prop""val",]atom with specified properties
  • Hydrogen atoms may be omitted from the atom list if their presence can be inferred from the valence and bonding of the atoms present.
  • Molecules created from an entity or chemical name will typically have all hydrogen atoms included explicitly. Molecules created from a "SMILES" identifier will contain only those hydrogen atoms explicitly in the input string.
  • Bonds can be entered as Bond[{id1,id2},type], where idi is an atom index and type is one of "Single", "Double", "Triple" or "Aromatic".
  • Possible options include:
  • AtomCoordinatesAutomaticthree-dimensional coordinates
    IncludeAromaticBondsTruewhether to mark bonds as "Aromatic"
    IncludeHydrogensAutomaticwhether to include hydrogens explicitly in the list of atoms
    MetaInformation<||>an association for user-supplied data
    StereochemistryElementsNonea list of associations specifying local stereochemical arrangement
    AtomDiagramCoordinatesAutomatictwo-dimensional coordinates
  • MoleculeQ[mol] gives True only if mol corresponds to a valid molecule expression.


open allclose all

Basic Examples  (4)

Create a molecule from a list of atoms and bonds:

Create a molecule from a chemical Entity:

Use "Element" and "Isotope" entities to populate the atom list:

The list of atoms has been converted to the canonical form:

Create a Molecule from a SMILES string:

Options  (5)

IncludeHydrogens  (3)

Create a Molecule from a SMILES string with implicit hydrogens:

Setting IncludeHydrogens to True will make all hydrogen atoms explicit:

These two expressions represent the same molecule and return the same property values:

But they have different atom counts:

Create a molecule with a mixture of explicit and implicit hydrogen atoms:

The "SMILES" property will contain the explicit hydrogens:

But the "CanonicalSMILES" will not:

A molecule created from a chemical name or Entity will have explicit hydrogens:

Use IncludeHydrogensFalse to make them implicit:

StereochemistryElements  (2)

Create a molecule with a defined stereocenter:

Find its absolute stereo configuration:

Create its enantiomer:

Find its absolute stereo configuration:

Create a molecule with defined geometry around a double bond:

Next, create its geometric isomer:

The geometry is reflected in the SMILES and InChI identifiers:

Properties & Relations  (1)

Create a Molecule from a Graph:

The identity of the atoms is assumed based on the number of connections; in this case, it correctly deduced this is octane:

Introduced in 2019
Updated in 2020