Molecule

Molecule[{atom1,atom2,},{bond1,bond2,}]

represents a molecule with atoms atomi and bonds bondi.

Molecule["identifier"]

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

Molecule[Entity["Chemical",entity]]

gives a molecule corresponding to a chemical entity.

Molecule[Molecule[],{id1,id2,}]

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.
  • 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"
    IncludeHydrogensTruewhether 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.

Examples

open all close all

Basic Examples  (4)

Create a molecule from a list of atoms and bonds:

In[3]:=
Click for copyable input
Out[3]=

Create a molecule from a chemical Entity:

In[1]:=
Click for copyable input
Out[1]=

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

In[1]:=
Click for copyable input
Out[1]=

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

In[2]:=
Click for copyable input
Out[2]=

Create a Molecule from a SMILES string:

In[1]:=
Click for copyable input
Out[1]=

Options  (3)

Properties & Relations  (1)

Introduced in 2019
(12.0)