Look at a molecule for a second. Not the ball-and-stick model from chemistry class — the actual thing your eye lands on. Dots connected by lines. Carbon here, oxygen there, a bond running between them.

That picture is not a metaphor. It is, quite literally, the data structure. A molecule is a graph: atoms are the nodes, bonds are the edges. And the moment you take that seriously, a whole family of drug-discovery models stops being mysterious and starts being obvious.

The old way: describe the molecule, then guess

For a long time, if you wanted a computer to predict something about a molecule — is it soluble, is it toxic, will it stick to this protein — you first had to describe it. You’d run the structure through a fixed recipe that turned it into a long list of numbers: does it contain this ring, how many of that group, what’s the count of these little substructures. Chemists call these fingerprints and descriptors, and they were hand-designed by people who knew chemistry well.

Then you’d hand that list of numbers to a model and ask it to find the pattern.

It works. It’s still useful. But notice what’s happening: a human decided, in advance, which features of the molecule were worth measuring. The model never gets to look at the molecule itself. It only ever sees the summary someone else wrote.

The new way: let the model read the structure directly

Here’s the shift. Instead of summarizing the molecule first, what if the model read the graph the way you just did — atom by atom, bond by bond?

That’s what a graph neural network does, and the mechanism is worth slowing down on. Every atom starts with a little bundle of information about itself. Then, in a round of message passing, each atom sends that bundle to its bonded neighbors and receives theirs in return. Do it once, and every atom knows about the atoms one bond away. Do it again, and it knows about the ones two bonds away. After a few rounds, each atom carries a rich picture of its own chemical neighborhood — its local structure — learned from the graph, not dictated by a recipe.

Pool all those atom-level pictures together and you get a fingerprint for the whole molecule. But this time the fingerprint was learned for the exact question you’re asking. The representation and the task grew up together.

The specific version we worked with is called a D-MPNN — a directed message-passing neural network. The “directed” part is a small, careful idea: it passes messages along the bonds rather than the atoms, so a message doesn’t immediately bounce straight back to where it came from. That one design choice, from the Chemprop model out of MIT, turned out to matter a lot for how cleanly the structure gets read.

Why this is more than a party trick

A version of this architecture made the news in 2020, when a team at MIT trained a directed message-passing network to recognize molecules that kill bacteria, pointed it at a huge library of compounds, and used it to surface a structurally unusual antibiotic they named halicin. The model found something a person scanning by intuition would likely have skipped — not because it was smarter than a chemist, but because it could read a hundred million molecular graphs without getting tired, and it had learned what “kills bacteria” looks like in the shape itself.

That is the promise, stated plainly: models that read chemistry directly can notice patterns in structure that we’d miss, and they can do it at a scale no lab could screen by hand.

Why build it in the open

Which brings me to why this story lives at DeepChem and not in some private pipeline.

DeepChem is an open-source library for deep learning in the sciences — chemistry, biology, materials, drug discovery — and its whole premise, the one Bharath Ramsundar built it on, is that the tools for discovery shouldn’t be locked behind a company’s walls. If a graph neural network can read a molecule, then a high schooler, a startup, and a pharma lab should all be able to reach for the same well-tested implementation.

So bringing the D-MPNN into DeepChem was the real work — not just making it run, but making it a public, reusable piece anyone could build on. During Google Summer of Code in 2022, Aryan Amit Barsainyan did exactly that: eighteen merged pull requests, over 4,500 lines added, and a final model that came out competitive with Chemprop on the datasets he tested. A serious molecular property predictor, now sitting in a library anyone can install.

I care about that last part more than the benchmark. A private model that works is a result. A public model that works is infrastructure — something the next person doesn’t have to rebuild. (The other half of that summer, the part about what happens between the pull requests, I wrote about separately in what DeepChem taught me about mentorship.)

Read a molecule as a graph. Let the model learn the fingerprint instead of guessing it. Then leave the tool where the whole community can find it. That last step is the one I keep coming back to — because the discoveries we haven’t made yet are far more likely to come from a lot of people with good tools than from a few people with secret ones.