TOPICS
Search

Molecular Graph


A molecular graph, also called a chemical graph, is a graph representing the connectivity of a molecule, with vertices corresponding to atoms and edges corresponding to chemical bonds. Labels on the vertices specify atom types, while labels on the edges specify bond types or orders (IUPAC 2025b). A double or triple bond can thus be represented by a single graph edge carrying the appropriate bond label.

Two representations describe the same labeled connectivity when a graph isomorphism between them preserves the atom and bond labels as well as the adjacency relation. The connectivity alone does not specify bond lengths, bond angles, or the positions of atoms in three-dimensional space. Additional geometric information is needed to specify a spatial molecular structure (IUPAC 2025a).

Hydrogen atoms may be included explicitly or omitted to obtain a hydrogen-suppressed representation. In particular, omitting hydrogen atoms from an alkane graph leaves a tree of carbon atoms with maximum vertex degree at most 4. For example, butane and isobutane both have composition C_4H_(10), but their hydrogen-suppressed representations are the path graph P_4 and the star graph K_(1,3), respectively. These graphs are not isomorphic.

Topological indices, such as the Wiener index and the molecular topological index, provide numerical descriptors of molecular connectivity. The choice of whether to include hydrogen atoms must be specified when comparing their values. For the hydrogen-suppressed butane and isobutane representations, the Wiener index values are W(P_4)=10 and W(K_(1,3))=9, respectively.

The Wolfram Language represents molecules using Molecule[...], and their connectivity graphs can be obtained using MoleculeGraph[mol]. The latter includes all hydrogen atoms by default. The call MoleculeGraph[mol, IncludeHydrogens -> None] produces the hydrogen-suppressed representation.


See also

Alkane Graph, Graph, Graph Isomorphism, Molecular Topological Index, Topological Index, Wiener Index

Explore with Wolfram|Alpha

References

IUPAC. "3D Structure Generation." In Compendium of Chemical Terminology, 5th ed. 2025a. https://doi.org/10.1351/goldbook.11403.IUPAC. "Molecular Graph." In Compendium of Chemical Terminology, 5th ed. 2025b. https://doi.org/10.1351/goldbook.MT07069.

Cite this as:

Weisstein, Eric W. "Molecular Graph." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/MolecularGraph.html

Subject classifications