orthonym.decomposition.fragment_capping#
Note
Internal API. Names and behaviour may change between releases.
Fragment capping for decomposition engine.
After bond cleavage, replaces dummy atoms with H or OH to produce valid molecule fragments for recursive naming.
IUPAC: Principal characteristic group determines which side of a cleavage retains the parent suffix. Acid-side fragments are capped with OH to reconstruct the parent acid; alkyl/amine-side fragments are capped with H.
- orthonym.decomposition.fragment_capping.cleave_and_cap(mol, bond_infos, acid_side_oh=True)#
Cleave molecule at specified bonds and return H/OH-capped fragments.
Uses RDKit FragmentOnBonds to cleave, then replaces dummy atoms: - Acid-side fragments: cap with OH (produces carboxylic acid) if acid_side_oh=True
per IUPAC principal characteristic group preservation
Alkyl/amine-side fragments: cap with H
Fragment side labeling uses dummyLabels to track which dummy came from which side of the bond: label 1 = acid side, label 2 = alkyl/amine side.
- Parameters:
mol – RDKit Mol object
bond_infos (List[Dict]) – List of bond info dicts from find_cleavable_bonds
acid_side_oh (bool) – If True, cap acid-side fragments with OH
- Returns:
List of dicts with keys – smiles, side, original_atoms
- Return type:
List[Dict]