arXiv(opens in a new tab)physics.chem-phSep 2026

Manuscript Offprint

arXiv:2609.04432

Recovering molecules from coarse-grained beads: free-energy-conditioned generative backmapping across chemical space

Luis Itza Vazquez-Salazar, Tristan Bereau

Luis Itza Vazquez-Salazar¹, Tristan Bereau¹,²

¹Institute for Theoretical Physics, Heidelberg University, Heidelberg, Germany.

²Interdisciplinary Center for Scientific Computing (IWR), Heidelberg University, Heidelberg, Germany.

Transferable coarse-grained (CG) force fields compress chemical space: by aggregating atoms into a reduced set of interaction beads, models such as MARTINI reduce the number of distinguishable compounds by roughly three orders of magnitude, making high-throughput screening of thermodynamic properties tractable across soft matter, with drug-membrane permeability as a well-developed example. The compression is lossy and, so far, one-way: a screen returns a combination of beads, with no established route back to the compounds it stands for. Recovering those compounds—compositional backmapping—is a one-to-many inverse map, distinct from the better-studied conformational problem of rebuilding atomic coordinates from a known mapping. Here we formulate compositional backmapping as conditional graph generation by introducing juniper, a discrete denoising diffusion model over molecular graphs conditioned on the octanol–water partition free energy ΔGW→O\Delta G_{W\to O}, the principal driver of MARTINI bead type assignment and hence a proxy for bead identity. Trained on molecules of up to 9 heavy atoms mapped onto one or two beads, juniper generates molecules that are 93% valid and 92% unique for two-bead targets, and whose ΔGW→O\Delta G_{W\to O} distributions track the target ΔGW→OCG\Delta G_{W\to O}^{\text{CG}} linearly (r2≥0.96r^2 \geq 0.96), departing only in the hydrophobic and hydrophilic tails. Although the model receives no chemical information beyond a single scalar, the functional groups shift systematically with the imposed free energy, from branched hydrocarbons at the apolar end to amides, imides, and isocyanates at the polar end. A bead combination flagged by a CG screen can therefore be turned into candidate molecules for atomistic study or synthesis.

Correspondence: LIVS (l.i.vazquez-salazar@thphys.uni-heidelberg.de)

Figure

UNIVERSITÄT HEIDELBERG ZUKUNFT SEIT 1386

1 Introduction

Chemical compound space is the set of all possible molecules or materials [1]. Given its definition, chemical space is vast: after applying physical constraints and restricting the possible composition to the elements C, N, O, P, S, F, Cl, Br, and I with a molecular weight of less than 1000 Da, its size has been hypothesised to be around 1020010^{200} [2, 3]. Even after considering that only one in 102010^{20} compounds is stable, the size of this “constrained” chemical space is reduced to 1018010^{180}, which is still larger than the estimated total amount of information in the visible universe (1012310^{123}) [4]. If chemical space exploration continues at the present rate, discovering the compounds of even this constrained set would take on the order of 10,000 years [2]. Enumeration is therefore not a strategy, and the practical question becomes one of search: how to impose a target property and recover the compounds that satisfy it.

An alternative for exploring this large space is the use of coarse-grained (CG) models, which lower the dimensionality of the problem by aggregating atomistic degrees of freedom (DOF) into interaction centres called beads [5]. For transferable CG models—such as MARTINI [6] and SIRAH [7]—the reduction of DOF produces a reduction in the size of chemical space (Figure 1). This reduction greatly aids the exploration of chemical space [8–10]: a decrease by roughly three orders of magnitude makes studies involving high-throughput screening considerably faster, since one combination of beads represents multiple chemical compounds, which in practice translates to the testing of multiple compounds at once. The same compression underpins molecular design, since a search space small enough to be traversed iteratively admits active learning over CG chemical space [11] and Bayesian optimisation across levels of resolution [12], both of which propose bead combinations that optimise a target property instead of ranking an enumeration fixed in advance. The reduction is also lossy. A bead combination stands for a whole family of molecules, and the map from compounds to beads discards the chemical detail that a chemist needs in order to act on a screening or optimisation result.

Beyond this compression, popular CG force fields enable the simulation of a wide range of systems in the biomolecular and materials sciences [13, 14]. Among the existing force fields, MARTINI has established itself as one of the most widely used, because of its flexibility and its large range of applications in biomolecular processes [15–18] and materials science [19, 20]. MARTINI uses a mixture of top-down and bottom-up parametrisation, tuning the Lennard-Jones parameters to match experimental partition coefficients and fitting the bonded potentials to all-atom (AA) simulations [14, 21, 22]. One reason for the popularity of MARTINI is that generating a new parametrised molecule is relatively straightforward, because of its simple construction principles.

However, the inverse process, called “backmapping,” in which the molecules corresponding to a certain number of beads are obtained, is far more difficult (Figure 1). This difficulty has two main sources. Let M\mathbf{M} denote the coarse-graining operator, so that the M−1\mathbf{M}^{-1} operator reconstructs an all-atom (AA) configuration from a CG one. (i) A one-to-many transformation is in general necessary, M−1:Rbeads↦Ratoms\mathbf{M}^{-1} : \mathbb{R}^{\text{beads}} \mapsto \mathbb{R}^{\text{atoms}} with dim⁡(atoms)>dim⁡(beads)\dim(\text{atoms}) > \dim(\text{beads}), so that the dimension of the AA representation always exceeds that of the CG one, implying that certain information needs to be guessed. (ii) In transferable CG models—and in chemical space—the transformation is non-injective and probabilistic, M−1:Rbeads⇒Ratoms\mathbf{M}^{-1} : \mathbb{R}^{\text{beads}} \Rightarrow \mathbb{R}^{\text{atoms}}, which implies that each CG representation corresponds to multiple AA molecules.

Two distinct problems travel under the single term “backmapping.” Conformational backmapping reconstructs atomic coordinates from a CG configuration whose mapping M\mathbf{M} is already known; it has absorbed most of the methodological effort and is by now well developed [23, 24]. Compositional backmapping asks the prior question—which molecules correspond to a given combination of beads—and has remained largely unexplored: the non-injectivity of point (ii) has been sidestepped rather than solved. A high-throughput screen or a CG optimisation loop returns a bead combination, and without the compositional map such a combination cannot be turned into a chemical compound to study atomistically or to synthesise. Compositional backmapping therefore closes the multiscale discovery loop: after chemical space is compressed and screened at low resolution, it recovers the atomistic molecules corresponding to the optimal CG candidates. This work addresses such a compositional problem.

In this work, we propose to tackle the problem of backmapping in chemical space by using methodologies of generative machine learning (ML). These models aim to learn the underlying statistical distribution of a set of data to later generate new samples that resemble those in the training dataset [25, 26]. By construction, generative ML offers an elegant solution for the backmapping problem in chemical space because, by learning the underlying data distribution, it is possible to obtain a general map between beads and atoms from a subset of curated samples. Furthermore, because the model generates a distribution that resembles the training dataset, it allows us to generate multiple compounds starting from a single label, effectively bypassing the one-to-many problem. Previous work has successfully used generative ML models to backmap spatial coordinates from CG to AA, both for condensed-phase molecular liquids and polymer melts [27–29] and, predominantly, for peptides and proteins [23, 24, 30–35].

The MARTINI model parametrisation is mainly driven by two aspects: hydrophobicity and preserving the volume, shape, and symmetry of the underlying AA representation. By considering these principles, in this work, we focus on the backmapping of small molecules with up to 9 heavy atoms that are mapped onto one or two MARTINI beads, according to MARTINI guidelines of a maximum of 4 heavy atoms per bead and a maximum mismatch of 1 heavy atom. The setting is deliberately controlled: it isolates the compositional problem from the conformational one, leaving chemistry as the only thing the model must learn. The restrictions carry two consequences. First, the admissible MARTINI representations for the considered molecules are reduced to only two possible geometries: a point particle (one bead) or a straight line (two beads). This reduction diminishes the importance of the CG spatial representation and allows us to formulate the problem in molecular graph space rather than as a 3D coordinate problem. The 3D representation nevertheless has a large impact on the use of the MARTINI model [36]; the restriction was imposed to simplify the problem of backmapping across chemical space. The second consequence, and the most

Figure

Figure 1 Backmapping in chemical space. Four combinations of the main set of MARTINI beads are shown. The C bead (blue) is apolar, N (green) is intermediate, and P (red) is polar. The horizontal axis orders the combinations by the octanol–water partition free energy (ΔGW→O\Delta G_{W\to O}), from the apolar C-C pair on the left to the polar P-P pair on the right; the vertical axis indicates resolution, with the bead pair at the bottom of each panel and the corresponding molecules above. Because each bead type comprises several subtypes, the four combinations are representatives placed schematically along the ΔGW→O\Delta G_{W\to O} axis rather than at their nominal values. The backmapping procedure converts each bead combination into a set of molecules with defined physicochemical properties, through a generative process constrained by the value of ΔGW→O\Delta G_{W\to O}. Molecular examples are selected at random for each combination.

important for the present study, is that the octanol–water partition free energy ΔGW→O\Delta G_{W\to O} (the hydrophobicity descriptor) emerges as the principal parameter controlling how MARTINI compresses chemical space. We accordingly adopt ΔGW→OCG\Delta G_{W\to O}^{\mathrm{CG}} both as a constraint for molecular generation and as a proxy for the MARTINI CG mapping. However, ΔGW→O\Delta G_{W\to O} has limitations in separating chemical space [37], and degeneracies (i.e. multiple bead combinations can be mapped to the same value of ΔGW→OCG\Delta G_{W\to O}^{\mathrm{CG}}) are expected. A complementary reason for choosing ΔGW→O\Delta G_{W\to O} as a driver for our backmapping procedure is the large number of studies that use ΔGW→O\Delta G_{W\to O} or log⁡P\log P (the logarithm of the octanol–water partition coefficient) for molecule generation and optimisation [38–42] given the importance of hydrophobicity in drug design and discovery [43, 44].

Many of the existing generative models conditioned on ΔGW→O\Delta G_{W\to O} are based on variational autoencoders (VAEs) [45], a generative algorithm that maps a variable to a low-dimensional space and later reconstructs the original variable from it. During training, the model learns the reduction and reconstruction processes. Because of their simplicity, VAEs are highly flexible; however, this flexibility comes at the cost of problems such as posterior collapse, difficulty capturing complex distributions, or incomplete reconstructions [26]. As an alternative to VAEs, diffusion-based models have emerged [46–49]. Diffusion models follow the same strategy as VAEs, except that the forward process (transformation to a simple latent space) is dictated by non-equilibrium statistical mechanics, while the reconstruction process is also learned, making training more stable, providing better reconstructions, and enabling easier conditioning. A few models conditioning diffusion on log⁡P\log P can be found in the literature [50–52].

It should be noted that the objective of this work differs from the mentioned previous uses of ΔGW→O\Delta G_{W\to O}-conditional generation in the literature, which were oriented toward optimising a chemical structure with respect to an arbitrary target property. Our goal is fundamentally different: to recover a distribution of molecules consistent with a MARTINI representation, in both ΔGW→O\Delta G_{W\to O} and chemical diversity. The conditioning value ΔGW→OCG\Delta G_{W\to O}^{\mathrm{CG}} is therefore treated as (approximately) the mean of that distribution, rather than as a target to be hit by an individual molecule. Because we are concerned here with small molecules represented as chemical graphs, a graph-based diffusion model whose generation is constrained by ΔGW→OCG\Delta G_{W\to O}^{\mathrm{CG}} is a natural choice. The model used here for such a purpose is called juniper (see the SI for an explanation of the name).

In the rest of the text, we present the details of the constructed model and the training procedure. Furthermore, we describe how chemical space was sampled based on the value of ΔGW→OCG\Delta G_{\mathrm{W}\to\mathrm{O}}^{\mathrm{CG}}, which ultimately corresponds to MARTINI beads. We analyse the generated results in terms of physicochemical properties, such as the distribution of ΔGW→O\Delta G_{\mathrm{W}\to\mathrm{O}}, and the chemical space explored. In Section 3, the unconditional generation results are discussed first, followed by the conditional generation of molecules. Finally, we draw conclusions and outline avenues for further research.

References (55)

  • Defining and exploring chemical spaces
  • Chemical space: limits, evolution and modelling of an object bigger than our universal library
  • Diversity in medicinal chemistry space
  • Estimation of the information contained in the visible matter of the universe
  • I.; Lopez, C. A.; Uusitalo, J. J.; de Jong, D. H.; Gopal, S. M.; Periole, X.; Marrink, S. J. The power of coarse graining in biomolecular simulations
  • J.; Risselada, H. J.; Yefimov, S.; Tieleman, D. P.; De Vries, A. H. The MARTINI force field: coarse grained model for biomolecular simulations
  • A suite for simulations of complex biological systems at the coarse-grained and multiscale levels
  • Computational compound screening of biomolecules and soft materials by molecular simulations
  • J.; Bereau, T. Navigating chemical space: multi-level Bayesian optimization with hierarchical coarse-graining
  • Perspective: Advances, Challenges, and Insight for Predictive Coarse-Grained Models
  • J.; Tieleman, D. P. Perspective on the Martini model
  • C.; Thallmair, S.; Conflitti, P.; Ramírez-Palacios, C.; Alessandri, R.; Raniolo, S.; Limongelli, V.; Marrink, S. J. Protein-ligand binding with the coarse-grained Martini model
  • C.; Limongelli, V.; Wu, S.; Marrink, S. J.; Monticelli, L. Perspectives on high-throughput ligand/protein docking with Martini MD simulations
  • A.; Grünewald, F.; van Tilburg, P. M.; König, M.; Gilbert, B. R.; Brier, T. A.; Thornburg, Z. R.; Luthey-Schulten, Z.; Marrink, S. J. Molecular dynamics simulation of an entire cell
  • I.; Selle, M.; De Vries, A. H.; Marrink, S. J.; Souza, P. C. Martini coarse-grained models of imidazolium-based ionic liquids: from nanostructural organization to liquid–liquid extraction
  • Martini 3: a general purpose force field for coarse-grained molecular dynamics
  • J.; Monticelli, L.; Melo, M. N.; Alessandri, R.; Tieleman, D. P.; Souza, P. C. Two decades of Martini: Better beads, broader scope
  • S.; Khanna, S.; Ferguson, A. L. FlowBack: a generalized flow-matching approach for biomolecular backmapping
  • Measure transport and information loss across molecular resolutions (opens arXiv in a new tab)
  • Deep Generative Modeling, 2nd ed.; Springer, 2024
  • an efficient and versatile machine learning approach
  • chemical transferability
  • Proceedings of the 39th International Conference on Machine Learning (ICML)
  • Diffusion models and force fields for coarse-grained molecular dynamics
  • S.; Shmilovich, K.; Ferguson, A. L. DiAMoNDBack: diffusion-denoising autoregressive model for non-deterministic backmapping of $C_{\alpha}$ protein traces
  • diffusion model for backmapping large-scale and complex coarse-grained molecular systems
  • physics-aware and energy-guided conditional flow-matching for all-atom protein backmapping (opens arXiv in a new tab)
  • H.; Bereau, T. Resolution limit of data-driven coarse-grained models spanning chemical space
  • J. Cheminf
  • International Conference on Machine Learning
  • A.; Planey, S. L. The influence of lipophilicity in drug discovery and design
  • Is there enough focus on lipophilicity in drug discovery?
  • P.; Welling, M. An introduction to variational autoencoders
  • Score-Based Generative Modeling through Stochastic Differential Equations
  • P.; Salimans, T.; Poole, B.; Ho, J. Variational diffusion models
  • small molecule diffusion model with flexible guidance towards molecular properties
  • A novel molecular graph diffusion model for molecular generation and optimization
  • International Conference on Learning Representations (opens arXiv in a new tab)
  • discrete denoising diffusion for graph generation (opens arXiv in a new tab)
  • A Generalization of Transformer Networks to Graphs
  • Joint European Conference on Machine Learning and Knowledge Discovery in Databases
  • Classifier-Free Diffusion Guidance
  • Enumeration of 166 billion organic small molecules in the chemical universe database GDB-17
  • I.; Boittier, E. D.; Unke, O. T.; Meuwly, M. Impact of the Characteristics of Quantum Chemical Databases on Machine Learning Prediction of Tautomerization Energies
  • Decoupled Weight Decay Regularization
  • RDKit: A software suite for cheminformatics, computational chemistry, and predictive modeling
  • A.; Crippen, G. M. Prediction of physicochemical parameters by atomic contributions
  • V.; Tanchuk, V. Y. Application of associative neural networks for prediction of lipophilicity in ALOGPS 2.1 program
  • On the Jensen–Shannon symmetrization of distances relying on abstract means
  • An algorithm to identify functional groups in organic molecules
  • EFGs: A Complete and Accurate Implementation of Ertl's Functional Group Detection Algorithm in RDKit
  • A Metric for Generative Models for Molecules in Drug Discovery
  • ChemGAN challenge for drug discovery: can AI reproduce natural chemical diversity? (opens arXiv in a new tab)
  • State-of-the-art and comparison of log P methods on more than 96,000 compounds
  • H.; Christensen, D. S.; Jensen, J. H. Do machines dream of atoms?