Robert Brunck, Stefan Ganscha, Swaroop Guntupalli, Dariusz Lasecki, Gabriella Marfani, Jack Mason, Hussain Masoom, Rose Mirshafian, Eliseo Papa and Zoi Tsangalidou
Explore Science on Google Antigravity ShareBuilt in collaboration with analytical chemists and using community-developed tools, Mass Spec Skills empowers scientists using Google Antigravity to interpret tandem mass spectra, lay out chemical evidence, and match frontier-level retrieval accuracy even with a lightweight model.
Every sample of blood, soil or plant tissue contains a vast array of small molecules, such as nutrients, hormones, drugs and their breakdown products, pollutants, or bioactive compounds with therapeutic potential. A modern mass spectrometer can detect tens of thousands of these molecular signals in a single drop of sample extract, measuring the masses of charged molecules and, in tandem mass spectrometry (MS/MS), the fragments they break into.
These measurements, however, do not directly reveal the molecular structure. Researchers cannot immediately tell which compound produced a signal and relate it to its biological role or downstream use cases.
To fully map the diversity of small molecules, which remains largely uncharted, researchers need ways to translate mass spectra to molecular structures at scale. The standard approach is to match each spectrum against reference spectra from previously measured molecules. Yet even after a decade of expanding reference libraries, spectral searches annotate on average only about 5% of measured spectra, and 10% for human samples; the rest has been called the "dark matter" of mass spectrometry.
Many of the molecules producing these unannotated signals are already listed in public chemical databases, but their spectra have not been recorded, so there is no reference spectrum to compare against. Elucidating them instead requires inferring the structure directly from the observed fragment ions.
Analytical chemists have a well-tested, step-by-step workflow for narrowing down candidate structures from tandem (MS/MS) spectra: check spectral reference libraries, find the molecular formula and retrieve candidate structures from chemical databases, and then test every candidate against observed fragment peaks.
The tools for each step exist and are openly available, but running the full workflow would take a domain expert a significant amount of time for every single spectrum. Because a single study can produce thousands of spectra, manual analysis cannot keep up, leaving most of these signals unannotated.
Today, we are sharing Mass Spec Skills for Google Antigravity, a suite of domain skills that pair Gemini's chemical reasoning with the ability to run established mass spectrometry tools and query public chemical databases on the user's behalf to fulfil their request. Antigravity runs these skills, combines their results, and reasons about the chemistry, laying out the evidence for a chemist to review.
For molecules that are already catalogued in a database, identification is much faster. For undiscovered molecules, the agent still helps: it narrows down the formula and the parts of the structure supported by the fragments to guide full structure elucidation. A language model cannot do this on its own, since matching fragments to a structure takes precise mass calculations, searches across databases of millions of compounds, and simulations of how bonds break. Pairing Gemini’s reasoning with dedicated chemistry tools brings those steps into one workflow.
Antigravity and the Mass Spec Skills have the potential to transform our natural product-based drug discovery workflows by substantially accelerating the identification of bioactive compounds from complex plant extracts. Their remarkable accuracy in predicting even highly complex molecular structures (>90% in most of our evaluations), coupled with detailed interpretation of MS/MS fragmentation patterns, could significantly reduce the time required for compound annotation and enable us to prioritise promising bioactive candidates more rapidly and confidently.
Figure 1. How a molecule is identified from its tandem mass spectrum: prepare the signal, search reference libraries, deduce the formula and rank candidate structures, then cross-check and refine. Each step is carried out by our Mass Spec Skills built on established, openly available tools.
Researchers can describe their task and any instrument-specific tolerances in plain language without having to configure each underlying tool. The agent selects and chains the relevant skills, lowering the technical barrier to entry for scientists less familiar with computational tools. From a single prompt, the agent can take an unannotated tandem mass spectrum all the way to a proposed chemical structure and an auditable report (Figure 2).
Figure 2. The agent preprocesses the raw recording, identifies the molecular formula C20H21ClN6O, ranks 845 PubChem isomers against simulated fragments and neutral losses, and summarises the evidence alongside the top candidate structure. It also compiles a detailed report mapping predicted fragment substructures onto 14 of the 19 signal peaks (97.7% of summed fragment intensity).
Each stage of that workflow can also be run on its own for smaller everyday tasks, from cleaning up a noisy recording to annotating peaks or comparing candidate isomers:
Slide 1 of 6Spotting the precursor ion and removing baseline noise: the agent converts the negative-mode precursor peak at m/z 395.1387 ([M−H]−) into a neutral molecular mass of 396.1459 Da. Using matchms with configurable intensity thresholds, it strips out over 1,700 low-intensity background noise spikes from the raw recording, leaving a clean spectrum of fragment signals ready for structural analysis.
Checking public spectral libraries for known compounds: the agent queries experimental MS/MS reference libraries (GNPS and MoNA) using user-specified or instrument-matched mass tolerances, scoring de-noised fragment peaks by cosine similarity. In this example, the search returns no high-confidence library match, prompting the agent to fall back to formula prediction and chemical database search.
Pinning down the exact elemental composition: combining the neutral mass with SIRIUS fragmentation-tree scoring across ten candidate elements, the agent identifies the chlorinated formula C20H21ClN6O at −1.5 ppm mass error (score 37.86, well ahead of the runner-up at 28.33) and confirms that the main fragment formulas add up to the intact molecule.
Assigning fragments and diagnostic neutral losses: using MAGMa, MetFrag, and pairwise neutral-loss lookup, the agent accounts for 97.7% of the summed fragment intensity (matching 14 of the 19 preprocessed peaks). It links the measured peaks through sequential neutral losses of hydrogen chloride (HCl) and isocyanic acid (HNCO), placing a chlorine atom and a urea group on the same half of the molecule.
Breaking a score tie with reaction chemistry: when top isomers in PubChem account for the exact same share of the preprocessed spectrum (97.7% of summed fragment intensity across 14 of 19 peaks), the agent tests whether their bond connectivity and functional groups match the observed fragmentation pathways, ruling out candidates that lack a central urea linkage and identifying the top candidate that explains the major cleavages.
Validating the final molecule and its cleavage sites: the agent verifies with RDKit that the winning structure is chemically valid and matches the exact mass and formula, then draws the 2D molecule and highlights the central bond cleavage that produces the dominant fragment pair.
Antigravity and Mass Spec Skills takes a big leap forward from what we currently can do with MS/MS data. The ability to formulate de novo structure predictions, informed by existing knowledge minable through agentic AI, reduces a complicated process - one that previously required days or months of analysis and literature review - to a matter of hours. For natural products, this instantly creates a tool chemists can use to prioritize or de-prioritize features in their data towards metabolite classes of interest, enabling smarter and vastly accelerated workflows towards drug discovery.
From raw spectrum to structure end-to-end
To see how the chemical evidence fits together in practice, consider the negative-mode tandem mass spectrum from the end-to-end run in Figure 2 (precursor [M−H]− at m/z 395.1387; Figure 3).
Figure 3. Top: negative-mode tandem mass spectrum ([M−H]− precursor at m/z 395.1387; 1,761 raw peaks filtered to 19 preprocessed peaks), with peaks involved in known neutral-loss pairs highlighted in red, including the two complementary halves from central urea cleavage at m/z 162.1037 (45.1%) and m/z 232.0283 (6.8%). Bottom: zoomed fragment region (m/z 85–245) annotated with literature neutral losses, showing the closed HCl and HNCO loss loop from m/z 232.0283 (via m/z 196.0511 and m/z 189.0238 to m/z 153.0453) alongside secondary NH3 and H2 losses.
Negative-ion spectra are traditionally much harder to annotate than positive-ion recordings due to limited reference libraries and less well-characterised fragmentation mechanisms. With spectral library lookup disabled, the agent used SIRIUS to pin down the molecular formula C20H21ClN6O. In the fragmentation tree, the molecule splits cleanly into two complementary halves at m/z 162.1037 ([C9H12N3]−) and m/z 232.0283 ([C11H7ClN3O]−), whose formulas add up to the intact precursor. From the m/z 232.0283 half, sequential neutral losses of HCl and isocyanic acid (HNCO) in both orders form a closed loop indicating a central urea linkage.
With the molecular formula and these fragmentation clues established, the agent retrieved and scored all 845 C20H21ClN6O isomers in PubChem. Several high-scoring candidates, including a fused triazolobenzazepinol isomer (CID 154638626), accounted for 97.7% of the summed fragment intensity across 14 of the 19 preprocessed peaks, so the Gemini-powered agent tested whether they were chemically consistent with the observed losses. The triazolobenzazepinol isomer lacks a urea linkage, leaving it with no route to lose HNCO, and despite carrying a secondary alcohol, the spectrum has only baseline noise at the expected water-loss masses (m/z 377.1281 and m/z 214.0178). Filtering the 845 isomers for structures with a central urea bond that cleaves into the two measured halves ruled out close amide isomers such as the runner-up (CID 55558151; Figure 4) and narrowed the list to five urea regioisomers, where secondary fragments from the chlorophenyl-pyrazole side (m/z 206.0485 and m/z 126.0114) singled out the true molecule (CID 137835447). The verified structure and both rejected non-urea isomers accounted for the same 97.7% of summed fragment intensity, so distinguishing them required testing their fragmentation pathways.
Figure 4. Side-by-side comparison of the top two C20H21ClN6O isomer candidates, which both match 14 of 19 preprocessed peaks (97.7% of fragment intensity) in MAGMa and differ by inverted attachment of the central piperidine ring. Left: the verified Rank 1 structure (CID 137835447), whose asymmetric urea C−N bond cleaves directly into m/z 162.1037 and m/z 232.0283 and whose C-linked pyrimidine forms the low-mass fragments (m/z 93.0463–119.0611) without breaking aromatic rings (sum bond-break score 26.0). Right: the Rank 2 runner-up (CID 55558151), where inverting the piperidine ring turns the urea into an amide (requiring C−C cleavage) and leaves an N-linked pyrimidine with no attached carbon to form [C5H5N2]− (m/z 93.0463) without breaking aromatic rings (sum bond-break score 49.0; lower indicates a lower cleavage penalty).
Spectral coverage measures how much peak intensity a candidate matches by mass alone, without testing whether its functional groups and bond connectivity can plausibly form those fragments. Checking candidates against diagnostic neutral losses and bond cleavages, just as an analytical chemist would, lets Antigravity rule out high-scoring mismatches on its own and verify the final structure.
Reliable library identification and verification, even with a lightweight model
Even when a compound's reference spectrum is already stored in a public library, finding and verifying it is harder than simply giving an AI agent internet access. To test how reliably Antigravity handles end-to-end identification and verification, we evaluated it on 100 compounds sampled from the Enamine REAL MS/MS collection in MoNA (with structures also catalogued in PubChem), after filtering out under-fragmented recordings such as intact precursors or dimers that barely broke apart.
We compared three set-ups: (1) Antigravity with no internet access or skills (to test what the models can deduce from the peak list alone), (2) Antigravity with user-permitted internet access to query public libraries and databases on the user's behalf, and (3) Antigravity with that same access plus the Mass Spec Skills, across three models: the lightweight Gemini 3.8 Flash and two frontier models, Gemini 4 Argon and Gemini 4 Carbon.
With no internet access or skills, accuracy remained below 4% across all three models, confirming that they cannot reliably deduce molecular structures from the peak list alone. Giving the agent limited internet access allowed it to query online libraries, but custom search scripts written from scratch proved brittle around precursor windows, adducts, and noisy peaks, causing the frontier models to miss a quarter to a third of the spectra and the lightweight model to miss more than three-quarters.
With the Mass Spec Skills added, all three models identified and verified the exact molecule in around 97% of attempts, with the lightweight model matching the frontier models' accuracy (Figure 5a).
Skills also cut token cost and effort. Without internet or skills, the models used the most tokens per attempt trying to deduce structures from raw peak lists, and with internet access alone they still spent substantial tokens improvising API queries and debugging one-off scripts. With the Mass Spec Skills, the agent in Antigravity calls validated, ready-made skills instead, cutting generated tokens per attempt across every model: by nearly four times on Flash, by half on Argon, and by nearly a fifth on Carbon (Figure 5b).
Figure 5a. Exact-match identification accuracy on 100 benchmark spectra available in public reference libraries (three attempts per spectrum), comparing Antigravity alone (no internet, no skills), with internet access only, and with internet access plus the Mass Spec Skills (mean and 95% confidence interval). Attempts exceeding the one-hour wall-clock budget were scored as failures (0% accuracy); transient infrastructure and quota errors were excluded.
Figure 5b. Generated tokens per attempt on the same benchmark runs relative to the Gemini 4 Argon with internet access baseline (dashed line at 1.0×; mean and 95% confidence interval, excluding transient infrastructure and quota errors).
I’ve been testing Antigravity equipped with Mass Spec skills lately, and the experience has been phenomenal. It lowers the barrier to entry, making advanced analysis accessible even to users without coding experience, deep expertise in specialized domain tools, or a biochemistry background. It also goes far beyond being just an automated software tool. Combining Gemini + the AI Agent + the Mass Spec Skills forms a "golden triad" that feels just like hiring an in silico team - unlocking massive potential for fast building and testing customized workflows, proposing new ideas, addressing challenging problems anyone advancing discoveries.
A collaborative analytical assistant
Antigravity’s Mass Spec Skills pair mass spectrometry tools trusted by the community with transparent agentic reasoning, performing the time-consuming groundwork of spectral interpretation and keeping the chemist in control of decisions requiring scientific judgement.
However, there are some questions that cannot be answered from an LC-MS/MS spectrum at all, such as mirror-image molecules and some closely related isomers. These molecules all break apart in nearly identical ways; telling them apart requires other measurements, such as chromatographic retention time, ion mobility, or NMR.
Genuinely new molecules, including many natural products, are not in any existing database, so Antigravity cannot retrieve or confirm a structure on its own. It does, however, give an informed starting point for chemists, with a predicted formula, peak assignments, and a detailed annotation table.
Scaling automated spectral interpretation from single spectra to full metabolomics studies can help researchers identify far more of the unknown small molecules across human health, environmental science, and natural-product discovery.
Acknowledgements
The Mass Spec Skills are available on Google Antigravity today. Download the Antigravity App and install the Mass Spec plugin to start using these skills.
You can also get started with Mass Spec Skills on Antigravity today as an Enterprise user, by choosing “Use Business Account” and logging into the app with your Google Cloud credentials.
To further advance the pace of research, we’re offering 10,000 scientists the highest usage tier in Google Antigravity free of charge for 6 months (onboarded on a rolling basis), subject to eligibility, capacity, and selection. Applications are now open.
We would like to acknowledge the contributions of the following team members: Joao Madeira Araujo, Andrew Campbell, Antoine Dedieu, Arnaud Doucet, Julian Eisenschlos, Romu Elie, Doug Fritz, Gena Hong, Dan Horgan, Victoria Johnston, Anna Koivuniemi, Ira Korshunova, Agata Laydon, Vlad Mnih, Filip Radlinski, Sukhdeep Singh, Artem Sobolev, Lexi Walker and the Biocompatibility team.
Explore Science on Google Antigravity Apply for the highest usage tier in Google Antigravity
AI 热点