NMR-Solver: automated structure elucidation via large-scale spectral matching and physics-guided fragment optimization

Domain: physics
Published: 2026-04-02
Editorial outcome: minor_revision

Abstract
Nuclear Magnetic Resonance (NMR) spectroscopy is one of the most powerful and widely used tools for molecular structure elucidation in organic chemistry. However, the interpretation of NMR spectra to determine unknown molecularstructuresremainsalabor-intensiveandexpertise-dependentprocess,particularly for complex or novel compounds. Although recent methods have been proposed for molecular structure elucidation, they often underperform in real-world applications due to inherent algorithmic limitations and limited high-quality data. Here, we present NMR-Solver, a practical and interpretable framework for the automated determination of small organic molecule structures from 1H and 13C NMR spectra. Our method introduces an automated framework for molecular structure elucidation, integrating large-scale spectral matching with physics-guided molecular optimization that exploits atomic-level structure–spectrum relationships in NMR. We evaluate NMR-Solver on simulatedbenchmarks,curatedexperimentaldatafromtheliterature,andreal-worldexperiments, demonstrating its strong generalization, robustness, and practical utility in real-life scenarios. By integrating computational NMR analysis, deep learning,andinterpretablechemicalreasoningintoaunifiedsystem,itfacilitates scalable,automated,andchemicallymeaningfulmolecularstructureelucidation, establishing a generalizable paradigm for solving inverse problems in molecular science.

Introduction
NuclearMagneticResonance(NMR)spectroscopystandsasthemostinformativeand widely used technique for molecular structure elucidation in organic chemistry [1]. Unlike mass spectrometry or infrared spectroscopy, which primarily yield fragmentation patterns or functional group, NMR provides atomic-level insights into molecular connectivity,stereochemistry,andspatialarrangement[2].Thesecharacteristicsmake NMR indispensable for the structural characterization of both known and novel small organic molecules, delivering a comprehensive view of the complete molecular architecture.

Despite its analytical power, the interpretation of NMR spectra is a time-consumingandexpertise-dependentprocess.Althoughcomputationaltechniques[3–6] and simulation software [7–9] have made advances in assisting peak picking, shift assignment and structure validation, manual interpretation remains the standard practice in many laboratories. This reliance on human expertise not only limits throughput but also introduces variability and potential errors, particularly for complex or unknown compounds. Compounding this challenge is the vastness of chemical space—estimated to encompass over 1060 plausible organic molecules [10]—which makes structure elucidation a highly complex task. As high-throughput experimentation (HTE) and AI-assisted automated synthesis platforms continue to advance [11–16], automated spectral analysis is playing an increasingly crucial role in driving the discovery of synthetic pathways and new reactions. [17–19]. This, in turn, has fueledanescalatingdemandforrapid,accurate,andautomatedNMR-basedstructure elucidation to keep pace with the accelerating advancements in synthetic chemistry.

Recent advances in deep learning have significantly improved the accuracy and efficiency of predicting chemical shifts from known molecular structures—a key component of forward NMR simulation [20–23]. Both 2D graph-based models and 3D conformation-aware architectures now achieve accurate predictions comparable to density functional theory (DFT) [24] calculations, with orders of magnitude faster inference, exemplified by GT-NMR [25] and NMRNet [26], respectively. These capabilities have enabled large-scale spectral matching and provide a foundation for addressing the more challenging inverse problem: determining molecular structures from experimental NMR spectra.

In parallel with advances in forward spectral modeling, several approaches have beenproposedtoaddressthisinverseproblem,broadlyfallingintotwocategories—AI generative models and traditional approaches. Among the recent generative modeling approaches, the typical framework is encoding NMR spectra into token sequences and employs a sequence-to-sequence architecture to generate molecular text representations [27–29], such as SMILES [30] and SELFIES [31]. While these end-to-end frameworkseliminatetheneedformanualfeatureengineering,theysufferfromlimited generalization and poor interpretability. Moreover, due to the scarcity of high-quality experimental datasets, such models are typically trained on simulated data, leading to a significant domain gap between training and real-world conditions. This undermines their reliability in practical applications and their ability to generalize to out-of-distribution chemical structures.

In contrast, traditional optimization strategies—such as genetic algorithms [32, 33]—offer greater transparency by explicitly exploring molecular space through iterative refinement [34, 35]. To obtain a suitable initial population, database lookups are commonlyemployedtorapidlyselectfromknowncompounds[36–38].However,their stochastic and undirected search mechanisms lead to inefficient and unstable navigationofthevastchemicalspace,oftenfailingtoconvergetothedesiredmoleculeswithin feasiblecomputationaltime.Thesechallengesarefurtherexacerbatedwhenaddressing the objective of structure elucidation, where only a single, definitive solution exists.

Despite their differing paradigms, both generative and traditional approaches fail to reliably bridge NMR spectra with novel, chemically valid structures under practicalconditions—eitherduetopoorreliabilityandgeneralization,orinefficiencyarising from random exploration. There remains a critical need for more effective strategies that fully leverage NMR spectral information and demonstrate robustness and reliability in practical applications.

To address these challenges, we propose NMR-Solver, an automated and interpretableframeworkfordeterminingsmallorganicmoleculestructuresfrom1Hand13C NMRspectra.Builtonaphysics-guided,fragment-basedoptimizationstrategy,NMR-Solver integrates large-scale spectral matching with atomic-level structure–spectrum correlations to guide molecular assembly in a chemically meaningful and transparent manner. Unlike traditional approaches that rely on random and undirected search, our method navigates chemical space in a targeted manner by evolving molecular fragments based on observable spectral features. This enables robust and efficient structure elucidation in real-world scenarios—where novel scaffolds, spectral ambiguities,and incompletedatapose significantchallenges—whileensuringfull traceability ofeachstructuraldecisiontoexperimentalevidence.Asaresult,NMR-Solverprovides a reliable and trustworthy solution for practical structure determination.

Results
As illustrated in Fig. 1, the NMR-Solver framework consists of four core modules: molecular optimization, forward prediction, database retrieval, and scenario adaptation. Operating in a closed-loop manner, it addresses the inverse NMR problem by starting from initial candidate structures—obtained via database retrieval or user input—anditerativelyrefiningthemthroughfragment-basedmolecularoptimization. In each iteration, the spectra of evolving candidates are simulated and compared against experimental data, guiding the search toward chemically valid and spectrally consistent solutions (see Fig. 2 for an illustration of the iterative refinement process).

CentraltoNMR-SolveristheFragment-NMR-BasedMolecularOptimization(FB-MO) module, which employs a physics-guided, fragment-based strategy to iteratively refinecandidatestructures.Inasingleiteration,themodulegeneratesnewcandidates by considering chemically valid fragment recombinations from the current molecular pool,potentiallyexceeding109possibilitiesundertypicalsettings.Insteadofexploring this space randomly, the search is guided by atomic-level structure–spectrum correlations,enablingefficientfilteringofpotentialoffspringwhosesimulatedspectraclosely match the experimental data. This focused, evidence-driven exploration ensures both high efficiency and interpretability, with each structural optimization traceable to specific NMR features.

To support rapid spectral evaluation during optimization, we employ pre-trained NMRNet [26], an SE(3)-equivariant Transformer [39] architecture that that predicts 1H and 13C chemical shifts with highaccuracy (reported MAE: 0.181 ppm for 1H, 1.098 ppm for 13C), comparable to DFT calculations. Crucially, NMRNet achieves thispredictiveperformanceatacomputationalcostseveralordersofmagnitudelower than DFT, enabling real-time spectral simulation during iterative optimization and large-scale database construction.

For efficient candidate initialization, the framework leverages a large-scale spectral retrieval module that identifies plausible molecular candidates by querying the SimNMR-PubChem Database, which we constructed from approximately 106 million small organic molecules sourced from PubChem [40]. Each molecule in this database is annotated with predicted chemical shifts, making it the largest simulated NMR database available to date. This substantially exceeds the scale of existing publicly available datasets, such as NMRShiftDB2 [41], NP-MRD [42], QM9-NMR [43], and Multimodal Spectroscopic Dataset [44]. By leveraging modern vector database techniques—includingapproximatenearestneighborsearch(ANN)—andapplyingre-ranking strategies, the database retrieves spectrally similar candidates in sub-second time, providing high-quality starting points for molecular optimization.

Finally, the scenario adaptation module integrates domain-specific knowledge—such as known reactants or proposed scaffolds—as initial inputs for guided structuralsearch.Italsoallowstheapplicationofconstraintsonmolecularformulaand elemental composition during optimization and filtering. These capabilities together enable flexible deployment across a range of scenarios, from ab initio structure elucidation to reaction-aware product inference, supporting both automated analysis and human-in-the-loop interpretation.

Duetothescarcityoflarge-scale,high-qualityexperimentalNMRdatasetswithcarefullycuratedstructure-spectrumpairs,mostexistingworksareevaluatedonsimulated datasets. To facilitate a fair comparison with previous methods, we evaluated NMR-SolveronthepubliclyavailablesimulatedbenchmarkdatasetintroducedbyAlbertset al.[29].Thisdatasethasbeenusedtobenchmarkseveralstate-of-the-artapproaches, including NMR-to-Structure [29] and GraphGA with Multimodal Embeddings [35], whoseperformanceresultsarereportedintheoriginalstudy.Wecompareourmethod directly against these approaches, enabling a meaningful assessment of NMR-Solver’s capabilities within the context of current state-of-the-art techniques.

The simulated dataset comprises 345,000 SMILES–spectrum pairs, with 1H and 13C NMR spectra simulated using MestReNova [8]. In the 1H spectra, each peak includes chemical shifts, peak integrations, J-coupling constants, and multiplicity patterns, while the 13C spectra contain only chemical shifts. Although this dataset is frequently used for training and evaluation, it introduces a significant gap when compared to real experimental conditions. Idealized 1H multiplicity patterns and J-coupling values, which are often not fully or accurately observable in actual experiments due to factors like solvent effects, peak overlap, and instrument resolution, may lead previous methods to overfit these features in the simulated 1H NMR spectra. To mitigate these potential biases, we evaluated NMR-Solver without using J-coupling or multiplicity information, relying solely on chemical shifts and peak integrations—features that are more reliably measurable in practice. Due to computational resource limitations, we evaluate the method on a test set by randomly sampling 1,000 molecules from the dataset.

We evaluated the method using the original metrics, requiring an exact molecular match with stereochemistry considered, and the results are summarized in Table 1. Although our approach does not use the same simulation pipeline as GraphGA with Multimodal Embeddings (MestReNova) or rely on the benchmark dataset like NMR-to-Structure, it still achieves performance comparable to state-of-the-art methods on both 13C-only and combined 1H/13C settings. The performance gap in the 1H-only settingoccursduetopreviousmethods’dependenceonidealized1Hmultiplicitypatterns and J-coupling values from simulated spectra.

This indicates that NMR-Solver effectively leverages experimentally robust spectralfeaturesforaccuratemolecularstructureprediction,ratherthanrelyingonfragile information such as idealized multiplicity patterns or artificially noise-free simulations. In the following section, we further evaluate the framework on experimentally measured NMR spectra curated from the literature, highlighting its generalization capability and practical robustness in real-world structure elucidation tasks.

To enable realistic and rigorous benchmarking of structure elucidation methods, we manuallycuratedadatasetofapproximately450reactant–productpairswithproduct NMRspectrafromoriginalresearcharticlespublishedintheJournaloftheAmerican Chemical Society (JACS) in 2024.

The data were extracted from 15 weekly issues, covering a broad range of organic chemistry disciplines, total synthesis, catalysis, and substrate preparations in polymer chemistry and biochemistry. For each article, 3–5 representative reactions were selected to maximize structural and functional diversity. Each entry includes the key reactants,thereportedproductstructure,anditscorrespondingexperimental1Hand 13C NMR spectra. Minor manual curation was performed to remove peaks originating from solvents or impurities, ensuring high data quality. This benchmark reflects real-world conditions in synthetic chemistry and provides a robust foundation for evaluating computational structure elucidation approaches.

A simple statistic highlights the limitations of existing simulated benchmarks discussedinsection6.Intheliterature-extracteddataset,over40%of1HNMRpeaksare annotated as “m” (multiplet), without interpretable coupling constants. In contrast, the simulated dataset used by previous methods features fully resolved multiplicities and J-coupling values of 1H NMR peaks, which do not account for the complexities of real-world measurements.

WeevaluatedNMR-SolverandNMR-to-StructureusingbothrecallandTanimoto similarity [45] computed on Morgan fingerprints [46], which measure exact structure recovery and substructural similarity between predicted and ground-truth molecules, respectively. AsshowninFig.3a,thepreviousmethodNMR-to-Structureexhibitslimited performance, achieving only 14.44% (top-1) and 21.78% (top-10) accuracy when using1Hand13CNMRspectraunderthegivenmolecularformula,whileNMR-Solver substantially outperforms these baselines, achieving 52.89% (top-1) and 67.33% (top-10) recall under the same evaluation conditions. Moreover, as shown in Fig. 3b, even for predictions that do not exactly match the ground truth, NMR-Solver yields structures with higher Tanimoto similarity, reflecting improved substructural consistency and chemically meaningful outputs. A complete breakdown of experimental results is provided in Supplementary Table 4 and 5.

These results highlight a substantial performance gap when models trained on simulateddataareappliedtoreal-world,experimentalmeasuredNMRspectra.Incontrast,ourmethoddoesnotrelyonlarge-scalesimulateddatafortraining,butinstead leverages simulation only during the scoring stage, leading to greater robustness in practical scenarios.

Furthermore, NMR-Solver ranks candidate structures by spectral similarity between simulated and experimental spectra. As illustrated in Fig. 3c, prediction accuracy improves monotonically with increasing spectral similarity, suggesting that the spectral match score can serve as a reliable confidence indicator for the predictions. This self-consistent scoring mechanism enhances the reliability and practical applicability of NMR-Solver in real-world structure elucidation tasks.

In practical structural analysis, product structure prediction is a common and significant scenario, where chemists interpret NMR spectra in the context of known reactants or anticipated chemical transformations. To evaluate NMR-Solver’s ability to leverage such prior knowledge, we incorporated reactant information from the literature-extracted dataset described above.

By incorporating reactant structures into the initial candidate pool, NMR-Solver leverages substructures probable to be retained in the product and reflected in the NMR spectra. This allows the method to effectively bias molecular optimization toward candidates that contain spectrally supported, chemically plausible fragments.

As illustrated in Fig. 3d, this strategy increases the top-1 recall from 52.89% to 60.22% and the top-10 recall from 67.33% to 76.22% under 1H and 13C NMR conditionswithmolecularformulaprovided,demonstratingthatleveragingstructural continuity across reactions enhances inference accuracy.

These results highlight how NMR-Solver combines automated analysis with human-like reasoning: rather than operating in isolation, it amplifies expert knowledge and integrates reaction information in a flexible and robust manner, improving both the reliability and general applicability of molecular structure elucidation in synthetic workflows. While our evaluation focuses on incorporating reactant structures, the framework is generalizable and can similarly utilize expert hypotheses or domain-specific molecular priors to guide optimization when available.

During molecule optimization process, the agreement between predicted and experimental NMR spectra evolves as candidate molecules are iteratively refined. As shown in Fig. 3e and Fig. 3f, spectral similarity scores for top candidates increase substantially within the first few optimization steps, indicating rapid convergence toward structures with high spectral agreement.

Specifically, themedian spectralsimilarityofthetop-10candidatessurpasses0.96 within the first two iterations—a threshold empirically associated with 50% top-10 prediction accuracy—and gradually approaches a plateau of 0.97. The diminishing gainsinlaterstagesreflectthatthesearchquicklyhomesinonchemicallymeaningful structures.

This rapid progression highlights the efficiency of NMR-Solver in navigating the vast chemical space: by prioritizing molecular structures that better explain the observed spectra, the method identifies high-quality candidates early, without the needforexhaustiveexploration.Incontrast,conventionalapproaches,suchasgenetic algorithms, rely on random crossover and mutation operations, lacking directed guidance. These methods explore chemical space indiscriminately, often requiring many more iterations to converge and producing candidates of highly variable quality.

To further assess the practical utility of NMR-Solver in real-world synthetic chemistry research, we applied it to challenging cases from laboratory experiments—situations wheretraditionalmanualanalysisishardtoprovideconclusivestructuralassignments. Representative cases from real-world experiments are presented in Fig. 4.

Insomeinstances,reactionpathwaysarehighlycomplexorunanticipated,making it difficult for chemists to hypothesize plausible product structures based on mechanisticreasoningalone;withoutsuchhypotheses,manualNMRinterpretationbecomes extremelychallenging.Anillustrativeexample(Fig.4a)fromourlaboratoryinvolved a palladium-catalyzed transformation. The 1H and 13C NMR spectra of the product suggested the presence of two Ph groups, one CO2Et unit and a tri-substituted benzene. However, based on these spectral features and considering possible catalytic pathways, we were unable to propose a reasonable product structure, and the study was temporarily halted. Applying NMR-Solver to the same NMR data enabled the identification of a candidate structure that consistently matched the observed chemical shifts and coupling patterns. Based on this structure, we were able to propose a reasonable reaction mechanism (Fig. 4a, bottom). Subsequent validation via two-dimensional NMR experiments (HMBC and HSQC) and high-resolution mass spectrometry (HRMS) confirmed the correctness of the assignment.

Unexpected side products pose additional challenges. For instance, in an attempt to convert a hydroxyl group into a sulfonate ester (Fig. 4b), chromatographic isolation yielded a byproduct lacking any aromatic protons. Initial hypotheses considered included chlorination of the hydroxyl group, which would introduce one additional protoncomparedwiththeobservedspectrum,ortheformationofaneight-membered cyclicbyproduct;however,HRMSanalysisshowednomasscorrespondingtotheeight-membered cyclic structure. When NMR-Solver was applied, it confidently proposed a dichlorinatedproductwhosepredictedspectrummatchedtheexperimentaldata,and subsequent HRMS confirmed the molecular formula of the dichloride, validating this assignment.

Isomeric products further complicate structural elucidation, as many isomers produce very similar 1H and 13C spectra, making them difficult to distinguish without additional references. For example, In the case of hydrofunctionalization of cinnamate esters (Fig. 4c), two regioisomers are possible [47]. Manual interpretation of the one-dimensional spectra without references is difficult to distinguish the products.NMR-Solver,however,accuratelydiscriminatedbetweentheisomersbasedsolely on the one-dimensional spectra, correctly identifying the site of hydrogenation and thereby corroborating the proposed reaction mechanism.

Beyond facilitating elucidation of previously unassignable compounds, NMR-Solver can detect and correct misassigned structures in the literature. Two cases (Fig. 4d, 4e) originally reported by Fu et al. [48] and Cheng et al. [49], and later corrected by Novitskiy et al. [50], were re-analyzed with NMR-Solver. The corrected structures were accurately predicted and received substantially higher spectral similarity scores than the originally proposed ones, demonstrating that NMR-Solver can independently identify inconsistencies that might elude manual interpretation, even in peer-reviewed publications.

A key limitation of NMR-Solver lies in its reliance on the accuracy of the underlying forward prediction model. In one example involving a strained system (Fig. 4f), the prediction model (NMRNet) exhibited relatively large deviation, leading NMR-Solver to favor a structure with a predicted spectrum closer to the experimental data ratherthantherealproduct.FutureadvancesandanticipatedimprovementsinNMR prediction algorithms will be incorporated into NMR-Solver to continuously advance its accuracy in structural determination.

Methods
Data preparation
NMR spectra are processed into a list of peaks annotated with relevant features. For 1H NMR, each peak includes chemical shift, integration (proton count), multiplicity, and J-coupling constants; for 13C NMR, only the chemical shift is retained.

For literature-reported spectra, we extract peak information using regular-expression parsing. For experimentally acquired spectra, peaks are annotated using standard NMR preprocessing procedures. Specifically, the raw FID files are processed using conventional NMR software such as MestReNova [8], including baseline correction, peak picking, peak picking, integration and multiplicity assignment.

In experimental 1H and 13C NMR spectra, the chemical shifts of individual peaks are extracted and represented as an unordered multiset, serving as a unified spectral representation. To encode integration information in 1H NMR, each chemical shift is repeated in the multiset according to its associated proton count. Multiplicity are additionally attached to each shift. When a chemical shift is reported as a range, the midpoint of the range is taken as the representative value.

Spectral simulation
Chemical shift predictions are generated using NMRNet, a deep learning model that takes atomic types and three-dimensional coordinates as input and predicts chemical shiftsofall1Hand13Cnuclei.Priortoprediction,molecularconformationsaregeneratedusingtheEmbedMoleculeandMMFFOptimizeMoleculefunctionsfromtheRDKit toolkit[51],whichperformconformationalsamplingandgeometryoptimizationunder the Merck Molecular Force Field (MMFF) [52].

The final simulated spectra are also encoded as unordered multisets: H = {h 1 ,...,h n }for1HNMR,whereeachelementh i corresponds to the predicted chemicalshiftofanindividualhydrogennucleus,andC ={c 1 ,...,c m }for13CNMR,where each element c j corresponds to a unique carbon signal, with chemical shifts from symmetry-equivalent carbon nuclei averaged into a single resonance. For 13C NMR, chemical shifts of symmetry-equivalent carbons are averaged into a single resonance.

This representation naturally captures signal intensity through the multiplicity of identical shift values arising from chemically equivalent nuclei, and mimics the peak coalescence observed in experimental spectra.

Similarity metric of NMR spectra
To enable efficient and robust scoring between two NMR spectra, we introduce two complementary similarity metrics: vector similarity designed for scalable retrieval and high-throughput screening, and set similarity tailored to improve accuracy and robustness in the presence of spectral noise and peak mismatches.

Vector similarity
GivenanNMRspectrumX ={x 1 ,...,x n },wesmoothitusingGaussianconvolution:
g(t)= (cid:88) n exp (cid:18) − (t−x i )2(cid:19) , (1)
2σ2 i=1
where t spans the typical chemical shift range for 1H or 13C NMR. The resulting signal is discretized into a vector representation:
v X =[g(t 1 ),g(t 2 ),...,g(t 128 )], (2)
with {t i } denoting 128 uniformly spaced sampling points across the spectral window.
The specific parameter settings are provided in Supplementary Table 1.

TheencodingvectorofthefullNMRspectrumisformedbyconcatenating1Hand 13C NMR representations:
v=[v H ;v C ]∈R256, (3)
yielding a fixed-dimensional representation suitable for fast similarity scoring and scalable vector indexing. Spectral similarity is then measured using the Euclidean distance:
d L2 (v,v′)=∥v−v′∥ 2 , (4)
providing a computationally efficient metric for high-throughput screening.

Set similarity
We define set similarity as the optimal alignment between two collections of chemical shifts, formulated as a bipartite matching problem. Let
X ={x 1 ,...,x m }, Y ={y 1 ,...,y n } (5)
denote two spectra. The similarity score is defined as
1 (cid:88) S(X,Y)= √ mn m P∈ a P x f(x i ,y j ), (6)
(i,j)∈PP
where P denotes the set of all one-to-one matchings (allowing unmatched elements), and f(x,y) is a kernel function measuring pairwise compatibility:
(cid:18) (x−y)2(cid:19) f(x,y)=exp − . (7)
2σ2

The optimization problem in equation (6) can be fast solved using the Kuhn-Munkres algorithm [53, 54], as implemented in linear_sum_assignment from scipy.optimize [55]. In addition, multiplicity patterns can be incorporated by weightingthekernelfunction,therebyintroducingadditionalspectralinformation(see Supplementary Note 3 for implementation details).

Compared to vector-based similarity metrics, set-based similarity is more tolerant to missing or noisy peaks, enabling final robust identification of molecules even when spectra partially overlap. This reflects a design that is inherently robust to noise and imperfections in peak extraction under realistic experimental conditions. Additional experimental evidence demonstrating these advantages is provided in Supplementary Note 4.

Database construction and retrieval
We constructed the SimNMR-PubChem Database, a large-scale NMR molecular repository derived from the PubChem dataset [40], which initially contained approximately 119 million compounds. To ensure chemical relevance, ionized species, molecules lacking both carbon and hydrogen, free radicals, and isotopically labeled compounds were excluded. After deduplication using InChIKeys, the final dataset comprises 106 million unique molecules.

For each molecule, we generated simulated 1H and 13C NMR spectra as described in Section 6, and subsequently converted them into 256-dimensional encoding vectors as defined in Eq. 3.

To enable scalable similarity search, we implemented a vector database using FAISS [56], employing an HNSW index [57] with cosine similarity for efficient approximate nearest neighbor (ANN) retrieval.

Retrieval is performed in two stages: an initial ANN scan identifies candidate molecules based on vector similarity, followed by re-ranking using the more accurate but computationally slower set similarity. This hybrid approach combines computational efficiency with high-precision spectral matching, enabling sub-second retrieval.

Fragment-NMR-Based Molecular Optimization
We introduce Fragment-NMR-Based Molecular Optimization (FB-MO), a directed evolutionarystrategythatleveragespredictedNMRspectratoguidethesearchtoward molecules matching a target spectrum. The overall workflow is summarized in Fig. 5.

Theapproachmaintainsadynamicallyupdatedmoleculepool,initiallypopulated with compounds retrieved from the database (Section 6). In each iteration, these molecules are fragmented into structural building blocks and recombined through crossover to generate novel candidates.

To efficiently predict the NMRspectra of newly generated molecules after crossover, FB-MO estimates the chemical shifts of atoms in the new molecule by using the corresponding shifts from the parent molecules. This strategy can be seen as a fragment-based extension of the HOSE (Hierarchically Ordered Spherical Environment) code approach [58], which predicts chemical shifts based on local chemical topology. Its validity is supported by the well-established principle that NMR chemical shifts are primarily governed by local chemical structure, with long-range effects decaying rapidly and typically being negligible [59].

During the molecular fragmentation and recombination process to generate new molecules, atoms at the cleavage sites of the fragments are the only ones whose local environmentsundergosubstantialchanges,whilethelocalenvironmentsoftheremaining atoms stay relatively stable. To preserve these environments, simple constraints areimposedontherecombinationbasedonthecleavagebond,whichisdefinedbythe atom types and bond orders at the break site (e.g., C–O, N–C). For carbon-started bonds, such as C–O, only fragments with cleavage bonds starting with the terminal atom (e.g., O–C, O–N) are allowed. In contrast, for non-carbon-based bonds, like N–C, pairing is allowed with any fragment that shares the same bond order (e.g., single, double, or triple). These constraints ensure that the circular neighborhood of radius 1 for all carbon atoms remains unchanged, preserving the circular neighborhood of radius 2 for most hydrogen atoms. A complete list of permissible cleavage bond pairings is provided in Supplementary Table 10.

Withinthisframework,theNMRspectrumofanewlyformedmoleculeM,assembled from fragments F 1 and F 2, is estimated by inheriting the chemical shifts of corresponding atoms from their parent molecules:
X M =X F1 ∪X F2 , (8)
and the associated encoding vectors are combined additively:
v M =v F1 +v F2 . (9)
Candidate selection is performed in three stages to achieve high efficiency and accuracy.First,fragmentpairsarepre-screenedusingafastvector-basedretrieval:for each fragment F, the top-k complementary fragments F′ are retrieved by minimizing ∥v target −v F −v F′ ∥ 2 using an L2 distance-optimized index. Second, all candidate pairsareaggregatedandre-rankedbyvectorsimilarity.Third,thetopcandidatesare refined using set similarity between X F1 ∪X F2 and the target spectrum as given in Eq. 6.

Newly generated molecules undergo precise NMR prediction using the forward model (Section 6) for final scoring. This two-tiered NMR estimation—fast inherited prediction for screening and precise forward prediction for validation—enables both scalability and high fidelity. High-similarity candidates replace lower-ranking molecules in the pool, which evolves iteratively until convergence or the maximum iteration count is reached. A detailed algorithmic description is provided in Supplementary Note 5.

Additional constraints and prior knowledge integration
To address various experimental constraints and incorporate prior knowledge, the algorithmfeaturesseveraladaptivecapabilities.Whenthepermissibleelementalcomposition is known, fragments containing excluded elements are filtered out at each iteration, which helps reduce computational overhead. If a molecular formula is specified, candidate molecules are then evaluated against this constraint during the final stage.

When reactants are known, they are directly integrated into the initial molecule pool. This is beneficial as reactants often share structural motifs with the target molecule,therebyenhancingboththeefficiencyandaccuracyofthesearch.Similarly, other types of prior knowledge—such as expert-proposed scaffolds or domain-specific molecules—can be seamlessly incorporated by including them in the initial pool.

Computational resources and runtime
AllexperimentswereconductedonasingleNVIDIAGeForceRTX4090GPU.Under thedefaultalgorithmicsettings,theaveragewall-clocktimepermoleculeis94swhen element-based screening is enabled (i.e., when the elements or molecular formula of thetargetmoleculeareprovided),and106swhenelement-basedscreeningisdisabled.

Data availability
The PubChem dataset [40], used to construct SimNMR-PubChem Database, is publicly available at https://pubchem.ncbi.nlm.nih.gov. The processed dataset and database index of the SimNMR-PubChem Database are available on Hugging Face at https://huggingface.co/datasets/yqj01/SimNMR-PubChem. All processed NMR datasets used for testing are available via Zenodo at https://doi.org/10.5281/zenodo.16952024[60].Alldatasetsgeneratedandanalysedinthisstudyarepubliclyaccessible and can be freely used for research purposes without restriction.

Code availability
All source code for NMR-Solver is publicly available at https://github.com/ YongqiJin/NMR-Solver [61] under the open-source MIT License. The trained model weights for NMRNet are available via Zenodo at https://doi.org/10.5281/zenodo.16952024 [60].

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "The paper presents NMR-Solver, a new computational method for the elucidation of small molecule structures on the basis of 1D 1H and 13C NMR spectra. NMR-based structure elucidation is of high practical importance. The method is new (not a variant of existing methods) and results presented in the paper suggest that it constitutes a significant improvement over existing methods. The paper is written clearly and concisely.\nI recommend publication after minor revision to address the following points:\nLines 181-183: Report computation times and resources needed. From the description of the NMR-Solver algorithm in the paper, one would not expect it to have computational resource requirements that would make it unfeasible to evaluate more than 1000 molecules.\nTable 1: It is stated that results for the earlier methods are reported directly from the corresponding publications. Were these obtained for the same 1000 molecules on which NMR-Solver was run? For a meaningful comparison, the methods must be run on the same input data.\nTable 1: Explain what is meant by Conditions: Formula. If it corresponds to the number of atoms of each element, how important is its exact knowledge for the quality of the results?\nLines 179-180: Can NMR-Solver in principle use J-coupling or multiplicity information? Although these types of information can in general not be obtained for every peak, it is clear that they should help even if they are available only for a subset of the peaks.\nLine 208-209: Manual curation to remove peaks from solvents or impurities may require much human time. For comparison, authors should also report results obtained without any manual clean-up. In general, it is important to discuss the susceptibility of the results on the presence of additional artifact peaks.\nLines 281-284: \"goal-directed search process, where candidate quality improves systematically at each step\": Any meaningful search process has a goal, and, on the other hand, an improvement at each step is not a requirement for a successful optimization method. In contrast to the precise language used elsewhere in the paper, this sentence appears as advertisement talk, for which there is no need given the convincing results.\nLines 330-331: Could this be quantified, e.g. by running tests with a pseudo chemical shift predictor that yields the chemical shifts with predefined accuracy?\nLines 366-379: In practice, getting peak information from the experimental spectra is an important part of an automated procedure. More details should be given on how this has been done here.\nLines 505-513: Data availability: The data set for ~450 reactant-product pairs compiled from JACS articles is important for verification of the results of this paper and must be made available. It will also be useful for the evaluation of future or alternative NMR-based structure evaluation methods.", "reviewer_2": "The paper presents a cross-modal optimization framework for inferring candidate molecular structures from corresponding 1H-NMR and/or 13C-NMR spectra. The workflow integrates two main components: (1) construction of a large-scale database of molecules with predicted spectra, and (2) a fragment-based optimization algorithm that iteratively refines molecular candidates toward a target experimental spectrum.\nA comprehensive database (SimNMR-PubChem) is first generated by predicting NMR spectra for millions of PubChem molecules using NMRNet, a neural network that predicts NMR chemical shifts. The predicted spectra are smoothed via Gaussian convolution and converted into vector embeddings for both 1H and 13C NMR. Similarity between spectra is assessed through vector- and set-based distance metrics. Given a query spectrum (eventually experimental), the method retrieves an initial pool of candidate molecules whose predicted spectra best match the target.\nThe paper further introduces Fragment-NMR-Based Molecular Optimization (FB-MO), which fragments each candidate molecule into chemically valid substructures inheriting local spectral embeddings. New molecular candidates are generated by recombining fragments whose additive spectral vectors minimize the distance to the target spectrum. Promising structures are refined through direct NMR predictions (via NMRNet), and the candidate pool evolves iteratively toward improved spectral similarity.\nOverall, I believe the work offers an interesting extension of database-driven spectrum-to-structure learning. It expands exploration beyond static molecular databases without relying on fully generative models, which can be more complex and less interpretable.\nBelow, I list a few points that I believe could benefit from clarification or discussion:\n(p. 4) It is unclear whether the authors rely on the pre-trained NMRNet model from the original publication or have re-trained/fine-tuned it on the present dataset. I think that clarifying this is important for assessing the comparison across baselines and the reproducibility of the reported performance.\n(p.13) The choice to represent spectra as unordered multisets of annotated peaks yields a compact and 'practical' feature space for machine learning. However, it seems to me that this representation assumes extensive pre-processing (e.g., peak-picking, integration, multiplicity assignment via MestReNova), which may limit scalability to raw experimental data or spectra acquired under diverse conditions. I believe the authors should discuss how 'robust' their approach is to differences in acquisition or pre-processing pipelines.\n(p. 6-7), Results are compared to baselines by reporting performance numbers directly from the respective papers. However, it is also stated in the main text that results are based on 1,000 random test molecules. It is unclear whether different models are evaluated on the same test set. Additionally, the \"Formula\" entry under the \"Conditions\" column appears in every row. Does this imply that all baselines use prior knowledge of the molecular formula? Clarification is needed to ensure fair and rigorous comparison.\n(p. 16-17) The fragmentation and recombination process follows predefined heuristics that modify atoms only at cleavage sites. Are alternative fragmentation schemes possible or considered?\n(p. 17) From the main text, it appears that recombination operates mainly on fragment pairs (F_1, F_2). Can the approach be extended to combinations of more than two fragments, and if so, how would the spectral inheritance and scoring generalize to that case?\nIn summary, I believe this paper presents an interesting idea bridging molecular databases, NMR prediction, and fragment-based molecular optimization. With further clarifications I think the work could provide a valuable contribution to machine learning approaches for NMR-based structure elucidation.\nThe code in general is well structured and documented. However, there are some areas which deviate from standard Python package design. For example, there is no requirements file if users would like to install the code outside of the provided Docker image. There also isn't a setup.py/pyproject.toml file which is necessary to make the library easily installable. These should be added for improved useability.", "reviewer_3": "I co-reviewed this manuscript with one of the reviewers who provided the listed reports. This is part of the Nature Communications initiative to facilitate training in peer review and to provide appropriate recognition for Early Career Researchers who co-review manuscripts.", "reviewer_4": "The paper „R-Solver: Automated Structure Elucidation1 via Large-Scale Spectral Matching and2 Physics-Guided Fragment Optimization” by Jin et al. describes a software for molecular structure elucidation based on 1H and 13C NMR spectra. It can also perform database search. The task is very ambitious and the authors approach it in a novel way. The paper and the software are very easy to follow and engaging. I tested the program using Bohrium Apps on four compounds: two from SDBS data base (2642 and 1574) and two from HMDB (0000190 and 0000042), and the results are:\n1. Database search works quite well, I got:\n- sdbs 2642 – perfect (first on the list)\n- sdbs 1574 – fourth on the list\n- hmdb 0000190 – first on the list, but ionized\n- hmdb 000042 – fail\n2. Structure elucidation failed in all cases except for lactic acid.\nBy the way, it would be more convenient to have the peak lists preserved when switching tabs from Database Search to Structure Elucidation.\nThe results were slightly disappointing, but it is impossible to solve the problem of structure elucidation based solely on 1D spectra. Still, however, the program is far more useful in database search than everything I saw on the „NMR market”.\nTherefore, I would recommend publishing this paper as it stands and making the software widely available. I am sure that it can be much improved as it becomes widely used. I will certainly use it."}, "author_response": "Response to Reviewers\nManuscript ID: NCOMMS-25-80993\nNMR-Solver: Automated Structure Elucidation via Large-Scale\nSpectral Matching and Physics-Guided Fragment Optimization\nYongqi Jin, Jun-Jie Wang, Fanjie Xu, Xiaohong Ji, Zhifeng Gao, Linfeng Zhang, Guolin Ke*, Rong\nZhu*, Weinan E*\nDear Reviewers,\nWe thank the reviewers for their careful reading of our manuscript and for the constructive\ncomments. Below we list each comment followed by our response.\nResponse to Reviewer #1\nComment 1. Lines 181-183: Report computation times and resources needed. From\nthe description of the NMR-Solver algorithm in the paper, one would not expect it to have\ncomputational resource requirements that would make it unfeasible to evaluate more than\n1000 molecules.\nResponse: We thank the reviewer for this suggestion. We have added a subsection 4.7\nsummarizingthecomputationalresourcesandaverageruntimepermoleculeforNMR-Solver:\nAllexperimentswereconductedonasingleNVIDIAGeForceRTX4090GPU.Under\nthe default algorithmic settings, the average wall-clock time per molecule is 94 s when\nelement-based screening is enabled (i.e., when the elements or molecular formula of the\ntarget molecule are provided), and 106 s when element-based screening is disabled.\n(Revised manuscript: Section 4.7, lines 513–517.)\nThis indicates that the method is computationally feasible for datasets of 1,000 molecules\nor larger. In practical deployments, the method naturally supports multi-GPU and multi-\nprocess execution, allowing straightforward parallelization across molecules.\nComment 2. Table1: Itisstatedthatresultsfortheearliermethodsarereporteddirectly\nfrom the corresponding publications. Were these obtained for the same 1000 molecules on\nwhich NMR-Solver was run? For a meaningful comparison, the methods must be run on the\nsame input data.\nResponse: We thank the reviewer for raising this important point regarding the fairness\nof the comparison.\nToaddressthispoint, were-implementedandre-evaluatedtheNMR-to-Structurebaseline\non the same set of 1,000 randomly sampled molecules used for NMR-Solver, ensuring a\nconsistent input dataset for direct comparison between these two methods.\nFor GraphGA with Multimodal Embeddings, which relies on additional IR spectra as\ninput, we did not re-implement or re-evaluate this method on our sampled subset. Instead,\nwe report the performance numbers directly from the original publication, as indicated in\nparentheses, and include them for reference only. We now clarify this distinction explicitly\n1\nin the table caption.\nThese revisions ensure that all direct comparisons are performed on identical input data,\nwhile results obtained under different input modalities or evaluation settings are clearly\nmarked as reference values.\nThe corresponding results in Table 1 have been updated accordingly:\nTable 1: Comparison with current methods on the simulated dataset. The per-\nformance gap in the 1H-only setting occurs due to previous methods’ dependence on\nidealized simulated 1H multiplicity patterns and J-coupling values. All methods are re-\nimplemented and tested on 1,000 randomly sampled molecules. Bold results indicate\nthe best performance. Numbers in parentheses indicate the results directly reported in\nthe original publications under their respective evaluation settings, and are provided\nfor reference only. “Conditions: Formula” refers to the known molecular formula of the\ntarget molecule, i.e., the number of atoms of each element.\nInput Spectra Conditions Top-1 (%) Top-5 (%) Top-10 (%)\nGraphGA with Multimodal Embeddings\n1H NMR + 13C NMR + IR Formula (76.02) (87.81) (88.91)\nNMR-to-Structure\n1H NMR Formula 62.70 (55.32) 75.40 (73.59) 80.80 (76.74)\n13C NMR Formula 48.40 (53.91) 61.70 (73.45) 70.10 (77.72)\n1H NMR + 13C NMR Formula 69.60 (66.99) 81.70 (84.09) 86.80 (86.59)\nNMR-Solver (Ours)\n1H NMR Formula 23.10 36.20 39.30\n13C NMR Formula 62.20 77.60 79.10\n1H NMR + 13C NMR Formula 66.90 87.20 89.90\n(Revised manuscript: Section 2.2, Table 1.)\nComment 3. Table 1: Explain what is meant by Conditions: Formula. If it corresponds\ntothenumberofatomsofeachelement, howimportantisitsexactknowledgeforthequality\nof the results?\nResponse: We thank the reviewer for the question regarding the meaning and importance\nof “Conditions: Formula” in Table 1.\n“Conditions: Formula” refers to the known molecular formula of the target molecule,\ni.e., the number of atoms of each element.\n(Revised manuscript: Section 2.2, Table 1.)\nThis definition has now been clarified in the caption of Table 1 in the revised manuscript.\nIn NMR-Solver, this information is utilized in two ways: (1) Element-based screening,\nwhich restricts the search space by excluding fragments containing elements not present in\nthe molecular formula, thereby reducing computational cost. (2) Final constraint check-\ning, where candidate molecules are filtered against the exact molecular formula to improve\nprediction accuracy.\nA detailed description of these steps is provided in Section 4.6 (second paragraph):\n2\n“When the permissible elemental composition is known, fragments containing excluded el-\nements are filtered out at each iteration, which helps reduce computational overhead. If a\nmolecular formula is specified, candidate molecules are then evaluated against this constraint\nduring the final stage.”\nThe impact of these molecular-formula and element-type constraints on prediction quality\nis analyzed experimentally in Section 2.3, with corresponding results reported in Supple-\nmentary Tables 4 and 5.\nComment 4. Lines 179-180: Can NMR-Solver in principle use J-coupling or multiplicity\ninformation? Although these types of information can in general not be obtained for every\npeak, it is clear that they should help even if they are available only for a subset of the\npeaks.\nResponse: We thank the reviewer for the insightful question.\nIn principle, NMR-Solver can incorporate additional NMR observables beyond chemical\nshifts. The core design of the framework relies on comparing simulated spectra of candidate\nmolecules with the experimental spectrum and optimizing molecular structures based on\ntheir discrepancies. This comparison can, in theory, utilize chemical shifts, multiplicity\npatterns, and J-coupling information.\nIn the original manuscript, we briefly described an algorithmic approach for incorpo-\nrating multiplicity information into NMR-Solver (Supplementary Note 3). In the revised\nmanuscript, we additionally present experimental results using a rule-based 1H multiplic-\nity predictor. These results show a modest improvement over using chemical shifts alone\n(Supplementary Table 10):\nA comparison between using multiplicity patterns in the 1H NMR spectra and using\nchemical shifts alone is provided in Supplementary Table 10. Incorporating multiplicity\nyields a modest yet consistent improvement. Multiplicity and J-coupling information\nareexpectedtoofferfurthergainsforNMR-basedstructureelucidationasmoreaccurate\nprediction methods become available.\n(Revised manuscript: Supplementary Note 3)\nSupplementary Table 10. Comparison of NMR-Solver performance with\nor without multiplicity information. Cells shaded in gray indicate improved\nperformance over using chemical shifts alone.\nNMR Type Condition Top-1(%) Top-3(%) Top-10(%) Tani@1 Tani@3 Tani@10\nNMR-Solver (chemical shifts only)\nNo 0.67 1.11 3.78 0.196 0.244 0.294\n1H Elements 3.11 7.33 12.67 0.269 0.342 0.410\nFormula 20.00 27.33 31.78 0.382 0.445 0.488\nNMR-Solver (multiplicity included)\nNo 1.60 2.29 5.03 0.224 0.266 0.319\n1H Elements 3.78 8.22 11.56 0.293 0.353 0.420\nFormula 18.44 25.78 32.00 0.382 0.449 0.493\n(Revised manuscript: Supplementary Table 10)\ntationambiguities(e.g.,peakslabeledas‘m’),whichmakerule-basedmultiplicityassignment\nunreliable. As a result, only the simplest multiplicity patterns can be exploited, while such\nsimplepatternstypicallycarrylimitedstructuralinformation; and(2)occasionalmislabeling\\inexperimentalspectra,forexample,twodoublets(‘d’)incorrectlyannotatedasadoubletof\ndoublets (‘dd’), whereas chemical shifts are generally more robust to such annotation errors.\nRegarding J-coupling constants, their practical use is further complicated by the strong\ndependence on molecular conformation, particularly for flexible molecules. In the absence\nof explicit conformational ensemble calculations, there is currently no reliable way to obtain\naccurate J-coupling values, which makes it difficult to encode this information using simple\nrule-based schemes.\nWe believe that multiplicity and J-coupling information nevertheless have the poten-\ntial to further strengthen NMR-based structure elucidation, particularly as more accurate\nraw-spectrum parsing methods and improved predictive tools for these observables become\navailable.\nComment 5. Line 208-209: Manual curation to remove peaks from solvents or impurities\nmay require much human time. For comparison, authors should also report results obtained\nwithout any manual clean-up. In general, it is important to discuss the susceptibility of the\nresults on the presence of additional artifact peaks.\nResponse: We thank the reviewer for raising this important point.\nPeaks arising from solvents or common impurities were removed using an automated fil-\ntering script. This procedure is a standard component of NMR preprocessing pipelines and\ndoes not require manual intervention, thereby preserving scalability. In conventional man-\nual NMR processing, the identification and removal of residual solvent signals (for example,\nwater or residual petroleum ether) constitute one of the most critical and subjective steps.\nWe observed that, in some literature-reported spectra, solvent-related peaks can be mistak-\nenly annotated as product signals, introducing avoidable noise into downstream analysis. To\nstandardizeandsystematizetheidentificationofresidualsolventpeaks,wethereforeadopted\nan automated filtering strategy. Manual inspection was conducted solely to validate the au-\ntomated procedure and to ensure that the resulting curated dataset constitutes a reliable\nbenchmark, which remains scarce in the literature.\nFor completeness, we provide the implementation at https://github.com/YongqiJin/\nNMR-Solver/blob/main/src/utils/remove_solvent.py.\nRegarding the susceptibility of NMR-Solver to additional artifact peaks, only a small\nfraction of the 450 experimental spectra contained solvent-related peaks, making a direct\ncomparison on the full dataset unrepresentative. To assess robustness, we conducted a\ncontrolled experiment within the spectrum-matching module by injecting synthetic \"artifact\npeaks\"ordeletingpeaksintocleanspectra. Theresults, reportedinSupplementaryTables8\nand 9, illustrate how the presence of extra or missing peaks affects ranking performance.\nspectrum-matching module, where p denotes the probability of randomly inserting or\ndeleting a peak:\nTop-1 Recall (%) Top-10 Recall (%)\nNMR Type\np = 0.0 p = 0.1 p = 0.2 p = 0.0 p = 0.1 p = 0.2\n1H 100 94.2 88.3 100 97.0 94.0\n13C 100 95.4 90.7 100 98.7 97.5\n1H + 13C 100 99.2 98.3 100 99.9 99.9\n(Revised manuscript: Summary from Supplementary Table 8 and Table 9.)\nThe experimental results demonstrate high robustness to extra or missing peaks, particu-\nlarly when both 1H and 13C spectra are used jointly.\nComment 6. Lines 281-284: \"goal-directed search process, where candidate quality\nimprovessystematicallyateachstep\": Anymeaningfulsearchprocesshasagoal,and,onthe\nother hand, an improvement at each step is not a requirement for a successful optimization\nmethod. In contrast to the precise language used elsewhere in the paper, this sentence\nappears as advertisement talk, for which there is no need given the convincing results.\nResponse: We thank the reviewer for the comment. We have removed the last paragraph\nbecause it largely repeats the point already made in the preceding sentence:\nBy prioritizing molecular structures that better explain the observed spectra, the\nmethod identifies high-quality candidates early, without the need for exhaustive explo-\nration. Incontrast,conventionalapproaches,suchasgeneticalgorithms,relyonrandom\ncrossover and mutation operations, lacking directed guidance.\n(Revised manuscript: Section 2.5, lines 281–284.)\nThisrevisionavoidsredundancywhilepreservingtheintendedcomparisonbetweenNMR-\nSolver and conventional methods.\nComment 7. Lines 330-331: Could this be quantified, e.g. by running tests with a pseudo\nchemical shift predictor that yields the chemical shifts with predefined accuracy?\nResponse: We thank the reviewer for the insightful suggestion regarding quantifying the\neffect of chemical shift prediction accuracy on NMR-Solver. Direct testing with a pseudo\npredictor in de novo structure generation is challenging, as candidate molecules lack ground-\ntruth experimental spectra. Instead, we approximate this effect via NMR-based molecular\nretrieval.\nSpecifically, since spectral matching is central to NMR-Solver, we emulate reduced chem-\nical shift accuracy by adding controlled Gaussian noise to simulated spectra, effectively act-\ning as a pseudo predictor with predefined error levels. Retrieval experiments across different\nnoise levels were conducted, and top-k recall was evaluated. The full results are provided in\nSupplementary Tables 8 and 9.\nσ denotes the noise level used to simulate a pseudo chemical shift predictor (σ ppm for\n1H NMR and 10σ ppm for 13C NMR):\nTop-1 Recall (%) Top-10 Recall (%)\nNMR Type\nσ = 0.0 σ = 0.1 σ = 0.2 σ = 0.0 σ = 0.1 σ = 0.2\n1H 100 76.9 31.1 100 92.8 53.0\n13C 100 87.9 50.9 100 99.0 70.7\n1H + 13C 100 95.5 86.2 100 99.9 95.8\n(Revised manuscript: Summary from Supplementary Table 8 and Table 9.)\nThese results provide a quantitative view of how prediction accuracy influences down-\nstream structure elucidation. When the prediction errors exceed approximately 0.1 ppm\nfor 1H shifts and 1 ppm for 13C shifts, the performance of spectrum-matching deteriorates\nnoticeably, especially in terms of top-1 recall. The current predictor used in NMR-Solver,\nNMRNet, achieves average errors of 0.18 ppm for 1H and 1.1 ppm for 13C on the public\nbenchmark nmrshiftdb2. Therefore, further improving the accuracy of chemical-shift pre-\ndiction models is expected to substantially enhance both NMR-based retrieval and structure\nelucidation accuracy.\nComment 8. Lines 366-379: In practice, getting peak information from the experimental\nspectra is an important part of an automated procedure. More details should be given on\nhow this has been done here.\nResponse: We thank the reviewer for this valuable comment.\nBecause our data originate from two distinct sources and formats, we employ two corre-\nsponding extraction procedures. For literature-reported spectra (text-based formats; Sec-\ntions 2.3 and 2.4), peak information is extracted using regular-expression parsing. The ex-\nact implementation is available in our open-source code: https://github.com/YongqiJin/\nNMR-Solver/blob/main/src/utils/nmr_parser.py.\nFor experimentally acquired spectra (Section 2.5), standard NMR preprocessing proce-\ndures are applied. Specifically, raw FID files are processed using conventional NMR software\nsuch as MestReNova, including baseline correction, peak picking, integration, and multiplic-\nity assignment.\nWe have expanded Section 4.1 to describe these steps in greater detail.\nFor literature-reported spectra, we extract peak information using regular-expression\nparsing. Forexperimentallyacquiredspectra,peaksareannotatedusingstandardNMR\npreprocessing procedures. Specifically, the raw FID files are processed using conven-\ntional NMR software such as MestReNova, including baseline correction, peak picking,\npeak picking, integration and multiplicity assignment.\n(Revised manuscript: Section 4.1, lines 370–377.)\npairs compiled from JACS articles is important for verification of the results of this paper\nand must be made available. It will also be useful for the evaluation of future or alternative\nNMR-based structure evaluation methods.\nResponse: We agree with the reviewer and appreciate the importance of making this\ndataset accessible. The dataset comprising approximately 450 reactant-product pairs com-\npiled from JACS articles has been made publicly available. It can be accessed via GitHub:\nhttps://github.com/YongqiJin/NMR-Solver/blob/main/data/experiment/test.txtand\nis also archived on Zenodo: https://zenodo.org/records/16952024.\n(Revised manuscript: Data availability section.)\nResponse to Reviewer #2\nComment 10. (p. 4) It is unclear whether the authors rely on the pre-trained NMRNet\nmodel from the original publication or have re-trained/fine-tuned it on the present dataset.\nI think that clarifying this is important for assessing the comparison across baselines and\nthe reproducibility of the reported performance.\nResponse: Thank the reviewer for the helpful comment. We have clarified in Section 2.1\nthat we use the original pre-trained NMRNet model without any additional fine-tuning on\nourdatasets,inordertoavoidpotentialoverfittingthatcouldbiasthefaircomparisonacross\nbaselines. To ensure full reproducibility, we have also released the exact model weights used\nin our experiments at https://zenodo.org/records/16952024.\nTosupportrapidspectralevaluationduringoptimization,weemploypre-trainedNM-\nRNet, ...\n(Revised manuscript: Section 2.1, line 135.)\nComment 11. (p.13) The choice to represent spectra as unordered multisets of annotated\npeaks yields a compact and ‘practical’ feature space for machine learning. However, it\nseems to me that this representation assumes extensive pre-processing (e.g., peak-picking,\nintegration, multiplicity assignment via MestReNova), which may limit scalability to raw\nexperimental data or spectra acquired under diverse conditions. I believe the authors should\ndiscusshow‘robust’theirapproachistodifferencesinacquisitionorpre-processingpipelines.\nResponse: We thank the reviewer for the insightful comment regarding the reliance on\nspectral pre-processing and its implications for scalability and robustness.\nWe agree that representing spectra as unordered multisets of annotated peaks assumes a\npre-processing stage, such as peak picking, integration, and multiplicity assignment. Our\ndesign choice follows current mainstream NMR analysis practice, where pre-processing is\nwidely adopted because it offers interpretability, transparency, and user control, particularly\nfor handling solvent peaks, artifacts, and ambiguous assignments. While fully end-to-end\nspectrum parsing methods offer greater automation, we deliberately adopt a pre-processing-\nbased representation to enable more controllable and practical use under real experimental\nsettings.\nconditions and pre-processing pipelines. As highlighted in the revised Section 4.3, the core\nspectrum-matchingmodulereliesonset-basedsimilarityratherthanstrictvectoralignment:\nCompared to vector-based similarity metrics, set-based similarity is more tolerant\nto missing or noisy peaks, enabling final robust identification of molecules even when\nspectra partially overlap. This reflects a design that is inherently robust to noise and\nimperfections in peak extraction under realistic experimental conditions. Additional\nexperimental evidence demonstrating these advantages is provided in Supplementary\nNote 4.\nTo quantitatively evaluate robustness, we conducted controlled experiments within the\nspectrum-matchingmodulebysimulatingrealisticexperimentaluncertainties,includingran-\ndom noise and random peak insertion or deletion. We compared set-based similarity with\nvector-based similarity and traditional Wasserstein distance under these perturbations. The\nresultsdemonstratethattheset-basedformulationusedinNMR-Solverissubstantiallymore\nrobust to pre-processing variability.\nDetailed experimental results are provided in Supplementary Note 4 and Supplementary\nTables 8 and 9.\nComment 12. (p. 6-7) Results are compared to baselines by reporting performance\nnumbers directly from the respective papers. However, it is also stated in the main text that\nresults are based on 1,000 random test molecules. It is unclear whether different models are\nevaluated on the same test set. Additionally, the “Formula” entry under the “Conditions”\ncolumn appears in every row. Does this imply that all baselines use prior knowledge of the\nmolecular formula? Clarification is needed to ensure fair and rigorous comparison.\nResponse: We thank the reviewer for raising this important point regarding fair and\nrigorous comparison.\nToaddressthispoint, were-implementedandre-evaluatedtheNMR-to-Structurebaseline\non the same set of 1,000 randomly sampled molecules used for NMR-Solver, ensuring a\nconsistent input dataset for direct comparison between these two methods.\nFor GraphGA with Multimodal Embeddings, which relies on additional IR spectra as\ninput, we did not re-implement or re-evaluate this method on our sampled subset. Instead,\nwe report the performance numbers directly from the original publication, as indicated in\nparentheses, and include them for reference only. We now clarify this distinction explicitly\nin the table caption.\nThese revisions ensure that all direct comparisons are performed on identical input data,\nwhile results obtained under different input modalities or evaluation settings are clearly\nmarked as reference values.\nThe corresponding results in Table 1 have been updated accordingly:\nformance gap in the 1H-only setting occurs due to previous methods’ dependence on\nidealized simulated 1H multiplicity patterns and J-coupling values. All methods are re-\nimplemented and tested on 1,000 randomly sampled molecules. Bold results indicate\nthe best performance. Numbers in parentheses indicate the results directly reported in\nthe original publications under their respective evaluation settings, and are provided\nfor reference only. “Conditions: Formula” refers to the known molecular formula of the\ntarget molecule, i.e., the number of atoms of each element.\nInput Spectra Conditions Top-1 (%) Top-5 (%) Top-10 (%)\nGraphGA with Multimodal Embeddings\n1H NMR + 13C NMR + IR Formula (76.02) (87.81) (88.91)\nNMR-to-Structure\n1H NMR Formula 62.70 (55.32) 75.40 (73.59) 80.80 (76.74)\n13C NMR Formula 48.40 (53.91) 61.70 (73.45) 70.10 (77.72)\n1H NMR + 13C NMR Formula 69.60 (66.99) 81.70 (84.09) 86.80 (86.59)\nNMR-Solver (Ours)\n1H NMR Formula 23.10 36.20 39.30\n13C NMR Formula 62.20 77.60 79.10\n1H NMR + 13C NMR Formula 66.90 87.20 89.90\n(Revised manuscript: Section 2.2, Table 1.)\nRegarding the use of the molecular formula as prior information, we ensured that all\nbaseline results incorporate this knowledge consistently with the original publications. (The\ninclusion of this column in Table 1 is aligned with the experiments in Section 2.3, where\nwe analyze the impact of molecular formula and elemental composition on the quality of\nstructure elucidation, with results reported in Supplementary Tables 4 and 5.)\nComment 13. (p. 16-17)Thefragmentationandrecombinationprocessfollowspredefined\nheuristics that modify atoms only at cleavage sites. Are alternative fragmentation schemes\npossible or considered?\nResponse: We thank the reviewer for this insightful comment.\nThe original sentence,\n\"Duringthemolecularfragmentationandrecombinationprocesstogeneratenewmolecules,\natomsatthecleavagesitesofthefragmentsaretheonlyonesthatundergosignificantchanges,\nwhile the remaining atoms maintain relatively stable local atomic environments,\"\nwas somewhat vague. We have revised it to:\nDuringthemolecularfragmentationandrecombinationprocesstogeneratenewmolecules,\natoms at the cleavage sites of the fragments are the only ones whose local environments\nundergo substantial changes, while the local environments of the remaining atoms re-\nmain relatively stable.\n(Revised manuscript: Section 4.5, lines 469–473.)\nThis revised wording more precisely describes how the local atomic environments change\n9\nduring fragmentation and recombination, which reflects the variations in chemical shifts and\ndirectly affects the accuracy of predicting the chemical shifts of Child molecules based on\nthe Parent molecules.\nUsingallpossiblefragmentationschemesisfeasibleandhasalsobeenexplored. According\ntoourformerexperiments,employingallpossiblefragmentationsresultsinamodestdecrease\ninperformance,becausethechemicalshiftpredictionerrornearthecleavagesitestendstobe\nlarger. Therefore, we design the fragmentation and recombination rules under the principle\nthat\n“These constraints ensure that the circular neighborhood of radius 1 for all carbon atoms\nremains unchanged,” (Section 4.5, lines 479–480)\nto achieve a trade-off between accurate chemical shift prediction for newly generated\nmolecules and the diversity of generated chemical space.\nA simple schematic is provided to illustrate the rationale behind this trade-off:\nComment 14. (p. 17)Fromthemaintext, itappearsthatrecombinationoperatesmainly\non fragment pairs (F ,F ). Can the approach be extended to combinations of more than\n1 2\ntwo fragments, and if so, how would the spectral inheritance and scoring generalize to that\ncase?\nResponse: We thank the reviewer for this insightful question.\nAs the reviewer noted, in each iteration we consider only pairwise combinations of frag-\nments from the molecular pool (i.e., (F ,F )). The final assembly of multiple fragments is\n1 2\nachieved through multiple rounds of iterative optimization.\nRestricting each iteration to pairwise recombination offers a key advantage. It enables\nefficient filtering of potential fragment recombinations using the L2-distance\n∥v −v −v ∥ ,\ntarget F1 F2 2\nwhich can be further accelerated via vector-database indexing techniques, greatly improving\ncomputational efficiency (Section 4.5, lines 488–490).\nExtendingtheapproachtodirectrecombinationofmorethantwofragmentswithinasingle\n10\niteration would render such indexing-based filtering infeasible, as enumerating all possible\nfragment combinations becomes computationally intractable.\nComment 15. The code in general is well structured and documented. However, there\nare some areas which deviate from standard Python package design. For example, there is\nno requirements file if users would like to install the code outside of the provided Docker\nimage. There also isn’t a setup.py/pyproject.toml file which is necessary to make the library\neasily installable. These should be added for improved useability.\nResponse: We thank the reviewer for the positive feedback on our open-source code and\nfor the constructive suggestions regarding package design.\nA requirements.txt has been updated, listing all standard open-source dependencies to\nfacilitate installation in a standard Python environment (https://github.com/YongqiJin/\nNMR-Solver/blob/main/requirements.txt). The only exception is a modified version of\ntheunimol-toolslibrary(https://pypi.org/project/unimol-tools/),whichiscurrently\nnot publicly available and requires the Docker image to run.\nTo ensure a stable and deployable environment and to avoid the complexity of manag-\ning package versions, we provide a unified Docker image containing all necessary depen-\ndencies. Because the code relies on this Docker-based environment, creating a setup.py or\npyproject.tomlfordirectpipinstallationisnotparticularlymeaningfulatthisstage. Once\nthemodifiedunimol-toolsispubliclyreleased,weplantoprovideastandardpip-installable\npackage to further improve usability.\nResponse to Reviewer #3\nComment 16. I co-reviewed this manuscript with one of the reviewers who provided the\nlisted reports. This is part of the Nature Communications initiative to facilitate training\nin peer review and to provide appropriate recognition for Early Career Researchers who\nco-review manuscripts.\nResponse: We sincerely thank the reviewer for their contribution to the peer review\nprocess. No changes to the manuscript were required in response to this comment.\nComment 17. The paper “NMR-Solver: Automated Structure Elucidation1 via Large-\nScaleSpectralMatchingandPhysics-GuidedFragmentOptimization” byJinetal. describes\na software for molecular structure elucidation based on 1H and 13C NMR spectra. It can\nalso perform database search. The task is very ambitious and the authors approach it in\na novel way. The paper and the software are very easy to follow and engaging. I tested\nthe program using Bohrium Apps on four compounds: two from SDBS data base (2642 and\n1574) and two from HMDB (0000190 and 0000042), and the results are:\n1. Database search works quite well, I got:\n• sdbs 2642 – perfect (first on the list)\n• sdbs 1574 – fourth on the list\n• hmdb 0000190 – first on the list, but ionized\n• hmdb 000042 – fail\n2. Structure elucidation failed in all cases except for lactic acid.\nBy the way, it would be more convenient to have the peak lists preserved when switching\ntabs from Database Search to Structure Elucidation.\nThe results were slightly disappointing, but it is impossible to solve the problem of structure\nelucidation based solely on 1D spectra. Still, however, the program is far more useful in\ndatabasesearchthaneverythingIsawonthe“NMRmarket”. Therefore,Iwouldrecommend\npublishing this paper as it stands and making the software widely available. I am sure that\nit can be much improved as it becomes widely used. I will certainly use it.\nResponse: We sincerely thank the reviewer for the detailed testing and thoughtful feed-\nback. We are glad that the reviewer found the software easy to use and useful, particularly\nfor database searching.\nWe reproduced the four examples mentioned by the reviewer from the SDBS database\n(https://sdbs.db.aist.go.jp/SearchInformation.aspx)andtheHMDBdatabase(https:\n//www.hmdb.ca/textquery). Detailed information for these examples is summarized below.\nPeaks near 0 ppm were excluded in HMDB0000190 and HMDB0000042, as they correspond\nto the TMS internal standard used for calibration.\n• sdbs 2642: Pyruvic acid\nStructure:\nCC(––O)C(––O)O\nFormula: C H O\n3 4 3\n13C NMR (ppm): 193.67, 161.37, 25.45\n1H NMR (ppm): 8.70 (1H), 2.534 (3H)\nNMR text for NMR-Solver: 1H NMR 8.70 (1H), 2.534 (3H); 13C NMR 193.67,\n161.37, 25.45.\n• sdbs 1574: Hexanenitrile\nStructure:\nCCCCCC–––N\nFormula: C H N\n6 11\n13C NMR (ppm): 119.90, 30.87, 25.21, 21.96, 17.11, 13.78\n1H NMR (ppm): 2.33 (2H), 1.67 (2H), 1.72 (4H), 0.94 (3H)\nNMR text for NMR-Solver: 1H NMR 2.33 (2H), 1.67 (2H), 1.72 (4H), 0.94 (3H);\n13C NMR 119.90, 30.87, 25.21, 21.96, 17.11, 13.78.\n• HMDB0000190\nFormula: C H O\n3 6 3\n13C NMR (ppm): 185.0763, 71.2486, 22.8053, -0.0013 (TMS)\n1H NMR (ppm): 1.32 (4H, d, J = 3 Hz), 4.10 (2H, q, J = 6.93 Hz)\nNMR text for NMR-Solver: 1HNMR1.32(4H,d,J = 3Hz),4.10(2H,q,J = 6.93\nHz); 13C NMR 185.0763, 71.2486, 22.8053.\n• HMDB0000042\nStructure: CC(O)=O\nFormula: C H O\n2 4 2\n13C NMR (ppm): 184.1082, 25.9762, 0.0018 (TMS)\n1H NMR (ppm): 1.91 (3H)\nNMR text for NMR-Solver: 1H NMR 1.91 (3H); 13C NMR 184.1082, 25.9762.\nThe results are summarized below. All results were obtained using the NMR-Solver Web\nApp with default settings (elements C, H, N, O) and using only the NMR text as input.\nNo. Rank\nDB Search SE (before EF) SE (after EF)\nsdbs 2642 1 39 1\nsdbs 1574 1 1 1\nHMDB0000190 not found 2 1\nHMDB0000042 not found 16 1\nNotes: DB Search = Database Search; SE = Structure Elucidation; EF = Elemental\nFilter. Ranks indicate the position of the correct structure in the output list (1 = top rank).\nThe screenshot below shows the structure elucidation results generated by NMR-Solver:\n• sdbs 2642 (after elemental filter):\n• sdbs 1574 (before elemental filter):\n13\n• HMDB0000190 (before elemental filter):\n• HMDB0000042 (after elemental filter):\nWe think the discrepancy between our results and the reviewer’s tests may arises from\nthe handling of TMS peaks. For these examples, which have a small number of atoms and\npeaks, the inclusion of extraneous peaks can have a disproportionately large effect.\nNevertheless, the third and fourth examples demonstrate that NMR-Solver exhibits a de-\n14\ngree of robustness to spectral noise. For instance, HMDB0000042 contains no labile protons\nin the 1H spectrum, and HMDB0000190 records labile protons that deviate substantially\nfrom the model predictions. Despite these challenges, NMR-Solver successfully solved both\nstructures when the elemental composition was provided.\nWealsoappreciatethereviewer’ssuggestiontopreservepeaklistswhenswitchingbetween\nDatabase Search and Structure Elucidation, and will consider implementing this enhance-\nment in future versions.\nWe appreciate the reviewer’s recommendation for publication and their encouragement,\nand hope that broader use of NMR-Solver will further enhance its capabilities through user\nfeedback and ongoing development.\nComment 18. Code is ok. I tested the app using Bohrium website, as suggested on\nGitHub. It was very useful!\nResponse: Thank the reviewer for testing the software and for the positive feedback. We\nwill continue to refine the software based on user feedback.\nWe would like to once again thank the reviewers for their constructive comments. We believe\nthat this feedback has significantly improved the manuscript.\nSincerely,\nAll authors\n15"}, {"round": 2, "reviewer_comments": {"reviewer_1": "The authors have carefully addressed the remarks made by the reviewers and have substantially improved the paper. I recommend publication of the revised manuscript.", "reviewer_2": "I co-reviewed this manuscript with one of the reviewers who provided the listed reports. This is part of the Nature Communications initiative to facilitate training in peer review and to provide appropriate recognition for Early Career Researchers who co-review manuscripts.", "reviewer_3": "I co-reviewed this manuscript with one of the reviewers who provided the listed reports. This is part of the Nature Communications initiative to facilitate training in peer review and to provide appropriate recognition for Early Career Researchers who co-review manuscripts.", "reviewer_4": "The Authors identified a discrepancy between their results and my tests, which they attributed to the presence of TMS peaks. I have no further comments and recommend the paper for publication."}, "author_response": ""}]

Decision letter