When filter_leaving_atoms=True, the clean_structure function drops the O1 atom from all glycans, including non-linking saccharides (GLYCAN_OTHER_LIGANDS). For linking saccharides, O1 is the hydroxyl group that can be replaced by a glycosidic bond, so treating it as a leaving atom is correct. But for non-linking saccharides, O1 should not be removed.
The issue appears in two places: structure_cleaning.py (line 177) and atom_layout.py (line 676).
In both cases, GLYCAN_OTHER_LIGANDS should probably be excluded so that only GLYCAN_LINKING_LIGANDS trigger O1 removal.
When
filter_leaving_atoms=True, theclean_structurefunction drops the O1 atom from all glycans, including non-linking saccharides (GLYCAN_OTHER_LIGANDS). For linking saccharides, O1 is the hydroxyl group that can be replaced by a glycosidic bond, so treating it as a leaving atom is correct. But for non-linking saccharides, O1 should not be removed.The issue appears in two places: structure_cleaning.py (line 177) and atom_layout.py (line 676).
In both cases, GLYCAN_OTHER_LIGANDS should probably be excluded so that only GLYCAN_LINKING_LIGANDS trigger O1 removal.