TL;DR
A molecule is a set of atoms, each with a nuclear charge and a position in space. The Coulomb matrix packs those facts into a single square table of numbers: the diagonal holds a value for each atom, and the off-diagonal entries hold the electrostatic repulsion between each pair of nuclei. Because the table depends only on charges and distances, it gives a machine-learning model a fixed-size input that describes the molecule.
Where you'll see it: in fast machine-learning estimates of molecular energies, which replace expensive quantum calculations for screening large sets of candidate molecules.
Intuition
Describing a molecule to a computer
Suppose you want a program to predict how much energy it takes to pull a molecule apart into its atoms. A quantum calculation can answer that, but it is slow for thousands of molecules. A faster route is to learn the answer from examples, which requires turning each molecule into a list of numbers. The list must be the same length for every molecule, and it should not change if you rename the atoms or move the whole molecule across the room.
The Coulomb matrix meets these needs. Each atom contributes one row and one column. Its diagonal entry depends only on the atom's own nuclear charge, which fixes what element it is. Each off-diagonal entry describes a pair of atoms, and it is large when the two nuclei are highly charged and close together, because the electrostatic repulsion between them is strong. The matrix therefore carries both the chemistry (which elements) and the geometry (how far apart they are).
flowchart LR A[Atoms: nuclear charge Z and position R] --> B[Diagonal: a value from each atom's own charge] A --> C[Off-diagonal: Z_i Z_j divided by the distance between atoms i and j] B --> D[Coulomb matrix M] C --> D D --> E[Sort or take eigenvalues to remove the dependence on atom order] E --> F[Fixed-size input for a machine-learning model]
Removing the arbitrary labels
The raw matrix still has a problem. Numbering the atoms in a different order permutes its rows and columns, which gives a different-looking matrix for the same molecule. Two standard fixes solve this. One sorts the rows by their norm, and the other uses the eigenvalues of the matrix. Eigenvalues do not change when rows and columns are permuted together, so they make a clean description. Both fixes are shown in the worked examples.
The math
For a molecule with atoms, let be the nuclear charge of atom and its position. The Coulomb matrix is the matrix with entries
where is the distance between the two nuclei. Lengths are in atomic units, where one bohr is 0.529 Å (the size scale of a hydrogen atom), so that the off-diagonal entries are the Coulomb repulsion energies of the nuclei in atomic units.
Each symbol is defined in words. is the count of protons in the nucleus, such as 1 for hydrogen and 8 for oxygen. The exponent and the factor in the diagonal are empirical choices made by the original authors. They come from a fit to the energies of free atoms as a function of nuclear charge, so the diagonal grows with the charge of the atom and gives the matrix a sense of which element sits in each row. The off-diagonal term is the nuclear repulsion from Coulomb's law, because two positive nuclei repel each other with an energy proportional to the product of their charges and to the inverse of their distance.
Because is symmetric, its eigenvalues are real. The two standard descriptors built from are:
- the sorted Coulomb matrix, whose rows are reordered by decreasing norm (the length of each row), giving one fixed ordering; and
- the eigenvalue spectrum, the list of eigenvalues of sorted from largest to smallest, which does not change under any relabelling of atoms (Eigenvalues and Eigenvectors).
A model is then trained to map a descriptor to a molecular property, most often the atomization energy, the energy needed to separate a molecule into isolated atoms (see Atomization Energy). A common choice is Kernel Ridge Regression.
Worked examples
Take H: two hydrogen atoms with , separated by 1.4 bohr.
- Diagonal: .
- Off-diagonal: .
- The matrix is .
- For a matrix of the form the eigenvalues are and . Here they are and .
- Swapping the labels of the two hydrogens gives the same matrix, so the eigenvalues are the same, as they must be.
Interpretation: a molecule with two identical atoms gives a symmetric matrix whose eigenvalues do not depend on which atom is called 1. The eigenvalue list is a compact, relabelling-proof description of the molecule.
Take HO with O–H distance 0.96 Å, which is 1.81 bohr, and H–H distance about 2.86 bohr. Order the atoms as O, H, H. Oxygen has , hydrogen .
- Diagonal for oxygen: , so .
- Diagonal for each hydrogen: .
- Oxygen to hydrogen: .
- Hydrogen to hydrogen: .
- The full matrix is .
- The vector is an eigenvector with eigenvalue .
- In the subspace of vectors the matrix reduces to , whose eigenvalues are about and .
- The spectrum is therefore about , and . Its trace, , equals the sum of the diagonal entries, as a check.
Interpretation: the largest eigenvalue is dominated by the oxygen's large charge, so it encodes the presence of a heavy atom. The two small eigenvalues carry the hydrogen–hydrogen and hydrogen–oxygen geometry. This spectrum is the kind of fixed input a model would receive for water.
Use the water numbers from Example 2, but list the atoms in the order H, O, H, as a file might.
- Each entry stays the same but moves with its atoms, so the raw matrix is . It looks different from Example 2's matrix even though the molecule is the same.
- Row norms: the first row is . The second row is . The third row is again about .
- Sort by decreasing norm: oxygen (73.8) first, then the two hydrogens (4.46 each, interchangeable). Reorder rows and columns together in that order.
- The result is exactly the matrix of Example 2, so any listing of the atoms gives the same sorted matrix.
- Reordering rows and columns together does not change the eigenvalues, so the raw matrix also has the spectrum , , .
Interpretation: both the sorted matrix and the eigenvalue spectrum remove the arbitrary atom order, so a model sees the same input for the same molecule every time. For a real screening study, a model is trained on molecules with computed atomization energies and then predicts energies for molecules not yet calculated. Its accuracy depends on the training set and the descriptor, which is why the choice of descriptor is an active research question.
Tradeoffs and failure modes
| Situation | What goes wrong | Better choice |
|---|---|---|
| Using the raw matrix without sorting or eigenvalues | Atom order changes the input, so the same molecule gets different predictions | Use the sorted matrix or the eigenvalue spectrum |
| Molecules of different sizes | The matrix size changes with the number of atoms, which a fixed model cannot accept directly | Pad to a fixed maximum size, or use a descriptor whose length does not depend on |
| Predicting properties far from the training set | Models built on geometry can fail for structures they have not seen | Include diverse training molecules, and check uncertainty before trusting a prediction |
| Ignoring electrons | The descriptor uses nuclear charges only, so it misses electronic structure such as bond order | Use richer descriptors or quantum calculations for properties that depend on electrons |
| Choosing the diagonal scaling without checking | A different exponent changes how heavy atoms are weighted | Test the exponent on validation data, rather than assuming the published value |
A common mistake is to think the matrix is a physical quantity. It is a descriptor, built from Coulomb's law, that is convenient for learning. Another is to forget that eigenvalues can be sensitive to small changes in geometry, so models built on them need smooth, well-sampled training data.
History
The matrix was introduced in 2012 by Matthias Rupp, Alexandre Tkatchenko, Klaus-Robert Müller and O. Anatole von Lilienfeld. They used it with kernel ridge regression to predict atomization energies of small organic molecules, and reported accurate predictions from a relatively small training set. The paper showed that a simple, physically motivated descriptor could give useful accuracy without solving the quantum problem for each new molecule. The idea spread quickly through computational chemistry, and related descriptors built on the same idea of pairwise electrostatics followed it.
Recap
The Coulomb matrix describes a molecule by its nuclear charges and interatomic distances. Its diagonal encodes each atom, and its off-diagonal entries encode the pairwise repulsion. To use it as a fixed input, sort the rows or take the eigenvalue spectrum, which removes the dependence on atom order. A regression model such as kernel ridge regression then maps this descriptor to a property, such as the atomization energy. The method rests on Coulomb's Law and Eigenvalues and Eigenvectors, and it is a practical bridge between quantum chemistry and the Schrödinger equation on one side and density functional calculations on the other.
Check yourself
QuestionRecall: what does an off-diagonal entry of the Coulomb matrix represent, and what does the diagonal entry depend on?Show answer
An off-diagonal entry is the Coulomb repulsion between the nuclei of atoms and , equal to divided by their distance. The diagonal entry depends only on the atom's own nuclear charge, through .
QuestionComputation: for H with the two atoms 1.4 bohr apart, what are the two eigenvalues of the Coulomb matrix?Show answer
The matrix is . Its eigenvalues are and .
QuestionWhy does a model need a relabelling-invariant descriptor, and why are the eigenvalues a good choice?Show answer
A molecule has no natural atom numbering, so the raw matrix changes whenever atoms are listed in a different order, while the molecule does not. The eigenvalues do not change under a simultaneous permutation of rows and columns, so the spectrum is the same for every labelling of the same molecule. That makes it a valid input for a model.
QuestionApplied scenario: a team wants to screen a million candidate molecules, and a quantum calculation takes hours per molecule. Why would they use a Coulomb-matrix model, and what must they check before trusting it?Show answer
A trained model gives a prediction in a fraction of a second, which makes screening feasible. Before trusting it, they should check that the candidate molecules resemble the training set, because the model can be unreliable on structures it has not seen. They should validate predictions on held-out molecules and, for the most promising candidates, confirm with an actual quantum calculation.