-
Abstract
Accurately predicting the outcomes of chemical reactions is of great significance for many applications ranging from drug discovery to catalyst design, yet the development of generative machine-learning models for materials science and chemical processes remains at an early stage. Current mainstream approaches typically treat chemical reactions as “translation” tasks of SMILES sequences while ignoring spatial information. Although these methods have made great advances, they can violate basic physical constraints, such as conservation of the number of atoms of each element during the reaction. To address this, we propose AtomFlow—a generative framework based on flow for retrosynthesis prediction operating directly in three-dimensional space. By learning the optimal transport dynamics of atoms from products to reactant molecules in 3D space, our framework performs inverse chemical reaction prediction. On the Transition1x benchmark of small organic molecules (≤ 7 heavy atoms), and trained on only about 1% of the data used in typical SMILES benchmarks, AtomFlow not only enforces 100% atom conservation but also achieves a 96.2% Top10 accuracy, comparable to that of SMILES-based models trained on much larger datasets. Furthermore, AtomFlow exhibits high inference efficiency: its GVP model (6M parameters) can complete 1,000 predictions in 20 seconds and 10,000 predictions in 50 seconds. Our results demonstrate that the flow-matching generative paradigm based on 3D molecular structure evolution can ensure the physical plausibility of reactions and provide directly verifiable predictions for tasks such as drug design and catalyst design that rely on accurate 3D structures. This work opens up new avenues for developing the next generation of efficient, reliable, and interpretable AI tools in chemistry. -
