Skip to content

Sugar Detection Utility#1225

Merged
johnmay merged 1 commit intocdk:mainfrom
JonasSchaub:sugar-detection-utility
Sep 12, 2025
Merged

Sugar Detection Utility#1225
johnmay merged 1 commit intocdk:mainfrom
JonasSchaub:sugar-detection-utility

Conversation

@JonasSchaub
Copy link
Copy Markdown
Contributor

This new functionality, the SugarDetectionUtility, can be used for algorithmically separating glycosides into their aglycone and sugar moieties. The main feature is the ability to create copies of both the aglycone and individual sugar fragments from a given molecule, with proper handling of attachment points and stereo chemistry, and some optional post-processing options. The new class extends the SugarRemovalUtility and uses the same algorithm (described here) to generate the aglycone (with slight deviations, see below).

Background:
The SugarRemovalUtility is focused on generating a sensible aglycone and extracts the removed sugars only as Tetrahydrofuran/Tetrahydropyran (CNP IDs refer to compounds in the COCONUT natural products database):

image

This shortcoming is now resolved by the Sugar Detection Utility:

image

The Sugar Detection Utility supports:

  • Duplication of connecting hetero atoms in glycosidic bonds, to produce more sensible educts (see above)
  • Preservation of stereo chemistry at connection points (see above)
  • Detection and extraction of both circular and linear sugar moieties (see the Sugar Removal Utility documentation for more details on this)
  • image

  • Saturation of broken bonds with either implicit hydrogen atoms or pseudo ("R") atoms
  • image

  • Post-processing of sugar fragments including bond splitting (O-glycosidic, ether, ester, peroxide) to separate the individual sugars
  • image

  • Limiting this post-processing by size, so that small modifications remain attached to the sugars
  • image

  • Optional mapping of atoms and bonds from the original molecule to their copies in the aglycone and sugar fragments (to retrieve atoms indices or an extracted fragment or to get group indices for all atoms in the original molecule

All sugar detection and removal operations respect the settings inherited from the parent SugarRemovalUtility class, including terminal vs. non-terminal sugar removal, preservation mode settings, various detection thresholds, etc. (for documentation, see the code or the paper linked above)

In two cases, the initial SugarRemovalUtility results are corrected for extraction:

  • When a sugar would lose its C6

image

  • When a sugar is on the "carboxy end" of an ester bond to the aglycone
  • image

Basic Usage Example:

SugarDetectionUtility utility = new SugarDetectionUtility(SilentChemObjectBuilder.getInstance());
//check the overloaded variants of this method for more options
List fragments = utility.copyAndExtractAglyconeAndSugars(molecule);
IAtomContainer aglycone = fragments.get(0);  // First element is always the aglycone
// Subsequent elements are individual sugar fragments

The code is documented and extensively tested.

If you want to see the SugarDetectionUtility in action, check out our MOlecule fRagmenTAtion fRamework (MORTAR) application, the SDU will be part of the next release.

A paper describing the algorithm is coming up.

Looking forward to your feedback!

@johnmay
Copy link
Copy Markdown
Member

johnmay commented Sep 12, 2025

Looks good, just a note you just the attachment point semantics instead of "R" that really should just be for Markush. It is OK as a '*' though

@johnmay johnmay merged commit 2a7c3c1 into cdk:main Sep 12, 2025
6 of 7 checks passed
@JonasSchaub JonasSchaub deleted the sugar-detection-utility branch September 12, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants