Search topics and sections

Chemical graph theory is the branch of mathematical chemistry that applies graph theory to molecules and chemical reactions.[1] It draws a molecule as a graph. Each atom becomes a point, called a vertex, and each chemical bond becomes a line, called an edge, joining two points.[2]

The graph keeps only which atoms are bonded to which. It lets chemists count the possible isomers of a formula and compute single numbers that track properties such as boiling point. It also lets them solve a simple quantum model of a molecule's electrons with matrix algebra.[1]

Molecules as graphs

A molecular graph stands for a molecule's structure: atoms are vertices and covalent bonds are edges.[2] Chemists and graph theorists use different words for the same ideas. The table pairs them.

Chemical term Graph term
Atom Vertex
Covalent bond Edge
Valency of an atom Degree of a vertex (number of edges at it)
Acyclic hydrocarbon Tree
Number of rings Cyclomatic number
Alternant structure Bipartite graph
Skeletal structure Hydrogen-depleted graph
Kekulé structure Perfect matching
Hückel energy level Eigenvalue of the adjacency matrix

The pairs come from a table by the chemist Alexandru Balaban.[2] Organic chemists usually work with hydrogen-depleted graphs, which leave out the hydrogen atoms and show only the skeleton.[2]

Butane and isobutane show why the graph matters. Both have the formula C₄H₁₀, but butane's carbons form a straight chain and isobutane's form a branched chain.[2] Compounds with the same formula but different bonding are constitutional isomers, and they have different graphs.

Butane and isobutane as hydrogen-depleted graphs Molecule Hydrogen-depleted graph CH3 CH2 CH2 CH3 Butane, C4H10 CH3 CH CH3 CH3 Isobutane, C4H10 Edge = bond Vertex = carbon atom
Butane (top) and isobutane (bottom) both have the formula C4H10C_4H_{10}. With the hydrogens removed, butane becomes a path on four vertices and isobutane becomes a star with one central vertex, and each graph has 3 edges.

Matrices and distances

Matrices turn a graph into numbers that a computer can handle. Number the vertices 1 to nn and build an n×nn \times n table for each kind of relation.

  • The adjacency matrix AA has entry Aij=1A_{ij} = 1 when atoms ii and jj are bonded and 0 otherwise. The sum of row ii is the degree of vertex ii.[2]
  • The distance d(i,j)d(i,j) is the number of edges on the shortest path from ii to jj, that is, the fewest bonds between the two atoms.[3]
  • The distance matrix DD holds all these distances. The sum of row ii is the distance sum sis_i of vertex ii.[2]

For butane, with its carbons numbered 1 to 4 along the chain, the two matrices are:

A=(0100101001010010),D=(0123101221013210)A = \begin{pmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{pmatrix}, \qquad D = \begin{pmatrix} 0 & 1 & 2 & 3 \\ 1 & 0 & 1 & 2 \\ 2 & 1 & 0 & 1 \\ 3 & 2 & 1 & 0 \end{pmatrix}

The row sums of AA are 1, 2, 2, 1, which are the degrees of the end and middle carbons. Most quantities in the rest of this page are built from AA, DD, or the degrees.

Counting isomers

Counting isomers was one of the earliest uses of graphs in chemistry. The task is to count all graphs that fit a formula and the valencies of its atoms.

Trees and alkanes

Alkanes have no rings, so their carbon skeletons are trees in which no vertex has degree above 4.[2] In 1874 Arthur Cayley drew alkane skeletons as trees and counted alkane isomers with generating functions, power series whose coefficients give the counts.[4] He gave counts up to 13 carbon atoms, but his results for the last two were later shown to be wrong.[4]

For small formulas the count can be checked by hand. Every tree with five vertices has degree at most 4, and there are exactly three such trees, so pentane (C₅H₁₂) has three carbon skeletons.

Carbon skeleton trees of the three pentane isomerspentane2-methylbutane2,2-dimethylpropane
The three isomers of C5H12C_5H_{12} match the three trees with 5 vertices: a path (pentane), a path with one branch (2-methylbutane), and a star (2,2-dimethylpropane). Each vertex is a carbon atom and each edge is a carbon-carbon bond.

Symmetry and Pólya's theorem

In the mid-1930s the mathematician George Pólya developed a general counting theorem, now called the Pólya enumeration theorem.[5] Its key tool is the cycle index, a polynomial that encodes a molecule's symmetry and its number of binding sites.[5] Replacing each variable of the cycle index with a sum that lists the possible substituents (the figure-counting series) gives a series whose coefficients count the distinct isomers.[2]

Listing, then pruning

Balaban described a two-step method he called the Sherlock Holmes principle. First, graph theory lists every structure that meets the mathematical conditions. Then chemical knowledge removes the impossible ones.[2]

His 1966 count of the valence isomers of benzene, (CH)₆, is an example. Valence isomers keep the same atoms but differ in how the shared electrons, and so the bonds, are distributed.[2] The enumeration gave six cubic multigraphs, graphs in which every vertex has degree 3 and two vertices may share more than one edge.[2]

One of the six is non-planar and is not an isolable molecule. The other five have all since been made in various laboratories, as plain or substituted compounds:[2]

  • benzene
  • Dewar benzene
  • benzvalene
  • benzprismane
  • bis-cyclopropenyl
Valence isomers of benzene as cubic graphs Planar cubic multigraphs with 6 vertices, (CH)6 benzene Dewar benzene benzvalene benzprismane bis-cyclopropenyl
The five valence isomers of benzene, (CH)6(\mathrm{CH})_6, drawn as planar cubic multigraphs on 6 carbon vertices. A double bond counts as two edges, so every vertex has degree 3.

Topological indices

What a topological index is

A topological index is a single number computed from a molecular graph. Haruo Hosoya coined the name in 1971 for his Z index. Today it covers countless graph invariants that are found, or claimed, to have chemical uses.[6]

Indices exist because properties and biological activities are numbers, while structures are graphs. To relate the two, one needs graph invariants, numbers that do not depend on how the vertices are labeled.[2] The indices below are built from vertex degrees, distances, matchings, or eigenvalues.

Wiener index

The Wiener index WW is the sum of the distances between all pairs of vertices:[7]

W(G)=∑{u,v}d(u,v)W(G) = \sum_{\{u,v\}} d(u,v)

Here the sum runs over every unordered pair of vertices u,vu, v of the graph GG, and d(u,v)d(u,v) is their distance. It equals half the sum of all entries of the distance matrix.

Wiener introduced this quantity in 1947 as the "path number" in a study of alkane boiling points.[7][3] His original definition differed slightly in form but was equivalent. Hosoya was the first to state it in terms of graph distances.[7]

Wiener used the path number together with a polarity number pp, the number of carbon pairs three bonds apart. His model compares each alkane with the straight-chain alkane that has the same number of carbons nn:[3]

Δt=kn2 Δw+b Δp\Delta t = \frac{k}{n^2}\,\Delta w + b\,\Delta p

Here Δt\Delta t is the difference in boiling point, Δw\Delta w and Δp\Delta p are the differences in path number and polarity number, and kk and bb are fitted constants. Wiener read a smaller path number as a more compact molecule, and argued that compactness lowers the boiling point.[3]

Mathematicians seem to have first studied the Wiener index only in 1976. Other names for it in the literature include "distance of a graph" and "transmission".[7]

Wiener index of butane and isobutane butane: W = 10 3 edges 1 2 3 4 (1,2) = 1 (2,3) = 1 (3,4) = 1 (1,3) = 2 (2,4) = 2 (1,4) = 3 1+1+1+2+2+3 = 10 isobutane: W = 9 a c b d (c,a) = 1 (c,b) = 1 (c,d) = 1 (a,b) = 2 (a,d) = 2 (b,d) = 2 1+1+1+2+2+2 = 9
Wiener index WW is the sum of shortest-path distances over all vertex pairs. Butane, a path of four carbons, has W=10W = 10, and the branched isomer isobutane has the smaller W=9W = 9.

Degree-based indices

Some indices use only the degrees dvd_v of the vertices. The two Zagreb indices first appeared in a 1972 study of total π-electron energy by Ivan Gutman and Nenad Trinajstić, where π electrons are the electrons in double bonds that can spread over several atoms.[8] They are:[8]

M1=∑vdv 2,M2=∑uv∈Edu dvM_1 = \sum_{v} d_v^{\,2}, \qquad M_2 = \sum_{uv \in E} d_u\, d_v

The first sum runs over all vertices and the second over all edges uvuv in the edge set EE. Both were soon seen as measures of molecular branching.[8]

In 1975 the chemist Milan Randić proposed a "branching index" for the carbon skeletons of saturated hydrocarbons:[9]

R=∑uv∈E1du dvR = \sum_{uv \in E} \frac{1}{\sqrt{d_u\, d_v}}

The Randić index correlates well with several alkane properties, including boiling points, chromatographic retention times, and enthalpies of formation.[9] In 1998 Béla Bollobás and Paul Erdős generalized it by replacing the exponent −12-\tfrac{1}{2} with any real number α\alpha.[9]

Hosoya index

A matching is a set of edges no two of which share a vertex. Let m(G,k)m(G,k) be the number of ways to choose kk such edges, with m(G,0)=1m(G,0) = 1. Hosoya's index is the total number of matchings:[6]

Z=∑k≥0m(G,k)Z = \sum_{k \ge 0} m(G,k)

Hosoya showed that ZZ correlates well with alkane properties, in particular boiling points.[6] The quantity was soon renamed the Hosoya index.[6]

Butane and isobutane compared

The table works out these indices for the two isomers of C₄H₁₀ from the definitions above.

Index Butane (chain) Isobutane (branched)
Wiener WW 10 9
Polarity number pp 1 0
First Zagreb M1M_1 10 12
Second Zagreb M2M_2 8 9
Randić RR 2+12≈1.914\sqrt{2} + \tfrac{1}{2} \approx 1.914 3≈1.732\sqrt{3} \approx 1.732
Hosoya ZZ 5 4

Branching lowers WW, RR, and ZZ and raises the Zagreb indices.

Other indices

Balaban introduced the index JJ in 1982. It resembles the Randić index but uses distance sums instead of degrees, averaged over the number of edges and rings.[2] For an infinitely long polyethylene chain, JJ tends to π=3.14159…\pi = 3.14159\ldots[2]

Later indices include the hyper-Wiener index and the Padmakar-Ivan index.

Uses in QSAR and QSPR

Topological indices are among the simplest tools for quantitative structure-activity relationships (QSAR) and quantitative structure-property relationships (QSPR).[2] These are statistical models that predict a compound's biological activity or physical property from its structure. Since testing compounds is expensive, such models help choose which ones to make.[2]

A 1998 search for immune-suppressing drugs used 13 descriptors (numbers computed from a structure), including four topological indices. The search narrowed in steps:[2]

  1. Allowed ranges for the descriptors cut the candidate decapeptides from about 250,000 to 25.
  2. Further calculations cut these to 5, which were made and tested.
  3. One of the five was 100 times more active than the starting compound.

More recent methods learn features straight from the molecular graph. Graph neural networks pass messages between neighboring atoms and combine them into a prediction for the whole molecule. A 2017 study grouped several such models into one framework, message passing neural networks, and reported state-of-the-art results on a molecular property benchmark.[10]

Graph spectra and Hückel theory

The eigenvalues of a graph's adjacency matrix are called its spectrum. The study of graphs through their spectra is spectral graph theory, and in chemistry it is tied closely to a classic quantum model.

The Hückel matrix

The Hückel method, developed in the 1930s and 1940s, describes the π electrons of conjugated hydrocarbons, molecules made of carbon and hydrogen with alternating single and double bonds.[11] Its Hückel graph has one vertex per carbon atom and plain edges for bonds, whether single or double.[11] The Hückel energy matrix HH is then:[11]

H=αIn+βAH = \alpha I_n + \beta A

Here InI_n is the n×nn \times n identity matrix, AA is the adjacency matrix of the Hückel graph, and α\alpha and β\beta are constants called the Coulomb and resonance integrals.[11]

It follows that each eigenvalue λj\lambda_j of AA gives one orbital energy:[11]

Ej=α+βλjE_j = \alpha + \beta \lambda_j

The molecular orbitals are the eigenvectors of AA. Computing Hückel orbitals is therefore the same task as computing a graph's spectrum.[11]

Hans Günthard and Hans Primas noted this link in 1956.[11] Dragoš Cvetković recalls that Ivan Gutman saw in 1971 that the two theories are essentially the same, and a paper in a mathematics journal then set this out clearly.[11]

Benzene as an example

Benzene's Hückel graph is a ring of six vertices. Its eigenvalues are 2, 1, 1, −1, −1, and −2, so the orbital energies are α+2β\alpha + 2\beta, α+β\alpha + \beta (twice), α−β\alpha - \beta (twice), and α−2β\alpha - 2\beta.[12] Both α\alpha and β\beta are negative, so α+2β\alpha + 2\beta is the lowest level.[12]

Benzene's six π electrons fill the three lowest orbitals in pairs. This gives a total π energy of 6α+8β6\alpha + 8\beta.[12]

Benzene Hückel graph and its π energy levels Benzene graph Energy β < 0 α + 2β (λ = 2) α + β (λ = 1) α α − β (λ = −1) α − 2β (λ = −2) Total π energy = 6α + 8β
The Hückel graph of benzene is a 6-cycle. Its adjacency eigenvalues λ=2,1,1,−1,−1,−2\lambda = 2, 1, 1, -1, -1, -2 give orbital energies α+λβ\alpha + \lambda\beta, and with β<0\beta < 0 the six π electrons fill the three lowest orbitals, so the total π energy is 6α+8β6\alpha + 8\beta.

Graph energy

In 1978 Gutman defined the energy of a graph as the sum of the absolute values of its eigenvalues:[13]

E(G)=∑i=1n∣λi∣E(G) = \sum_{i=1}^{n} |\lambda_i|

The idea came from Hückel theory. List the eigenvalues as λ1≥λ2≥⋯≥λn\lambda_1 \ge \lambda_2 \ge \dots \ge \lambda_n.[13]

For many molecular graphs, λn/2>0>λn/2+1\lambda_{n/2} > 0 > \lambda_{n/2+1} when nn is even, or λ(n+1)/2=0\lambda_{(n+1)/2} = 0 when nn is odd. For these graphs the Hückel total π-electron energy is:[13]

Eπ=nα+β E(G)E_\pi = n\alpha + \beta\, E(G)

For benzene, E=2+1+1+1+1+2=8E = 2+1+1+1+1+2 = 8, which gives 6α+8β6\alpha + 8\beta as above.

Gutman and Furtula's survey says that after 20 to 30 years of little attention, graph energy became a popular topic in both mathematical chemistry and pure spectral graph theory.[13]

Estrada index

The Estrada index uses the exponential of each eigenvalue instead of its absolute value:[14]

EE(G)=∑i=1neλiEE(G) = \sum_{i=1}^{n} e^{\lambda_i}

Ernesto Estrada published work on it in 2000 and later used it to measure how folded a protein chain is.[14] It has found uses in biochemistry and in the study of complex networks.[14]

Zero eigenvalues and nut graphs

In Hückel theory, a zero eigenvalue is a nonbonding level.[2] The number of zero eigenvalues is called the nullity of the graph. For bipartite (alternant) graphs, Cvetković notes that a zero in the spectrum means the molecule cannot have total electron spin zero, which points to chemical instability.[11]

A nut graph has exactly one zero eigenvalue, and the eigenvector for that zero eigenvalue has no zero entries. Nut graphs were introduced and first studied by Irene Sciriha and co-workers.[15]

A chemical nut graph is a nut graph that is connected and has no vertex of degree above 3. Its nonbonding orbital spreads over every carbon atom. A single electron in that orbital then gives radical reactivity at all carbon centers.[15]

Kekulé structures and matchings

A Kekulé structure draws a conjugated molecule with alternating single and double bonds. Its double bonds touch every carbon exactly once, so they form a perfect matching of the graph.[2] A six-vertex ring has exactly two perfect matchings, which are benzene's two Kekulé structures.

Two Kekulé structures of benzene as perfect matchings Two perfect matchings = two Kekulé structures
Benzene's carbon ring as a 6-vertex cycle graph. It has exactly two perfect matchings, and each one gives the three double bonds of one Kekulé structure.

Counting Kekulé structures is a classic problem. For the fibonacenes, a family of chain-like benzenoid hydrocarbons with kinked rings, the counts are Fibonacci numbers.[2]

Matchings also link the spectrum to the Hosoya index. The characteristic polynomial of a graph is ϕ(G;x)=det⁡(xI−A)\phi(G;x) = \det(xI - A), whose roots are the eigenvalues of AA. For a tree with nn vertices it can be written with matching counts:[6]

ϕ(G;x)=∑k≥0(−1)k m(G,k) xn−2k\phi(G;x) = \sum_{k \ge 0} (-1)^k\, m(G,k)\, x^{n-2k}

For butane this gives x4−3x2+1x^4 - 3x^2 + 1. For a general graph, the same right-hand side defines the matching polynomial, all of whose zeros are real.[6]

Matchings also fix the nullity of a tree. If qq is the largest number of edges in any matching of a tree with nn vertices, the tree's nullity is n−2qn - 2q.[11]

Other kinds of chemical graphs

A chemical graph can model any real or abstract chemical system, including a reaction scheme as well as a molecule.[1] Balaban lists several kinds besides molecular graphs:[2]

  • Reaction graphs (1966): vertices are the intermediates in a rearrangement, and edges are single reaction steps. For 1,2-shifts in a pentasubstituted ethyl cation, the graph is the 20-vertex Desargues-Levi graph when one carbon is labeled with an isotope. When the two carbons cannot be told apart, it is the 10-vertex Petersen graph.
  • Dualist graphs: vertices are the centers of rings in a benzenoid hydrocarbon, joined when two rings share a bond. They give simple codes for listing these molecules.
  • Synthon graphs (1980): vertices are the molecules in a multistep synthesis. All ways of assembling a chain of nn pieces form an (n−1)(n-1)-dimensional cube.
  • Resonance graphs: vertices are Kekulé structures.

Chemical questions have also fed back into pure graph theory. A cage is the smallest graph with every vertex of degree 3 whose shortest cycle has a given length.[2] Balaban found the first 10-cage (70 vertices) in 1972 and conjectured the 11-cage (112 vertices) in 1973, now called the Balaban 10-cage and Balaban 11-cage.[2]

Limits of the graph model

The plain molecular graph captures constitution, meaning which atoms are joined. Several kinds of information fall outside it.

  • Geometry. Stereoisomers have the same constitution but a different arrangement in space, so they share one graph.[2] Telling them apart needs symmetry in three dimensions, as in Balaban's isomer counts that include chirality.
  • Spectra do not identify graphs. In 1971 Balaban and Frank Harary pointed out that characteristic polynomials do not distinguish all non-isomorphic graphs, so different molecules can share a Hückel spectrum.[2]
  • Indices lose detail. Different graphs can share an index value, and Balaban designed JJ partly to reduce this.[2] Wagner and Gutman note that the name "topological index" covers countless invariants found, or only claimed, to have chemical uses.[6]

Some work extends the model into three dimensions. Erica Flapan's 2000 book When Topology Meets Chemistry uses knot theory and the topology of graphs embedded in space to study molecular chirality.[16]

History

Year Event
1874 Cayley uses trees to count alkane isomers.[4]
1878 James Joseph Sylvester uses "graph" in its modern sense for the first time, taking it from chemical diagrams.[17]
Mid-1930s Pólya develops his enumeration theorem.[5]
1930s to 1940s The Hückel method is developed for conjugated hydrocarbons.[11]
1947 Wiener introduces the path number.[7]
1956 Günthard and Primas note the link between Hückel theory and graph spectra.[11]
1966 Balaban begins his series "Chemical Graphs" (54 papers to 1991) and introduces reaction graphs.[2]
1971 Hosoya proposes the Z index and the name "topological index".[6]
1972 The Zagreb indices appear.[8]
1975 Randić proposes the branching index.[9]
1976 Balaban edits the book Chemical Applications of Graph Theory.[2]
1978 Gutman defines graph energy.[13]
1983 Trinajstić publishes Chemical Graph Theory; a second edition follows.[1]

In his 1878 note "Chemistry and Algebra" in Nature, Sylvester wrote that every invariant "becomes expressible by a graph precisely identical with a Kekulean diagram or chemicograph".[17] Graph theory thus took its basic word from chemical diagrams.[17]

References

  1. Chemical Graph Theory, 2nd edition (N. Trinajstić), CRC Press, 1992.
  2. Chemical Graph Theory and the Sherlock Holmes Principle (A. T. Balaban), HYLE International Journal for Philosophy of Chemistry, 2013.
  3. Revisiting a Classic Cheminformatics Paper: The Wiener Index (J. Monat), 2023.
  4. Chemical Graphs and Cambridge, Daylight Chemical Information Systems, 1998.
  5. Pólya's Combinatorial Method and the Isomer Enumeration Problem, Boletín de la Sociedad Chilena de Química, 2002.
  6. Maxima and Minima of the Hosoya Index and the Merrifield-Simmons Index (S. Wagner, I. Gutman), Acta Applicandae Mathematicae, 2010.
  7. Wiener Index of Hexagonal Systems (A. A. Dobrynin, I. Gutman, S. Klavžar, P. Žigert), Acta Applicandae Mathematicae, 2002.
  8. Estimating the Zagreb and the General Randić Indices, MATCH Communications in Mathematical and in Computer Chemistry, 2007.
  9. A Survey on the Randić Index (X. Li, Y. Shi), MATCH Communications in Mathematical and in Computer Chemistry, 2008.
  10. Neural Message Passing for Quantum Chemistry, arXiv, 2017.
  11. Spectral Graph Theory: Some Elementary but Important Results (D. Cvetković), Mathematical Institute SANU.
  12. Lecture 26: Qualitative Molecular Orbital Theory: Hückel Theory (R. Field), MIT OpenCourseWare, 2017.
  13. Survey of Graph Energies (I. Gutman, B. Furtula), Mathematics Interdisciplinary Research, 2017.
  14. On Estrada Index, MATCH Communications in Mathematical and in Computer Chemistry, 2008.
  15. Charting the Space of Chemical Nut Graphs, MATCH Communications in Mathematical and in Computer Chemistry, 2021.
  16. When Topology Meets Chemistry: A Topological Look at Molecular Chirality (E. Flapan), Cambridge University Press and Mathematical Association of America, 2000.
  17. Earliest Known Uses of Some of the Words of Mathematics (G), MacTutor History of Mathematics.

Figure