# RINGER: Rapid Conformer Generation for Macrocycles with Sequence-Conditioned
Internal Coordinate Diffusion

Colin A. Grambow,1,2† Hayley Weir, 1,2 Nathaniel L. Diamant,1 Alex M. Tseng,1
Tommaso Biancalani,1 Gabriele Scalia,1 Kangway V. Chuang1,2†
1Department of Artificial Intelligence and Machine Learning,
2Prescient Design,
Genentech Research and Early Development
<EMAIL_ADDRESS>

###### Abstract

Macrocyclic peptides are an emerging therapeutic modality, yet computational
approaches for accurately sampling their diverse 3D ensembles remain
challenging due to their conformational diversity and geometric constraints.
Here, we introduce RINGER, a diffusion-based transformer model for sequence-
conditioned generation of macrocycle structures based on internal coordinates.
RINGER provides fast backbone sampling while respecting key structural
invariances of cyclic peptides. Through extensive benchmarking and analysis
against gold-standard conformer ensembles of cyclic peptides generated with
metadynamics, we demonstrate how RINGER generates both high-quality and
diverse geometries at a fraction of the computational cost. Our work lays the
foundation for improved sampling of cyclic geometries and the development of
geometric learning methods for peptides.

##  1 Introduction

Macrocyclic peptides are an important therapeutic modality in modern drug
discovery that occupy a unique chemical and pharmacological space between
small and large molecules [1, 2, 3]. These cyclic peptides exhibit improved
structural rigidity and metabolic stability compared to their linear
counterparts [4], yet retain key conformational flexibility and diversity to
bind shallow protein interfaces [5]. However, computational approaches for
modeling their structural ensembles remain limited compared to small molecules
and proteins in terms of computational speed, accuracy (sample quality), and
conformational diversity [6]. Critically, scalable and accurate tools are
necessary to enable rational design of macrocyclic drugs; access to these
tools can significantly impact optimization of key properties including
binding affinity [7, 8], permeability [9, 10, 11], and oral bioavailability
[12].

Several key challenges hinder fast and effective macrocycle conformer
generation: 1) Macrocyclic peptides exhibit diverse molecular structures and
chemical modifications, including varying ring size, stereochemistry,
N-methylation, and more [13]. Their structural diversity, along with the
increased number of rotatable bonds, results in a vast conformational space
that is considerably more expensive to sample computationally. 2) Macrocycles
are subject to complex non-linear constraints due to ring closure. The atomic
positions, angles, and dihedrals of the macrocycle backbone are highly
interdependent, and additional complex intramolecular interactions make this
process inherently difficult to model [14]. 3) Experimental X-ray and NMR
structures for macrocycles are lacking ($\sim 10^{3}$) in comparison to small
molecules ($\sim 10^{6}$ in the Cambridge Structural Database [15]) and
proteins ($\sim 10^{5}$ in the Protein Data Bank [16]). The scarcity of
available experimental data has made it difficult to integrate observational
data to improve structural predictions or train machine learning-based
approaches. Together, the vast conformational space combined with limited data
make modeling and sampling of macrocycles not only conceptually challenging,
but technically challenging due to computational cost. Approaches that can
accurately generate diverse conformations at scale would dramatically improve
our ability to rationally design and optimize macrocycles.

To address these limitations, we introduce RINGER (RINGER Generates Ensembles
of Rings), a deep learning model designed specifically for sequence-
conditioned macrocycle conformer generation (Figure 1) that efficiently
samples realistic angles and torsions (i.e., internal coordinates) for
macrocyclic peptides. RINGER merges a transformer architecture that naturally
captures the physical equivariances and invariances of macrocyclic peptides
with a discrete-time diffusion model to learn highly-coupled distributions
over internal coordinates. We demonstrate how RINGER simultaneously achieves
excellent performance in sample quality over angular and torsional profiles
while maintaining excellent RMSDs relative to gold-standard conformer
ensembles generated with the Conformer-Rotamer Ensemble Sampling Tool (CREST)
[17].

Figure 1: Overview of RINGER for macrocycle conformer generation. A. Given a
2D representation of a macrocyclic peptide, RINGER generates an accurate and
diverse 3D conformational ensemble. B. An illustration of the diffusion
process learning to recover the time $t=0$ bond angle (red) and torsional
(blue) distributions from time, $t=T$.

We summarize our contributions as follows:

  * •

We propose a new framework, RINGER for conformer generation of macrocycle
backbones based on efficiently encoding ring geometry using redundant internal
coordinates. Our model naturally handles the cyclic nature of macrocycles and
chiral side chains with both L\- and D-amino acids.

  * •

We propose a simple solution to recover Cartesian coordinates from redundant
internal coordinates that satisfies ring constraints using a sequential least-
squares optimization and demonstrate that it works well in practice.

  * •

We benchmark RINGER extensively against state-of-the-art physics- and machine
learning-based algorithms to demonstrate how our approach better captures
complex distributions of macrocycles and achieves excellent sample quality and
diversity compared to existing methods.

##  2 Background and Related Work

Our work builds on small-molecule conformer generation and protein structure
modeling to create a framework for macrocycle conformers. Below, we briefly
summarize related work.

#### Physics and Heuristic-based Conformer Generation for Macrocycles

Physics-based and heuristic-based algorithms remain the state of the art for
macrocycles and have required special considerations compared to drug-like
small molecules due to ring-closing constraints. The open-source
cheminformatics library RDKit leverages distance geometry algorithms for
small-molecule conformer generation (ETKDG) [18], with improved heuristic
bounds for macrocycles (ETKDGv3) [19, 20]. Similarly, commercial conformer
generation algorithms such as OpenEye OMEGA [21, 22] in macrocycle mode use a
distance geometry algorithm based on 4D coordinate initialization to provide
diverse conformers [23], as their torsion-driving approach is incompatible
with ring closure.

Similarly, low-mode [24, 25] or Monte Carlo [26] search methods combined with
molecular dynamics have been found to be effective at sampling macrocycle
conformations, particularly when combined with force field optimizations as
demonstrated in Schrödinger’s MacroModel [14] and Prime MCS [27]. These
approaches have been tuned with expert knowledge and torsional libraries to
maximize agreement with observed experimental structures. The open-source
CREST package [17] leverages iterative metadynamics with a genetic structure-
crossing algorithm (iMTD-GC) to explore new geometries, and can be considered
a gold-standard for generating diverse ensembles of drug-like molecules. In
this work, we use the recently-published CREMP [28] dataset, containing high-
quality, CREST-generated ensembles, representing over 31 million macrocycle
geometries (see Section 4.1 and Appendix B for more details).

One key limitation of these approaches is high computational cost and
difficulty in scaling; in general, conformer generation is $10^{3}$ –
$10^{5}\times$ more computationally expensive compared to a drug-like small
molecule due to the increased number of rotatable bonds and their ring-closing
constraints (e.g., generating a conformational ensemble of a macrocyclic
hexapeptide with CREST requires an average of 14 hours [28]). These approaches
become increasingly challenging when kinetic or molecular dynamics approaches
are used with explicit solvation [29, 30].

#### Generative Approaches for Small Molecule Conformer Ensembles

Recent work with deep generative models has focused on improved sampling of
the conformational landscape of small molecules. For example, Mansimov et al.
[31] propose a conditional graph variational autoencoder (CGVAE) approach for
molecular geometry generation. Simm and Hernandez-Lobato [32] report
conditional generation of molecular geometries based on distance geometry. Xu
et al. [33] leverage normalizing flows and energy-based modeling to help
capture the multimodal nature and complex dependencies of small molecule
space. More recently, Xu et al. [34] report GeoDiff, an equivariant diffusion-
based model that operates on Cartesian point clouds. Although GeoDiff provides
strong results, sampling is costly and requires 5,000 time steps.

Recent reports have also drawn inspiration from physics-based conformer
generation to leverage the rigid-rotor hypothesis, which treats bond distances
and angles as fixed, and torsional angles of rotatable bonds are independently
sampled, assuming little or no interdependence between torsions [35]. These
include GeoMol [36], an SE(3)-invariant machine learning model for small
molecule conformer generation that leverages graph neural networks, and
EquiBind [37] which performs conditional generation on protein structure.
Recently, Jing et al. [38] report Torsional Diffusion, a diffusion model that
operates on the torsional space via an extrinsic-to-intrinsic score model to
provide strong benchmarks on the GEOM dataset [39]. Importantly, these methods
do not address the challenge of highly-coupled torsions within cyclic systems
and either propose complex ring-averaging processes [36] or ignore sampling of
cyclic structures all together [38].

#### Protein Structure Prediction and Diffusion

Significant progress has been made recently in protein structure prediction
with the advent of methods such as AlphaFold2 [40] and RoseTTAFold [41].
However, structure prediction methods have predominantly focused on
deterministic maps to static output structures rather than on sampling diverse
structure ensembles. Recently, several papers have developed diffusion-based
approaches for protein generation based on Euclidean diffusion over Cartesian
coordinates [42, 43] or backbones as in FoldingDiff [44], with an emphasis on
structural design. Our work builds on FoldingDiff, which parameterizes
structures over internal backbone angles and torsions and relies on the
natural extension reference frame (NeRF) [45] to perform linear
reconstructions. However, as we demonstrate below, naive linear
transformations fail to address the ring constraints for macrocycles.
Moreover, FoldingDiff focuses on unconditional generation of protein
backbones, whereas our focus here is conditional generation.

#### Machine Learning Approaches for Macrocycle Conformer Ensemble Generation

Despite the many approaches focused on small molecules and protein structure
generation, there are few efforts in macrocycle structure prediction. Most
notably, Miao et al. [46] recently disclosed StrEAMM for learning on molecular
dynamics of cyclic peptides using explicit solvation. StrEAMM is a linear
model that predicts local backbone geometries and their respective 1,2- and
1,3-residue interactions to provide excellent ensemble estimates of homodetic
hexapeptides. However, the model is not naturally inductive and is not
natively extensible to other macrocycle ring sizes and residues. Fishman et
al. [47] recently developed a more general framework for diffusion models on
manifolds defined via a set of inequality constraints. However, they only
investigate the conformational ensemble of a single cyclic peptide as a proof-
of-concept using a reduced $\alpha$-carbon representation.

##  3 RINGER: Problem Statement and Methods

###  3.1 Problem Definition: Conditional Macrocycle Conformer Generation

The core objective of our work is to model the distribution of conformers for
a macrocyclic peptide with a focus on backbone structure. Given a macrocycle
graph $\mathcal{G}=\mathcal{(V,E)}$, where $\mathcal{V}$ is the set of nodes
(atoms) and $\mathcal{E}$ is the set of edges (bonds), and $n=|\mathcal{V}|$
our goal is to learn a distribution over the possible conformers. Let
$\mathcal{C}=\\{c_{1},c_{2},\dots,c_{K}\\}$ be the set of conformers, where
each conformer $c_{k}\in\mathcal{C}$ represents a unique spatial arrangement
of the atoms $\mathcal{V}$. Our task is to learn the distribution
$p(\mathcal{C}\;|\;\mathcal{G})$, which represents the probability over the
conformer ensemble $\mathcal{C}$ given a molecular graph $\mathcal{G}$.
Learning and sampling from this complex distribution is inherently challenging
for most molecules, and is further complicated in macrocycles due to the
highly-coupled nature of ring atoms. A perturbation to one part of the ring
generally perturbs the others. Consequently, any model must account for the
interdependence between atoms due to the cyclic constraints.

Given this problem, a good generative model ideally satisfies a few key
properties: 1) Naturally encodes the physical and structural aspects of
macrocyclic peptides. For example, cyclic peptides with only standard peptide
bonds (i.e., homodetic peptides) do not have a natural starting residue and
hence exhibit cyclic shift invariance, e.g., cyclo-(R.I.N.G.E.R) is identical
to cyclo-(I.N.G.E.R.R), where each amino acid is denoted by its one-letter
code with “cyclo” indicating cyclization of the sequence. 2) Captures
multimodal distributions and complex, higher-order interactions such as the
strong coupling between atomic positions in the ring. 3) Samples high-quality
and diverse conformations from $p(\mathcal{C}\;|\;\mathcal{G})$ that
faithfully capture realistic geometries while respecting the underlying
conformer distribution.

###  3.2 Representing Macrocycle Geometry: Redundant Internal Coordinates

Conformer geometries are defined by their set of Cartesian coordinates for
each atomic position and can hence be modeled using SE(3)-equivariant models
to learn complex distributions. However, Euclidean diffusion requires modeling
the many degrees of freedom; and, in practice, can require many time steps to
generate accurate geometries [34]. Moreover, realistic conformations are
highly sensitive to the precise interatomic distances, angles, and
torsions—although this information is implicit in the Cartesian positions,
explicitly integrating these quantities into a model can provide a strong
inductive bias and accelerate learning [48].

Borrowing from molecular geometry optimization [49], protein representation
[50, 51, 45], and inverse kinematics [52], we adopt redundant internal
coordinates that represent conformer geometries through a set of bond
distances, angles, and torsions (dihedral angles), i.e.,
$\mathcal{C}\equiv\\{\mathcal{D},\Theta,\mathcal{T}\\}$. In particular, this
simplifies the learning task, as bond distances can be approximated as fixed
distances with little loss in accuracy [21, 44, 38], and internal angles
typically fit a narrow distribution. Importantly, these coordinates define an
internal reference frame that readily encodes complex geometries including
ring chirality. Moreover, this approach obviates the need for complex
equivariant networks and enables the use of simpler neural architectures [44].
Hence, our generative process can be reformulated as learning the distribution
$p(\\{\Theta,\mathcal{T}\\}\;|\;\mathcal{G};\mathcal{D})$ using known bond
distances for reconstruction back to Cartesians (Figure 1).

###  3.3 Deep Probabilistic Diffusion Models for Sampling Internal Coordinates

#### Denoising Probabilistic Models

Recent works on deep denoising probabilistic models have demonstrated
excellent generative performance for complex multimodal data [53, 54, 55], and
have been successfully applied to both small molecules and proteins [34, 44].
In particular, we use the discrete-time diffusion model from Wu et al. [44]
that formulates the forward transition probability using a wrapped normal
distribution,
$q\left(\mathbf{x}_{t}\;\middle|\;\mathbf{x}_{t-1}\right)=\mathcal{N}_{\text{wrapped}}\left(\mathbf{x}_{t};\sqrt{1-\beta_{t}}\mathbf{x}_{t-1},\beta_{t}\mathbf{I}\right)$,
instead of a standard normal distribution [38], where $\mathbf{x}_{t}$
represents the noised internal coordinates (bond angle and torsion) at time
step $t$. We train a diffusion model,
$p_{\Xi}(\mathbf{x}_{t-1}\;|\;\mathbf{x}_{t})$, by training a neural network
to predict the noise present at a given time step (for full details, see
Appendix C). During inference, we sample $\mathbf{x}_{T}$ from a wrapped
normal distribution and iteratively generate $\mathbf{x}_{0}$ using
$p_{\Xi}(\mathbf{x}_{t-1}\;|\;\mathbf{x}_{t})$. The sampling process is
further detailed in Appendix D.

#### Encoder Architecture

Macrocycles exhibit extensive coupling of their residues due to torsional
strain and intramolecular interactions such as hydrogen bonds. Here, we use a
standard bidirectional transformer architecture [56, 57] using self-attention
to learn the complex interactions between atoms. Unlike standard sequence
models for linear data, macrocycles exhibit cyclic symmetry with no canonical
start position. Thus, we design a bidirectional, relative positional encoding,
$\mathbf{p}_{ij}^{K}$, inspired by standard relative encodings [58] to reflect
this cyclic invariance (see Appendix A for notation):

$\mathbf{z}_{i}=\sum_{j=1}^{n}\alpha_{ij}\left(\mathbf{v}_{j}\mathbf{W}^{V}\right)\\\
,\quad\text{where}\quad\alpha_{ij}=\frac{\exp e_{ij}}{\sum_{k=1}^{n}\exp
e_{ik}}$ (1)

$e_{ij}=\frac{\mathbf{v}_{i}\mathbf{W}^{Q}\left(\mathbf{v}_{j}\mathbf{W}^{K}+\mathbf{p}_{ij}^{K}\right)^{T}}{\sqrt{d_{z}}}\quad\text{with}\quad\mathbf{p}_{ij}^{K}=\underbrace{\mathbf{W}^{D}_{\left(i-j\right)\bmod
n}}_{\text{forward}}+\underbrace{\mathbf{W}^{D}_{\left(i-j\right)\bmod(-n)}}_{\text{backward}}$
(2)

These cyclic relative position representations encode bidirectional edge
relationships between each atom by specifying forward and reverse distances in
the macrocycle. The relative position of any neighboring atom is uniquely
defined by its forward and reverse graph distances in the embedding lookup
$\mathbf{W}^{D}$. For conditional generation, we perform a linear projection
of the features $\mathbf{a}_{i}$, corresponding to each macrocycle backbone
atom and its side chain, and a separate linear projection of the angles and
torsions $\mathbf{x}_{i}=[\theta_{i},\tau_{i}]$ and concatenate them as a
single input to the transformer,
$\mathbf{v}_{i}=\mathbf{a}_{i}^{\prime}\oplus\mathbf{x}_{i}^{\prime}$.
Notably, our diffusion model only adds noise to the angular component,
$\mathbf{x}_{i}$. For unconditional generation, atoms are only labeled with
their backbone identity (nitrogen, $\alpha$-carbon, carbonyl-carbon) using an
embedding that is added to the input. Model details are shown in Appendix E.

#### Ring Closing: Back Conversion to Cartesian Ring Coordinates

Macrocycles with fixed bond distances contain three redundant torsional angles
and two redundant bond angles. Whereas linear peptides and proteins can be
readily converted into an arbitrary Cartesian reference frame through methods
such as NeRF [45], these redundancies prevent direct transformation to unique
Cartesians for cyclic structures. Adopting a sequential reconstruction method
such as NeRF accumulates small errors that result in inadequate ring closure
for macrocycles.111Although direct equality and inequality constraints over
the diffusion process is a promising direction that could address this
problem, we leave this direction for future work. Other studies have developed
complex heuristics with coordinate averaging for ring smoothing [36], yet
these approaches can distort the predicted geometries. In practice, we
demonstrate that an efficient post-processing step works well with minimal
distortion: we treat this as a constrained optimization problem using the
Sequential Least Squares Quadratic Programming (SLSQP) algorithm [59] to
ensure valid Cartesian coordinates while satisfying distance constraints:

$\bm{\hat{\upxi}}=\operatorname*{arg\,min}_{\bm{\upxi}}\
\lVert\bm{\uptheta}(\bm{\upxi})-\bm{\hat{\uptheta}}\rVert^{2}+\lVert
w\left(\bm{\uptau}(\bm{\upxi})-\bm{\hat{\uptau}}\right)\rVert^{2}\quad\text{subject
to:}\quad\ \mathbf{d}(\bm{\upxi})=\mathbf{d}_{\text{true}}$ (3)

Here, we find the set of Cartesian coordinates, $\bm{\hat{\upxi}}$, that
minimize the squared error against the internal coordinates
$\bm{\hat{\uptheta}}$ and $\bm{\hat{\uptau}}$ sampled by the diffusion process
while satisfying bond distance equality constraints using known bond
distances, $\mathbf{d}_{\text{true}}$, from the training data. The torsion
error, $\bm{\uptau}(\bm{\upxi})-\bm{\hat{\uptau}}$, is wrapped by $w(\cdot)$
so that it remains in the $[-\pi,\pi)$ range. Empirically, we demonstrate that
this scheme recovers realistic macrocycles with high fidelity by evenly
distributing the error across the entire macrocycle backbone (see Appendix F
for additional details).

#### Overall Generation Procedure

Our model represents macrocycle backbones as cyclic sequences of redundant
angles and dihedrals with fixed bond lengths. We train a discrete-time
diffusion model to learn a denoising process over the internal coordinates,
using a transformer architecture with an invariant cyclic positional encoding.
At inference time, we sample from a wrapped Gaussian distribution to produce a
set of angles and torsions, conditioning on the known set of atom features
corresponding to the amino-acid sequence. In the final post-processing step,
macrocycle geometries with Cartesian coordinates can be reconstructed through
our constrained optimization using Equation (3).

##  4 Experiments and Results

###  4.1 Experimental Setup

#### Dataset

We train and evaluate our approach on the recently published CREMP dataset
[28] that contains 36k homodetic macrocyclic peptides across varying ring
sizes (4-mers, 5-mers, and 6-mers corresponding to 12-, 15-, and 18-membered
backbone rings), side chains, amino-acid stereochemistry, and N-methylation.
Each macrocycle in CREMP contains a conformational ensemble sampled with CREST
[17], a metadynamics algorithm with genetic crossing built on the semi-
empirical tight-binding method GFN2-xTB [60]. We perform stratified random
splitting on the data, with a training and validation set of 35,198 molecules
(948,158 conformers using a maximum of 30 conformers per molecule), which we
split into 90% training and 10% validation, and a final test set of 1,000
molecules corresponding to 877,898 distinct conformers (using _all_ conformers
per molecule within the
$6\text{\,}\mathrm{k}\mathrm{c}\mathrm{a}\mathrm{l}\mathrm{/}\mathrm{m}\mathrm{o}\mathrm{l}$
energy threshold defined by CREST). Additional dataset statistics are shown in
Appendix B.

#### Training & Sampling

All training is performed on the set of 35k peptides described above, using
the 30 lowest-energy conformers per peptide. We train each model on a single
NVIDIA A100 GPU for up to 1000 epochs until convergence (typically less than
100 epochs) using the Adam optimizer with 10 warmup epochs. Following work in
small-molecule conformer generation [36, 34, 38], we sample $2K$ conformers
for a macrocycle ensemble of $K$ ground-truth conformers (median $K$ = 656)
and assess them based on the evaluation criteria below. For full training and
sampling details see Appendices C and D.

#### Evaluation

For unconditional generation, we use Kullback-Leibler divergence to measure
the difference in sample quality. For conditional generation, we evaluate the
quality of our generated macrocycle backbones using root-mean-squared-
deviation (RMSD) between backbone atom coordinates, similar to previous work
on small-molecule conformer generation. We use several metrics including
Matching and Coverage [33, 36, 38], and for each we report recall and
precision. We note that although RMSD is widely used to assess conformer
quality, its utility for comparing backbones is more limited, as sampled
backbones with highly unrealistic or energetically unfavorable torsions can
exhibit low RMSD values. Therefore, we additionally report the torsion
fingerprint deviation (TFD) [61, 19] to evaluate the quality of the torsional
profiles. RMSD provides a measure of distance between two conformers based on
a least-squares alignment of their respective atomic positions, while TFD
gives a normalized measure of matched torsion angles between backbone
geometries. Appendix I defines the evaluation metrics in detail.

#### Baselines

We provide benchmarks of our method against open-source and commercial
toolkits RDKit ETKDGv3 (for macrocycles) [19], OMEGA Macrocycle Mode [62], and
the SE(3) diffusion model GeoDiff [34]. For GeoDiff, we report results on a
model retrained on identical macrocycle conformers (GeoDiff-Macro), as the
base model trained on small molecules provided poor performance. Methods such
as torsional diffusion [38] only alter freely rotatable bonds and cannot
sample macrocycle backbones by design. See Appendix J for details about the
baseline methods.

Figure 2: Comparison of the bond angle and dihedral distributions from the
held-out test set (orange) and in the unconditionally generated samples
(blue). The three top left plots correspond to the three bond angle types in
each amino acid residue, the three bottom left plots show the three dihedral
angles for each residue, and the right shows Ramachandran plots (colored
logarithmically by density with high density regions shown in lighter colors).
KL divergence is calculated as
$D_{\text{KL}}(\text{test}\;\|\;\text{sampled})$.

###  4.2 Unconditional Generation of Macrocycles

To understand whether this approach can learn the underlying distribution of
macrocycle conformations, we first trained RINGER on macrocycle backbones in
the absence of any residue or side-chain features and only providing ring-atom
identity. From a design perspective, diverse backbone sampling alone can help
drive inverse peptide design, where specific backbone geometries suggest
important sequences. Figure 2 clearly demonstrates how RINGER accurately
replicates both angles and dihedrals with tight fidelity across all residue
atoms, both qualitatively from the plots and quantitatively as measured by the
KL divergence. Furthermore, we generated Ramachandran plots [50] alongside our
withheld test set to visualize the conditional dependencies between residue
torsions. Notably, RINGER recapitulates the critical modes of the
distribution. Appendix K provides more fine-grained detail by visualizing
distributions separately based on the number of residues in the macrocycle.

###  4.3 Sequence-Conditioned Generation of Macrocycles

We subsequently focused on the challenge of sequence-conditioned generation to
understand whether RINGER could effectively capture the complex steric and
intramolecular effects that dictate macrocycle backbone conformation. Whereas
our unconditional model above disregarded side chains, we now condition
backbone generation on molecular features corresponding to each residue,
including side-chain features, stereochemistry, and N-methylation (see
Appendix E).

Comparison of RINGER RMSD and TFD ensemble metrics against RDKit, OMEGA, and
GeoDiff baselines are shown in Table 1. Here, recall quantifies the proportion
of ground truth conformers that are recovered by the model, and precision
quantifies the quality of the generated ensemble (also see Appendix L.2 for
confidence intervals). We found that RDKit ETKDGv3 and OMEGA Macrocycle mode,
both based on distance-geometry approaches, performed similarly across both
metrics and achieved moderate recall with limited precision. To compare deep
learning approaches, we trained a Euclidean diffusion model using the GeoDiff
architecture on the CREMP dataset, and found a strong boost in recall with
similar precision.

Table 1: Performance metrics for sequence-conditioned generation of macrocycles evaluated on ring atoms. Coverage is evaluated at a threshold of $0.1\text{\,}\mathrm{\text{\r{A}}}$ for RMSD and 0.05 for TFD. $k$ is the maximum number of lowest-energy conformers used per molecule in the _training_ data. _All test data_ conformers are used for evaluation. “opt” refers to the use of Equation (3) to reconstruct Cartesian coordinates. |  | RMSD – Recall | RMSD – Precision
---|---|---|---
|  | Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$ | Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$
Method | $k$ | Mean | Med. | Mean | Med. | Mean | Med. | Mean | Med.
RDKit [19] | – | 35.8 | 8.9 | 0.187 | 0.160 | 5.6 | 0.9 | 0.540 | 0.504
OMEGA [62] | – | 32.3 | 7.1 | 0.186 | 0.163 | 3.7 | 1.3 | 0.557 | 0.525
GeoDiff-Macro [34] | 30 | 50.8 | 54.2 | 0.151 | 0.120 | 6.4 | 3.0 | 0.592 | 0.559
RINGER | 30 | 77.0 | 84.5 | 0.091 | 0.072 | 61.3 | 69.1 | 0.185 | 0.120
RINGER (opt) | 1 | 63.8 | 66.9 | 0.139 | 0.112 | 58.1 | 65.1 | 0.430 | 0.327
RINGER (opt) | 30 | 79.7 | 86.3 | 0.084 | 0.065 | 56.4 | 62.7 | 0.441 | 0.356
RINGER (opt) | 100 | 85.6 | 92.2 | 0.065 | 0.049 | 56.9 | 62.4 | 0.454 | 0.385
|  | TFD – Recall | TFD – Precision
|  | Coverage (%) $\uparrow$ | MAT $\downarrow$ | Coverage (%) $\uparrow$ | MAT $\downarrow$
Method | $k$ | Mean | Med. | Mean | Med. | Mean | Med. | Mean | Med.
RDKit [19] | – | 52.9 | 55.3 | 0.059 | 0.051 | 9.4 | 4.4 | 0.215 | 0.206
OMEGA [62] | – | 49.7 | 47.6 | 0.061 | 0.055 | 6.6 | 4.2 | 0.225 | 0.219
GeoDiff–Macro [34] | 30 | 68.1 | 83.0 | 0.048 | 0.037 | 9.1 | 6.1 | 0.248 | 0.241
RINGER | 30 | 90.1 | 95.0 | 0.024 | 0.019 | 74.7 | 86.2 | 0.059 | 0.033
RINGER (opt) | 30 | 89.2 | 94.3 | 0.024 | 0.019 | 61.8 | 68.9 | 0.068 | 0.044

We evaluated our approach with and without the post-processing geometry
constrained optimization (Equation 3), as our raw, generated samples from
RINGER may not satisfy realistic macrocycle distance constraints. As with
unconditional generation, sequence-conditioned generation learns the data
distribution with high fidelity as shown in Appendix L.1. “RINGER” in Table 1
corresponds to Cartesian geometries that were generated from the predicted
angles by starting at one atom and setting bond distances, angles, and
dihedrals sequentially. The starting atom was chosen such that the redundant
bond distance in the ring most closely matches the true bond distance. “RINGER
(opt)” refers to our post-processed geometries that satisfy the true bond
distances exactly. Notably, both approaches achieve excellent recall and
precision across both RMSD- and TFD-based scores compared to our baselines.
Furthermore, post-processing to guarantee valid macrocycle geometries
preserves excellent recall, albeit with slightly attenuated precision.
Additionally, Figure 3 shows that RINGER outperforms all baselines over a wide
range of thresholds used for evaluating Coverage. The plateau in RMSD
precision (but not for TFD) of RINGER with post-processing is a result of the
optimization converging to unrealistic geometries that nonetheless match the
true torsions well. This motivates further development of methods to natively
handle the cycle constraints as a future direction.

Figure 3: Comparison of mean coverage when varying the threshold across RMSD
(left) and TFD (right). Translucent error bands correspond to 95% confidence
intervals.

Notably, our approach not only identifies better conformer ensembles, but
provides increased sampling efficiency with only $T=20$ time steps, compared
to GeoDiff’s $T=5000$ or FoldingDiff’s $T=1000$ (see Table 7 in Appendix L.3
for additional analysis).

Although our standard training protocol uses a diverse ensemble of $k=30$
lowest-energy conformers per training molecule, we found that training with
only the lowest-energy conformer ($k=1$) still outperforms baseline methods.
Increasing this number ($k=30,100$) notably increases recall with a clear
trade-off in precision. These results highlight the excellent data efficiency
and sample quality of our diffusion-based generation, and are a good
illustration of the trade-off between precision (sample quality) and recall
(ensemble diversity).

###  4.4 Structural Analysis of Generated Macrocycles

Although RMSD and TFD give a quantitative evaluation of performance, we also
analyzed individual ensembles to understand the qualitative differences in
conformer generation processes (Figure 4). Notably, the two macrocycles shown
possess distinct sequences that result in distinct Ramachandran plots and
conformations. As shown in Figure 4 (top panels), most ground truth conformer
ensembles exhibit relatively tight distributions characterized by a
distinctive set of $\phi,\psi$ angles. Although RDKit, OMEGA, and GeoDiff can
identify relevant low-energy conformers (albeit with slight errors), the
overall sampling process generates unrealistic distributions. In contrast,
RINGER recapitulates not only the ground state geometry with excellent
accuracy, but better captures the entire ensemble distribution. These results
demonstrate how RINGER better models sequence-dependent geometries to achieve
strong performance.

Figure 4: RINGER accurately generates ensembles as illustrated by Ramachandran
plots for individual macrocycle ensembles. The 3D backbones illustrate the
lowest-energy reference structure and the closest matching conformer (based on
ring-atom RMSD) from each method. For RINGER: C from N-methyl, O from
carbonyl, hydrogens, and proline carbons were inferred via MMFF94 optimization
constraining the backbone geometry.

##  5 Limitations and Future Directions

Our studies demonstrate the potential for diffusion-based models to tackle key
limitations in constrained macrocycle generation, but they are not without
limitations. First, our current work has focused on the CREMP dataset, which
is currently limited to homodetic, 4-, 5-, and 6-mer macrocycles with
canonical side chains in implicit chloroform solvent. Extension to macrocycles
with larger ring sizes, non-canonical side chains, and other complex
topologies would improve the generalizability of this work. Second, we have
focused primarily on modeling diversity of backbone geometry. Complete
expansion to fully model the positions of all side chain atoms is the focus of
ongoing work. Finally, although we demonstrate the effectiveness of a
standard, discrete-time diffusion process, our approach is not physically
constrained to satisfy macrocyclic geometries and currently requires a post-
optimization step. Developing and applying physics-informed diffusion
processes with inequality constraints could improve the efficiency of training
and sampling of relevant macrocycle backbones. Despite these limitations, our
work provides an important first step toward efficient generation of complex
macrocycle geometries, and we anticipate its application toward more complex,
conditional generation tasks.

##  6 Conclusions

In summary, we present RINGER, a new approach for generating macrocycle
conformer ensembles that significantly improves sample quality, diversity, and
inference. By leveraging specific benefits of diffusion-based models, we
demonstrate how a transformer-based architecture with a cyclic positional
encoding results in significant gains over Cartesian-based equivariant models
and widely-used distance geometry-based algorithms for both unconditional and
conditional structure generation. The present work paves the way for more
efficient and accurate computational exploration of conformational space. We
anticipate that this approach will more broadly enable rational macrocycle
discovery through further development.

##  7 Code and Data Availability

All code for training, sampling, and evaluation in this study are available at
http://www.github.com/Genentech/RINGER. We include the exact training and test
data splits and trained model. The CREMP dataset [28] is available for
download from https://zenodo.org/record/7931445.

## Acknowledgments and Disclosure of Funding

We thank Ben Sellers and Christian Cunningham for insightful discussions on
macrocycles and peptide therapeutics. We also thank members of the Departments
of Peptide Therapeutics and Discovery Chemistry for helpful feedback and
discussions. This research is sponsored by Genentech, Inc. All authors are
employees of Genentech, Inc. and shareholders of Roche.

## References

  * Driggers et al. [2008] Edward M Driggers, Stephen P Hale, Jinbo Lee, and Nicholas K Terrett.  The exploration of macrocycles for drug discovery–an underexploited structural class.  _Nat. Rev. Drug Discov._ , 7(7):608–624, July 2008.
  * Muttenthaler et al. [2021] Markus Muttenthaler, Glenn F King, David J Adams, and Paul F Alewood.  Trends in peptide drug discovery.  _Nat. Rev. Drug Discov._ , 20(4):309–325, April 2021.
  * Vinogradov et al. [2019] Alexander A Vinogradov, Yizhen Yin, and Hiroaki Suga.  Macrocyclic peptides as drug candidates: Recent progress and remaining challenges.  _J. Am. Chem. Soc._ , 141(10):4167–4181, March 2019.
  * Craik et al. [2013] David J Craik, David P Fairlie, Spiros Liras, and David Price.  The future of peptide-based drugs.  _Chem. Biol. Drug Des._ , 81(1):136–147, January 2013.
  * Villar et al. [2014] Elizabeth A Villar, Dmitri Beglov, Spandan Chennamadhavuni, John A Porco, Jr, Dima Kozakov, Sandor Vajda, and Adrian Whitty.  How proteins bind macrocycles.  _Nat. Chem. Biol._ , 10(9):723–731, September 2014.
  * Poongavanam et al. [2018] Vasanthanathan Poongavanam, Emma Danelius, Stefan Peintner, Lilian Alcaraz, Giulia Caron, Maxwell D Cummings, Stanislaw Wlodek, Mate Erdelyi, Paul C D Hawkins, Giuseppe Ermondi, and Jan Kihlberg.  Conformational sampling of macrocyclic drugs in different environments: Can we find the relevant conformations?  _ACS Omega_ , 3(9):11742–11757, September 2018\.
  * Alogheli et al. [2017] Hiba Alogheli, Gustav Olanders, Wesley Schaal, Peter Brandt, and Anders Karlén.  Docking of macrocycles: Comparing rigid and flexible docking in glide.  _J. Chem. Inf. Model._ , 57(2):190–202, February 2017.
  * Garcia Jimenez et al. [2023] Diego Garcia Jimenez, Vasanthanathan Poongavanam, and Jan Kihlberg.  Macrocycles in drug discovery - learning from the past for the future.  _J. Med. Chem._ , 66:5377–5396, April 2023.
  * Leung et al. [2016] Siegfried S F Leung, Daniel Sindhikara, and Matthew P Jacobson.  Simple predictive models of passive membrane permeability incorporating size-dependent membrane-water partition.  _J. Chem. Inf. Model._ , 56(5):924–929, May 2016\.
  * Rezai et al. [2006] Taha Rezai, Jonathan E Bock, Mai V Zhou, Chakrapani Kalyanaraman, R Scott Lokey, and Matthew P Jacobson.  Conformational flexibility, internal hydrogen bonding, and passive membrane permeability: successful in silico prediction of the relative permeabilities of cyclic peptides.  _J. Am. Chem. Soc._ , 128(43):14073–14080, November 2006.
  * Bhardwaj et al. [2022] Gaurav Bhardwaj, Jacob O’Connor, Stephen Rettie, Yen-Hua Huang, Theresa A Ramelot, Vikram Khipple Mulligan, Gizem Gokce Alpkilic, Jonathan Palmer, Asim K Bera, Matthew J Bick, Maddalena Di Piazza, Xinting Li, Parisa Hosseinzadeh, Timothy W Craven, Roberto Tejero, Anna Lauko, Ryan Choi, Calina Glynn, Linlin Dong, Robert Griffin, Wesley C van Voorhis, Jose Rodriguez, Lance Stewart, Gaetano T Montelione, David Craik, and David Baker.  Accurate de novo design of membrane-traversing macrocycles.  _Cell_ , 185(19):3520–3532.e26, September 2022\.
  * Nielsen et al. [2017] Daniel S Nielsen, Nicholas E Shepherd, Weijun Xu, Andrew J Lucke, Martin J Stoermer, and David P Fairlie.  Orally absorbed cyclic peptides.  _Chem. Rev._ , 117(12):8094–8128, June 2017.
  * Kamenik et al. [2018] Anna S Kamenik, Uta Lessel, Julian E Fuchs, Thomas Fox, and Klaus R Liedl.  Peptidic macrocycles - conformational sampling and thermodynamic characterization.  _J. Chem. Inf. Model._ , 58(5):982–992, May 2018\.
  * Watts et al. [2014] K Shawn Watts, Pranav Dalal, Andrew J Tebben, Daniel L Cheney, and John C Shelley.  Macrocycle conformational sampling with MacroModel.  _J. Chem. Inf. Model._ , 54(10):2680–2696, October 2014.
  * Groom et al. [2016] Colin R Groom, Ian J Bruno, Matthew P Lightfoot, and Suzanna C Ward.  The cambridge structural database.  _Acta. Crystallogr. B. Struct. Sci. Cryst. Eng. Mater._ , 72(Pt 2):171–179, April 2016.
  * Berman et al. [2000] H M Berman, J Westbrook, Z Feng, G Gilliland, T N Bhat, H Weissig, I N Shindyalov, and P E Bourne.  The protein data bank.  _Nucleic Acids Res._ , 28(1):235–242, January 2000.
  * Pracht et al. [2020] Philipp Pracht, Fabian Bohle, and Stefan Grimme.  Automated exploration of the low-energy chemical space with fast quantum chemical methods.  _Phys. Chem. Chem. Phys._ , 22(14):7169–7192, April 2020.
  * Riniker and Landrum [2015] Sereina Riniker and Gregory A Landrum.  Better informed distance geometry: Using what we know to improve conformation generation.  _J. Chem. Inf. Model._ , 55(12):2562–2574, December 2015.
  * Wang et al. [2020] Shuzhe Wang, Jagna Witek, Gregory A Landrum, and Sereina Riniker.  Improving conformer generation for small rings and macrocycles based on distance geometry and experimental torsional-angle preferences.  _J. Chem. Inf. Model._ , 60(4):2044–2058, April 2020.
  * Wang et al. [2022] Shuzhe Wang, Kajo Krummenacher, Gregory A Landrum, Benjamin D Sellers, Paola Di Lello, Sarah J Robinson, Bryan Martin, Jeffrey K Holden, Jeffrey Y K Tom, Anastasia C Murthy, Nataliya Popovych, and Sereina Riniker.  Incorporating NOE-Derived distances in conformer generation of cyclic peptides with distance geometry.  _J. Chem. Inf. Model._ , 62(3):472–485, February 2022.
  * Hawkins et al. [2010] Paul C D Hawkins, A Geoffrey Skillman, Gregory L Warren, Benjamin A Ellingson, and Matthew T Stahl.  Conformer generation with OMEGA: algorithm and validation using high quality structures from the protein databank and cambridge structural database.  _J. Chem. Inf. Model._ , 50(4):572–584, April 2010.
  * Hawkins and Nicholls [2012] Paul C D Hawkins and Anthony Nicholls.  Conformer generation with OMEGA: learning from the data set and the analysis of failures.  _J. Chem. Inf. Model._ , 52(11):2919–2936, November 2012.
  * Spellmeyer et al. [1997] D C Spellmeyer, A K Wong, M J Bower, and J M Blaney.  Conformational analysis using distance geometry methods.  _J. Mol. Graph. Model._ , 15(1):18–36, February 1997.
  * Kolossváry and Guida [1996] István Kolossváry and Wayne C Guida.  Low mode search. an efficient, automated computational method for conformational analysis: Application to cyclic and acyclic alkanes and cyclic peptides.  _J. Am. Chem. Soc._ , 118(21):5011–5019, January 1996.
  * Kolossváry and Guida [1999] István Kolossváry and Wayne C Guida.  Low-mode conformational search elucidated: Application to C39H80 and flexible docking of 9-deazaguanine inhibitors into PNP.  _J. Comput. Chem._ , 20(15):1671–1684, November 1999.
  * Chang et al. [1989] George Chang, Wayne C Guida, and W Clark Still.  An internal-coordinate monte carlo method for searching conformational space.  _J. Am. Chem. Soc._ , 111(12):4379–4386, June 1989.
  * Sindhikara et al. [2017] Dan Sindhikara, Steven A Spronk, Tyler Day, Ken Borrelli, Daniel L Cheney, and Shana L Posy.  Improving accuracy, diversity, and speed with prime macrocycle conformational sampling.  _J. Chem. Inf. Model._ , 57(8):1881–1894, August 2017.
  * Grambow et al. [2023] Colin A Grambow, Hayley Weir, Christian N Cunningham, Tommaso Biancalani, and Kangway V Chuang.  CREMP: Conformer-rotamer ensembles of macrocyclic peptides for machine learning, 2023.  URL https://arxiv.org/abs/2305.08057.
  * Damjanovic et al. [2021] Jovan Damjanovic, Jiayuan Miao, He Huang, and Yu-Shan Lin.  Elucidating solution structures of cyclic peptides using molecular dynamics simulations.  _Chem. Rev._ , 121(4):2292–2324, February 2021\.
  * Linker et al. [2023] Stephanie M Linker, Christian Schellhaas, Anna S Kamenik, Mac M Veldhuizen, Franz Waibl, Hans-Jörg Roth, Marianne Fouché, Stephane Rodde, and Sereina Riniker.  Lessons for oral bioavailability: How conformationally flexible cyclic peptides enter and cross lipid membranes.  _J. Med. Chem._ , 66(4):2773–2788, February 2023\.
  * Mansimov et al. [2019] Elman Mansimov, Omar Mahmood, Seokho Kang, and Kyunghyun Cho.  Molecular geometry prediction using a deep generative graph neural network.  _Sci. Rep._ , 9(1):20381, December 2019.
  * Simm and Hernandez-Lobato [2020] Gregor Simm and Jose Miguel Hernandez-Lobato.  A generative model for molecular distance geometry.  In _Proceedings of the 37th International Conference on Machine Learning_ , volume 119 of _Proceedings of Machine Learning Research_ , pages 8949–8958. PMLR, 13–18 Jul 2020.  URL https://proceedings.mlr.press/v119/simm20a.html.
  * Xu et al. [2021] Minkai Xu, Shitong Luo, Yoshua Bengio, Jian Peng, and Jian Tang.  Learning neural generative dynamics for molecular conformation generation.  In _International Conference on Learning Representations_ , 2021.  URL https://openreview.net/forum?id=pAbm1qfheGk.
  * Xu et al. [2022] Minkai Xu, Lantao Yu, Yang Song, Chence Shi, Stefano Ermon, and Jian Tang.  GeoDiff: A geometric diffusion model for molecular conformation generation.  In _International Conference on Learning Representations_ , 2022.  URL https://openreview.net/forum?id=PzcvxEMzvQC.
  * Schärfer et al. [2013] Christin Schärfer, Tanja Schulz-Gasch, Jérôme Hert, Lennart Heinzerling, Benjamin Schulz, Therese Inhester, Martin Stahl, and Matthias Rarey.  CONFECT: conformations from an expert collection of torsion patterns.  _ChemMedChem_ , 8(10):1690–1700, October 2013\.
  * Ganea et al. [2021] Octavian-Eugen Ganea, Lagnajit Pattanaik, Connor W. Coley, Regina Barzilay, Klavs Jensen, William Green, and Tommi S. Jaakkola.  Geomol: Torsional geometric generation of molecular 3d conformer ensembles.  In _Advances in Neural Information Processing Systems_ , 2021.  URL https://openreview.net/forum?id=af_hng9tuNj.
  * Stärk et al. [2022] Hannes Stärk, Octavian Ganea, Lagnajit Pattanaik, Regina Barzilay, and Tommi Jaakkola.  EquiBind: Geometric deep learning for drug binding structure prediction.  In _Proceedings of the 39th International Conference on Machine Learning_ , volume 162 of _Proceedings of Machine Learning Research_ , pages 20503–20521. PMLR, 17–23 Jul 2022.  URL https://proceedings.mlr.press/v162/stark22b.html.
  * Jing et al. [2022] Bowen Jing, Gabriele Corso, Jeffrey Chang, Regina Barzilay, and Tommi Jaakkola.  Torsional diffusion for molecular conformer generation.  In _Advances in Neural Information Processing Systems_ , volume 35, pages 24240–24253. Curran Associates, Inc., 2022.  URL https://proceedings.neurips.cc/paper_files/paper/2022/file/994545b2308bbbbc97e3e687ea9e464f-Paper-Conference.pdf.
  * Axelrod and Gómez-Bombarelli [2022] Simon Axelrod and Rafael Gómez-Bombarelli.  GEOM, energy-annotated molecular conformations for property prediction and molecular generation.  _Sci. Data_ , 9(1):185, April 2022.
  * Jumper et al. [2021] John Jumper, Richard Evans, Alexander Pritzel, Tim Green, Michael Figurnov, Olaf Ronneberger, Kathryn Tunyasuvunakool, Russ Bates, Augustin Žídek, Anna Potapenko, Alex Bridgland, Clemens Meyer, Simon A A Kohl, Andrew J Ballard, Andrew Cowie, Bernardino Romera-Paredes, Stanislav Nikolov, Rishub Jain, Jonas Adler, Trevor Back, Stig Petersen, David Reiman, Ellen Clancy, Michal Zielinski, Martin Steinegger, Michalina Pacholska, Tamas Berghammer, Sebastian Bodenstein, David Silver, Oriol Vinyals, Andrew W Senior, Koray Kavukcuoglu, Pushmeet Kohli, and Demis Hassabis.  Highly accurate protein structure prediction with AlphaFold.  _Nature_ , 596(7873):583–589, August 2021.
  * Baek et al. [2021] Minkyung Baek, Frank DiMaio, Ivan Anishchenko, Justas Dauparas, Sergey Ovchinnikov, Gyu Rie Lee, Jue Wang, Qian Cong, Lisa N Kinch, R Dustin Schaeffer, Claudia Millán, Hahnbeom Park, Carson Adams, Caleb R Glassman, Andy DeGiovanni, Jose H Pereira, Andria V Rodrigues, Alberdina A van Dijk, Ana C Ebrecht, Diederik J Opperman, Theo Sagmeister, Christoph Buhlheller, Tea Pavkov-Keller, Manoj K Rathinaswamy, Udit Dalwadi, Calvin K Yip, John E Burke, K Christopher Garcia, Nick V Grishin, Paul D Adams, Randy J Read, and David Baker.  Accurate prediction of protein structures and interactions using a three-track neural network.  _Science_ , 373(6557):871–876, August 2021.
  * Anand and Achim [2022] Namrata Anand and Tudor Achim.  Protein structure and sequence generation with equivariant denoising diffusion probabilistic models, 2022.  URL https://arxiv.org/abs/2205.15019.
  * Yim et al. [2023] Jason Yim, Brian L. Trippe, Valentin De Bortoli, Emile Mathieu, Arnaud Doucet, Regina Barzilay, and Tommi Jaakkola.  SE(3) diffusion model with application to protein backbone generation, 2023.  URL https://arxiv.org/abs/2302.02277.
  * Wu et al. [2022] Kevin E. Wu, Kevin K. Yang, Rianne van den Berg, James Y. Zou, Alex X. Lu, and Ava P. Amini.  Protein structure generation via folding diffusion, 2022.  URL https://arxiv.org/abs/2209.15611.
  * Parsons et al. [2005] Jerod Parsons, J Bradley Holmes, J Maurice Rojas, Jerry Tsai, and Charlie E M Strauss.  Practical conversion from torsion space to cartesian space for in silico protein synthesis.  _J. Comput. Chem._ , 26(10):1063–1068, 2005.
  * Miao et al. [2021] Jiayuan Miao, Marc L Descoteaux, and Yu-Shan Lin.  Structure prediction of cyclic peptides by molecular dynamics + machine learning.  _Chem. Sci._ , 12(44):14927–14936, November 2021\.
  * Fishman et al. [2023] Nic Fishman, Leo Klarner, Valentin De Bortoli, Emile Mathieu, and Michael Hutchinson.  Diffusion models for constrained domains, 2023.  URL https://arxiv.org/abs/2304.05364.
  * Gasteiger et al. [2020] Johannes Gasteiger, Janek Groß, and Stephan Günnemann.  Directional message passing for molecular graphs.  In _International Conference on Learning Representations_ , 2020.  URL https://openreview.net/forum?id=B1eWbxStPH.
  * Peng et al. [1996] Chunyang Peng, Philippe Y. Ayala, H. Bernhard Schlegel, and Michael J. Frisch.  Using redundant internal coordinates to optimize equilibrium geometries and transition states.  _J. of Comput. Chem._ , 17(1):49–56, 1996.
  * Ramachandran and Sasisekharan [1968] G N Ramachandran and V Sasisekharan.  Conformation of polypeptides and proteins.  _Adv. Protein Chem._ , 23:283–438, 1968.
  * Dunbrack and Karplus [1994] Roland L. Dunbrack and Martin Karplus.  Conformational analysis of the backbone-dependent rotamer preferences of protein sidechains.  _Nat. Struct. Biol._ , 1(5):334–340, 1994.
  * Han and Rudolph [2006] Li Han and Lee Rudolph.  Inverse kinematics for a serial chain with joints under distance constraints.  In _Robotics: Science and Systems_ , 2006.
  * Sohl-Dickstein et al. [2015] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli.  Deep unsupervised learning using nonequilibrium thermodynamics.  In _Proceedings of the 32nd International Conference on Machine Learning_ , volume 37 of _Proceedings of Machine Learning Research_ , pages 2256–2265, Lille, France, 07–09 Jul 2015. PMLR.  URL https://proceedings.mlr.press/v37/sohl-dickstein15.html.
  * Ho et al. [2020] Jonathan Ho, Ajay Jain, and Pieter Abbeel.  Denoising diffusion probabilistic models.  In _Advances in Neural Information Processing Systems_ , volume 33, pages 6840–6851. Curran Associates, Inc., 2020.  URL https://proceedings.neurips.cc/paper_files/paper/2020/file/4c5bcfec8584af0d967f1ab10179ca4b-Paper.pdf.
  * Song et al. [2021] Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole.  Score-based generative modeling through stochastic differential equations.  In _International Conference on Learning Representations_ , 2021.  URL https://openreview.net/forum?id=PxTIG12RRHS.
  * Vaswani et al. [2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin.  Attention is all you need.  In _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017.
  * Devlin et al. [2019] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics.  URL https://aclanthology.org/N19-1423.
  * Shaw et al. [2018] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani.  Self-attention with relative position representations.  In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers)_ , pages 464–468, New Orleans, Louisiana, June 2018. Association for Computational Linguistics.  URL https://aclanthology.org/N18-2074.
  * Kraft [1988] Dieter Kraft.  A software package for sequential quadratic programmings.  _Tech. Rep. DFVLR-FB 88-28_ , 1988.
  * Bannwarth et al. [2019] Christoph Bannwarth, Sebastian Ehlert, and Stefan Grimme.  GFN2-xTB-an accurate and broadly parametrized self-consistent tight-binding quantum chemical method with multipole electrostatics and density-dependent dispersion contributions.  _J. Chem. Theory Comput._ , 15(3):1652–1671, March 2019.
  * Schulz-Gasch et al. [2012] Tanja Schulz-Gasch, Christin Schärfer, Wolfgang Guba, and Matthias Rarey.  TFD: Torsion fingerprints as a new measure to compare small molecule conformations.  _J. Chem. Inf. Model._ , 52(6):1499–1512, June 2012.
  * Software [2022] OpenEye Scientific Software.  OMEGA 4.2. 1.2, 2022.  URL http://www.eyesopen.com.
  * Nichol and Dhariwal [2021] Alexander Quinn Nichol and Prafulla Dhariwal.  Improved denoising diffusion probabilistic models.  In _Proceedings of the 38th International Conference on Machine Learning_ , volume 139 of _Proceedings of Machine Learning Research_ , pages 8162–8171. PMLR, 18–24 Jul 2021.  URL https://proceedings.mlr.press/v139/nichol21a.html.
  * Girshick [2015] Ross Girshick.  Fast R-CNN.  In _2015 IEEE International Conference on Computer Vision (ICCV)_ , pages 1440–1448, 2015.  doi: 10.1109/ICCV.2015.169.
  * Landrum [2006] Greg Landrum.  RDKit: Open-source cheminformatics, 2006.  URL https://rdkit.org.
  * Paszke et al. [2019] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala.  Pytorch: An imperative style, high-performance deep learning library.  In _Advances in Neural Information Processing Systems 32_ , pages 8024–8035. Curran Associates, Inc., 2019.
  * Falcon and The PyTorch Lightning team [2019] William Falcon and The PyTorch Lightning team.  PyTorch Lightning, March 2019.  URL https://github.com/Lightning-AI/lightning.
  * Wolf et al. [2020] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush.  Transformers: State-of-the-art natural language processing.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ , pages 38–45, Online, October 2020. Association for Computational Linguistics.  URL https://www.aclweb.org/anthology/2020.emnlp-demos.6.
  * Halgren [1996] Thomas A Halgren.  Merck molecular force field. V. Extension of MMFF94 using experimental data, additional computational data, and empirical rules.  _J. Comput. Chem._ , 17(5–6):616–641, 1996.

## Appendix

##  Appendix A Glossary

Table 2: Glossary of notation and terms used in the methods section. Symbol | Description
---|---
Molecular Representation and Coordinates
$\mathcal{G}$ | Macrocycle graph, where $\mathcal{G}=(\mathcal{V},\mathcal{E})$.
$\mathcal{V}$ | Set of atom vertices in a macrocycle graph $\mathcal{G}$.
$\mathcal{E}$ | Set of edges (bonds) between the atoms in a macrocycle graph $\mathcal{G}$.
$\mathcal{C}$ | Set (ensemble) of conformers for a macrocycle, where $\mathcal{C}=\\{c_{1},c_{2},\dots,c_{K}\\}$.
$\mathcal{D}$ | Bond distances in a conformer ensemble $\mathcal{C}$.
$\Theta$ | Bond angles in a conformer ensemble $\mathcal{C}$.
$\mathcal{T}$ | Dihedral (torsional) angles in a conformer ensemble $\mathcal{C}$.
$\bm{\upxi}$ | Vector of all Cartesian coordinates in a conformer.
$\mathbf{d}$ | Vector of all bond distances in a conformer.
$\bm{\uptheta}$ | Vector of all bond angles in a conformer.
$\bm{\uptau}$ | Vector of all dihedral (torsional) angles in a conformer.
$d_{i,j}$ | Bond distance between atoms $v_{i}$ and $v_{j}$.
$\theta_{i,j,k}$ | Bond angle between atoms $v_{i}$, $v_{j}$, and $v_{k}$.
$\tau_{i,j,k,l}$ | Dihedral (torsional) angle between atoms $v_{i}$, $v_{j}$, $v_{k}$, and $v_{l}$.
$\phi$ | Dihedral angle of bond between nitrogen and $\alpha$-carbon.
$\psi$ | Dihedral angle of bond between $\alpha$-carbon and carbonyl-carbon.
$\omega$ | Dihedral angle of bond between carbonyl-carbon and nitrogen (peptide bond).
Encoder Model
$\mathbf{a}_{i}$ | Atom features for vertex $v_{i}$.
$\theta_{i}$ | Bond angle corresponding to vertex $v_{i}$.
$\tau_{i}$ | Dihedral (torsional) angle corresponding to vertex $v_{i}$.
$\mathbf{x}_{i}$ | Internal coordinates corresponding to vertex $v_{i}$, where $\mathbf{x}_{i}=[\theta_{i},\tau_{i}]$.
$\mathbf{v}_{i}$ | Input/hidden representation for vertex $v_{i}$.
$\mathbf{z}_{i}$ | Self-attention output for vertex $v_{i}$.
$\alpha_{ij}$ | Attention probability between vertices $v_{i}$ and $v_{j}$.
$e_{ij}$ | Unnormalized attention score between vertices $v_{i}$ and $v_{j}$.
$d_{z}$ | Attention head dimensionality.
$\mathbf{p}_{ij}^{K}$ | Cyclic relative positional embedding between vertices $v_{i}$ and $v_{j}$.
$\mathbf{W}^{K}$ | Key matrix.
$\mathbf{W}^{Q}$ | Query matrix.
$\mathbf{W}^{V}$ | Value matrix.
$\mathbf{W}^{D}$ | Graph-distance embedding matrix.
Diffusion Process
$\mathbf{x}_{t}$ | Noised internal coordinates (bond angle and torsion) at time step $t$.
$q(\mathbf{x}_{t}\;|\;\mathbf{x}_{t-1})$ | Forward transition probability.
$p_{\Xi}(\mathbf{x}_{t-1}\;|\;\mathbf{x}_{t})$ | Diffusion model (reverse transition probability) parameterized by $\Xi$.
$\beta_{t}$ | Variance from cosine variance schedule at time step $t$.
$\bm{\upepsilon}_{t}$ | Noise scale at time step $t$.
Miscellaneous
$\hat{\cdot}$ | Denotes predicted/generated quantity.
$w(\cdot)$ | Function to wrap within $[-\pi,\pi)$ range, $w(\tau)\coloneqq(\tau+\pi)\bmod(2\pi)-\pi$.
$\delta$ | Threshold for evaluating Coverage metric.

##  Appendix B Dataset Description

Table 3: Dataset statistics for CREMP [28]. Residues | Molecules | Conformers
---|---|---
|  | Count | Mean | Median | Std. Dev. | Min. | Max.
4 | 17,842 | 12,205,128 | 684 | 508 | 677 | 1 | 12,268
5 | 13,644 | 14,134,609 | 1,036 | 825 | 824 | 6 | 8,486
6 | 4,712 | 4,921,068 | 1,044 | 879 | 764 | 28 | 5,619
Total | 36,198 | 31,260,805 | 864 | 656 | 768 | 1 | 12,268

##  Appendix C Training Details

We use the discrete-time diffusion model from Wu et al. [44] that formulates
the forward transition probability using a wrapped normal distribution,

$\begin{split}q\left(\mathbf{x}_{t}\;\middle|\;\mathbf{x}_{t-1}\right)&=\mathcal{N}_{\text{wrapped}}\left(\mathbf{x}_{t};\sqrt{1-\beta_{t}}\mathbf{x}_{t-1},\beta_{t}\mathbf{I}\right)\\\
&=\frac{1}{\beta_{t}\sqrt{2\pi}}\sum_{\mathbf{k}\in\mathbb{Z}^{n}}\exp\left(\frac{-\left\|\mathbf{x}_{t}-\sqrt{1-\beta_{t}}\mathbf{x}_{t-1}+2\pi\mathbf{k}\right\|^{2}}{2\beta_{t}^{2}}\right)\end{split}$
(4)

instead of a standard normal distribution [38], where $\mathbf{x}_{t}$
represents the noised internal coordinates (bond angle and torsion) at time
step $t$. The diffusion model, $p_{\Xi}(\mathbf{x}_{t-1}\;|\;\mathbf{x}_{t})$,
parameterized by $\Xi$, reverses the process to denoise a wrapped normal
distribution toward the data distribution. In the conditional setting, we
further guide the diffusion process by learning
$p_{\Xi}\left(\mathbf{x}_{t-1}\;\middle|\;\mathbf{x}_{t},\mathcal{G}\right)$
in order to draw samples from the ensemble for a specific macrocycle,
$\mathcal{G}$. We use the same cosine variance schedule as Wu et al. [44] and
Nichol and Dhariwal [63] for $\beta_{t}\in(0,1)_{t=1}^{T}$, but with
significantly fewer time steps (typically, $T=20$).
$p_{\Xi}(\mathbf{x}_{t-1}\;|\;\mathbf{x}_{t})$ and
$p_{\Xi}\left(\mathbf{x}_{t-1}\;\middle|\;\mathbf{x}_{t},\mathcal{G}\right)$
are trained using the simplified objective from Ho et al. [54] to train a
neural network, $\bm{\upepsilon}_{\Xi}(\mathbf{x}_{t},t)$, to predict the
noise present at a given time step by minimizing a smooth L1 loss [64] wrapped
by $w(\mathbf{x})=(\mathbf{x}+\pi)\bmod(2\pi)-\pi$:

$\begin{split}\mathbf{d}_{w}&=w\left(\bm{\upepsilon}-\bm{\upepsilon}_{\Xi}\left(w\left(\sqrt{\bar{\alpha}_{t}}\mathbf{x}_{0}+\sqrt{1-\bar{\alpha}_{t}}\bm{\upepsilon}\right),t\right)\right)\\\
L_{w}&=\frac{1}{N}\sum_{i=1}^{N}\begin{cases}0.5\frac{d_{w,i}^{2}}{\beta_{L}}&\text{if
}|d_{w,i}|<\beta_{L}\\\
|d_{w,i}|-0.5\beta_{L}&\text{otherwise}\end{cases}\end{split}$ (5)

with $\beta_{L}=0.1\pi$ as the transition point between L1 and L2 regimes
[44], $\alpha_{t}=1-\beta_{t}$, and
$\bar{\alpha}_{t}=\prod_{s=1}^{t}\alpha_{s}$. We sample time steps uniformly
from $t\sim U(0,T)$ during training and shift the bond angles and dihedrals
using the element-wise means from the training data.

##  Appendix D Sampling Details

We also use the sampling scheme from Wu et al. [44]. During inference, we
first sample $\mathbf{x}_{T}$ from a wrapped normal distribution and
iteratively generate $\mathbf{x}_{0}$ from $t=T$ to $t=1$ using

$\mathbf{x}_{t-1}=w\left(\frac{1}{\sqrt{\alpha_{t}}}\left(\mathbf{x}_{t}-\frac{1-\alpha_{t}}{\sqrt{1-\bar{\alpha}_{t}}}\bm{\upepsilon}_{\Xi}(\mathbf{x}_{t},t)\right)+\sigma_{t}\mathbf{x}\right)$
(6)

where $\sigma_{t}=\sqrt{\beta_{t}(1-\bar{\alpha}_{t-1})/(1-\bar{\alpha}_{t})}$
is the variance of the reverse process and
$\mathbf{z}=\mathcal{N}(\mathbf{0},\mathbf{I})$ if $t>1$ and
$\mathbf{z}=\mathbf{0}$ otherwise.

##  Appendix E Model Details and Hyperparameters

Our model is a BERT transformer [57] with cyclic relative positional encodings
described in Equations (1) and (2). The model input is a sequence of internal
coordinates (and atom features for the conditional model). We linearly upscale
the two-dimensional model input (bond angles and dihedrals) and separately
upscale the atom features. Angles and atom features are then concatenated. The
time step is embedded using random Fourier embeddings [55] and added to the
upscaled input. The combined embeddings are passed through the BERT
transformer, the output of which is passed through a two-layer feed-forward
network with GELU activation and layer normalization. Relevant hyperparameters
are shown in Table 4.

Table 4: Hyperparameters. Parameter | Value
---|---
Angle embedding size | 256
Atom feature embedding size | 128
Encoder layer dimensionality (hidden size) | 384
Number of hidden layers | 12
Number of attention heads | 12
Feed-forward layer dimensionality (intermediate size) | 512
Optimizer | AdamW
Learning rate | ${10}^{-3}$
Maximum number of epochs | 1000
Warmup epochs | 10
Batch size | 8192

To condition on the atom sequence, we encode each atom using features of the
atom itself and a Morgan fingerprint representation of the side chain attached
to the atom (including the atom itself). The atom features include the atomic
number, a chiral tag (L, D, or no chirality), aromaticity, hybridization,
degree, valence, number of hydrogens, charge, sizes of rings that the atom is
in, and the number of rings that the atom is in. The Morgan fingerprint is a
count fingerprint with radius 3 and size 32.

##  Appendix F Optimization for Back Conversion to Cartesian Ring Coordinates

Figure 5: Our constrained optimization procedure is robust to noise as
illustrated by a synthetic test of applying noise to the dihedral angles,
recovering Cartesian coordinates using Equation (3), and comparing to the
initial geometry in terms of RMSD and TFD.

To convert from the set of redundant internal coordinates predicted by the
model back to Cartesian coordinates, we solve the optimization in Equation (3)
to obtain a set of Cartesian coordinates that exactly satisfies the known bond
distances in the ring. To demonstrate that this procedure is robust to noise,
we repeatedly embed 4-, 5-, and 6-mer backbones in 3D using RDKit distance
geometry, extract their (redundant) internal coordinates, and add noise to the
dihedral angles at different noise scales (standard deviation of a normal
distribution) while ensuring that angles always remain in the $[-\pi,\pi)$
range. This creates a set of inconsistent, redundant dihedral angles, i.e.,
there exists no direct correspondence in Cartesian coordinates. We recover a
possible Cartesian configuration using Equation (3) and compute RMSD and TFD
for the ring atoms compared to the “true” internal coordinates from the RDKit
geometry. Figure 5 shows that even moderate errors
($\sim$$0.1\text{\,}\mathrm{r}\mathrm{a}\mathrm{d}$) result in very small
errors in terms of both RMSD ($\sim$$0.1\text{\,}\mathrm{\text{\r{A}}}$) and
TFD ($\sim$0.02).

Notably, the optimization problem in Equation (3) is non-convex and requires a
suitable initial guess to perform well. We assign this initial guess by
obtaining a Cartesian geometry using the approach of sequentially setting atom
positions according to the sequence of bond distances, angles, and torsions
starting from one of the atoms in the ring. The starting atom is selected such
that the redundant bond distance most closely matches the true bond distance
(obtained from the training data). Improving the initial guess could be
another direction for future research.

##  Appendix G Software

All experiments were performed using Python and standard numerical libraries.
For cheminformatics analysis, all molecules were processed using either
OpenEye Applications and Toolkits [62] or the open-source cheminformatics
library RDKit [65]. We implemented all experiments in Python using PyTorch
[66] and PyTorch Lightning [67]. Transformers were implemented using BERT
models within HuggingFace Transformers [68].

##  Appendix H Hardware

Each model was trained on a single NVIDIA A100 GPU with 80 GB VRAM using 12
CPUs for data loading and 96 GB of memory.

##  Appendix I Evaluation

To measure both diversity and quality of the generated ensembles, we follow
previous work and leverage four RMSD-based metrics [33, 36] with the
difference that we only evaluate RMSD on macrocycle atoms. The _recall_ -based
Coverage metric measures the percentage of correctly generated conformers at a
certain RMSD threshold, $\delta_{\text{RMSD}}$. For a ground-truth ensemble
$\mathcal{C}$ and a generated ensemble $\hat{\mathcal{C}}$:

$\text{RMSD-
COV-R}(\hat{\mathcal{C}},\mathcal{C})=\frac{1}{\lvert\mathcal{C}\rvert}\left\lvert\left\\{c\in\mathcal{C}:\exists\hat{c}\in\hat{\mathcal{C}},\text{RMSD}(\hat{c},c)\leq\delta_{\text{RMSD}}\right\\}\right\rvert$
(7)

The _recall_ -based Matching metric measures the average RMSD across the
closest-matching (minimum-RMSD) generated conformer for each ground-truth
conformer:

$\text{RMSD-
MAT-R}(\hat{\mathcal{C}},\mathcal{C})=\frac{1}{\lvert\mathcal{C}\rvert}\sum_{c\in\mathcal{C}}\min_{\hat{c}\in\hat{\mathcal{C}}}\text{RMSD}(\hat{c},c)$
(8)

The other two RMSD-based metrics are _precision_ metrics that are defined
identically, except that the ground-truth and generated ensembles are
switched, and therefore constitute a measure of how many generated conformers
are of high quality.

Analogous to the RMSD-based metrics, we define four metrics based on torsion
fingerprint deviation (TFD) [61, 19] to measure diversity and quality in terms
of the torsional profiles of the generated rings:

$\text{TFD-
COV-R}(\hat{\mathcal{C}},\mathcal{C})=\frac{1}{\lvert\mathcal{C}\rvert}\left\lvert\left\\{c\in\mathcal{C}:\exists\hat{c}\in\hat{\mathcal{C}},\text{TFD}(\hat{c},c)\leq\delta_{\text{TFD}}\right\\}\right\rvert$
(9)

$\text{TFD-
MAT-R}(\hat{\mathcal{C}},\mathcal{C})=\frac{1}{\lvert\mathcal{C}\rvert}\sum_{c\in\mathcal{C}}\min_{\hat{c}\in\hat{\mathcal{C}}}\text{TFD}(\hat{c},c)$
(10)

TFD quantifies how well the macrocycle torsion angles match between two
conformers and is given by [19]:

$\text{TFD}(\hat{c},c)=\frac{1}{n}\sum_{i=1}^{n}\frac{1}{\pi}\left\lvert
w\left(\tau_{i}(\hat{c})-\tau_{i}(c)\right)\right\rvert$ (11)

where $\tau_{i}(c)$ extracts the $i$-th macrocycle torsion angle of conformer
$c$ and $w(\cdot)$ ensures that the deviation is wrapped correctly around the
$[-\pi,\pi)$ boundary. Each torsion deviation is normalized by the maximum
(absolute) deviation, $\pi$, so that TFD lies in $[0,1]$.

##  Appendix J Conformer Generation Baselines

#### RDKit ETKDGv3

RDKit baselines used ETKDGv3 [18, 19] with macrocycle torsion preferences. We
first embedded up to $2K$ conformers (where $K$ is the number of true
conformers) using EmbedMultipleConfs with random coordinate initialization
(useRandomCoords=True), which has been shown to be beneficial for generating
macrocycle geometries [19]. Conformers were subsequently optimized using
MMFF94 [69] as implemented in RDKit and sorted by energy. Finally, the sorted
conformers were filtered based on heavy-atom RMSD with a threshold of
$0.1\text{\,}\mathrm{\text{\r{A}}}$.

#### OpenEye OMEGA: Macrocycle Mode

OMEGA baselines were performed using OpenEye Applications (2022.1.1) with
OMEGA (v.4.2.0) [21, 22] in macrocycle mode [23]. Conformational ensembles
were generated with the following macrocycle settings: maxconfs=$2K$,
ewindow=20, rms=0.1, dielectric_constant=5.0, where $K$ corresponds to the
number of ground truth conformers from the original CREST ensemble in the
CREMP dataset. The dielectric constant was set to 5.0 (chloroform) to most
closely mimic the implicit chloroform solvation used in CREMP.

#### GeoDiff

We used the original paper implementation of GeoDiff from Xu et al. [34]
available at https://github.com/MinkaiXu/GeoDiff, which we retrained to
convergence on the CREMP dataset with the same data splits. As with all the
other methods, we evaluated GeoDiff by sampling $2K$ conformers for each
molecule. Inference for GeoDiff uses 5,000 time steps, which required more
than $24\text{\,}\mathrm{h}$ for all test set molecules on 20 A100 GPUs.

##  Appendix K Additional Unconditional Generation Results

Figure 6: Bond angle distributions split by number of residues. Figure 7:
Dihedral angle distributions split by number of residues. Figure 8:
Ramachandran distributions split by number of residues.

##  Appendix L Additional Sequence-Conditioned Generation Results

###  L.1 Distributions

Figure 9: Comparison of the bond angle and dihedral distributions from the
held-out test set and in the _conditionally_ generated samples.

Figure 10 shows the Ramachandran plots split by number of residues for the
conditional model and illustrates the effect of Equation (3) to reconstruct
realizable Cartesian geometries from the set of redundant internal coordinates
predicted by the model. Notably, while the reconstructed geometries still
reproduce the joint distribution over dihedral angles well, several artifacts
are introduced as a result of the optimization, which motivates the further
development of generative methods that directly incorporate the cyclic
constraints into the diffusion process itself.

Figure 10: Ramachandran distributions for _conditionally_ generated samples
split by number of residues. The “Reconstructed” column shows the
distributions after converting to Cartesian coordinates using the SLSQP
optimization in Equation (3). Figure 11: Ramachandran distributions for
_conditionally_ generated samples split by number of residues. The
“Reconstructed” column shows the distributions after converting to Cartesian
coordinates using the _naive_ approach of setting internal coordinates
sequentially from the starting atom that results in the structure with the
smallest error in the last, redundant bond distance.

###  L.2 Confidence Intervals

Table 5: Performance metrics for sequence-conditioned generation of macrocycles using RMSD of macrocycle ring atoms. Coverage is evaluated at a threshold of $0.1\text{\,}\mathrm{\text{\r{A}}}$. Metrics shown as 95% bootstrap confidence intervals. | RMSD – Recall
---|---
| Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$
Method | Mean | Med. | Mean | Med.
RDKit [19] | (33.4, 38.4) | (5.9, 12.8) | (0.179, 0.195) | (0.148, 0.168)
OMEGA [62] | (29.9, 34.6) | (4.2, 10.2) | (0.18, 0.193) | (0.148, 0.174)
GeoDiff-Macro [34] | (48.5, 53.2) | (47.1, 58.9) | (0.144, 0.159) | (0.111, 0.129)
RINGER | (75.5, 78.4) | (82.3, 86.2) | (0.087, 0.096) | (0.069, 0.075)
RINGER (opt) | (78.3, 80.9) | (84.3, 88.0) | (0.08, 0.09) | (0.062, 0.068)
| RMSD – Precision
RDKit [19] | (5.1, 6.1) | (0.6, 1.3) | (0.529, 0.552) | (0.492, 0.515)
OMEGA [62] | (3.4, 4.0) | (0.9, 1.7) | (0.548, 0.567) | (0.517, 0.535)
GeoDiff-Macro [34] | (5.9, 6.9) | (2.3, 3.6) | (0.581, 0.604) | (0.546, 0.571)
RINGER | (59.4, 63.1) | (66.0, 72.0) | (0.175, 0.196) | (0.114, 0.129)
RINGER (opt) | (54.6, 58.1) | (58.2, 65.5) | (0.421, 0.462) | (0.321, 0.384)
Table 6: Performance metrics for sequence-conditioned generation of macrocycles using torsional fingerprint deviation (TFD) of ring torsions. Coverage is evaluated at a threshold of 0.05. Metrics shown as 95% bootstrap confidence intervals. | TFD – Recall
---|---
| Coverage $\uparrow$ | MAT $\downarrow$
Method | Mean | Med. | Mean | Med.
RDKit [19] | (50.5, 55.3) | (48.6, 63.2) | (0.057, 0.062) | (0.048, 0.054)
OMEGA [62] | (47.4, 52.0) | (40.2, 56.5) | (0.059, 0.063) | (0.052, 0.059)
GeoDiff-Macro [34] | (66.0, 70.2) | (79.1, 86.1) | (0.046, 0.051) | (0.035, 0.039)
RINGER | (89.1, 91.0) | (94.3, 95.6) | (0.023, 0.026) | (0.018, 0.02)
RINGER (opt) | (88.2, 90.1) | (93.7, 95.0) | (0.023, 0.026) | (0.018, 0.02)
| TFD – Precision
RDKit [19] | (8.7, 10.1) | (3.9, 5.6) | (0.21, 0.219) | (0.201, 0.211)
OMEGA [62] | (6.2, 7.1) | (3.8, 4.7) | (0.222, 0.228) | (0.215, 0.222)
GeoDiff-Macro [34] | (8.5, 9.6) | (5.2, 7.3) | (0.244, 0.253) | (0.234, 0.245)
RINGER | (73.0, 76.3) | (84.4, 87.7) | (0.055, 0.063) | (0.03, 0.036)
RINGER (opt) | (60.1, 63.4) | (66.5, 71.5) | (0.064, 0.072) | (0.042, 0.048)

###  L.3 Additional Evaluation

Table 7: Evaluating RINGER (opt) trained and sampled with different numbers of timesteps. | RMSD – Recall | RMSD – Precision
---|---|---
| Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$ | Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$
Timesteps | Mean | Med. | Mean | Med. | Mean | Med. | Mean | Med.
20 | 79.7 | 86.3 | 0.084 | 0.065 | 56.4 | 62.7 | 0.441 | 0.356
50 | 80.8 | 88.0 | 0.082 | 0.061 | 60.5 | 68.9 | 0.431 | 0.335
100 | 81.5 | 88.9 | 0.080 | 0.060 | 58.0 | 65.2 | 0.443 | 0.365

Table 8 shows that bond angles are required in addition to dihedral angles in
order for the model to perform well. To reconstruct Cartesian geometries using
the dihedral-only model, we modified Equation (3) to include inequality
constraints for the bond angles where the upper and lower limit are determined
by the standard deviations of bond angles from the training data.

Table 8: Evaluating RINGER (opt) trained only with dihedral angles. | RMSD – Recall | RMSD – Precision
---|---|---
| Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$ | Coverage (%) $\uparrow$ | MAT ($\mathrm{\text{\r{A}}}$) $\downarrow$
| Mean | Med. | Mean | Med. | Mean | Med. | Mean | Med.
$\mathbf{x}_{i}=[\theta_{i},\tau_{i}]$ | 79.7 | 86.3 | 0.084 | 0.065 | 56.4 | 62.7 | 0.441 | 0.356
$\mathbf{x}_{i}=[\tau_{i}]$ | 66.8 | 73.5 | 0.130 | 0.101 | 41.1 | 37.6 | 0.469 | 0.417
| TFD – Recall | TFD – Precision
| Coverage (%) $\uparrow$ | MAT $\downarrow$ | Coverage (%) $\uparrow$ | MAT $\downarrow$
| Mean | Med. | Mean | Med. | Mean | Med. | Mean | Med.
$\mathbf{x}_{i}=[\theta_{i},\tau_{i}]$ | 89.2 | 94.3 | 0.024 | 0.019 | 61.8 | 68.9 | 0.068 | 0.044
$\mathbf{x}_{i}=[\tau_{i}]$ | 83.2 | 91.0 | 0.035 | 0.024 | 49.2 | 49.3 | 0.144 | 0.114