diff --git a/src/boltz/data/parse/schema.py b/src/boltz/data/parse/schema.py index 9d54c1b..f3851ed 100644 --- a/src/boltz/data/parse/schema.py +++ b/src/boltz/data/parse/schema.py @@ -205,6 +205,7 @@ def parse_ccd_residue( name: str, ref_mol: Mol, res_idx: int, + remove_oxt_atom: bool = False ) -> Optional[ParsedResidue]: """Parse an MMCIF ligand. @@ -273,6 +274,11 @@ def parse_ccd_residue( for i, atom in enumerate(ref_mol.GetAtoms()): # Get atom name, charge, element and reference coordinates atom_name = atom.GetProp("name") + + # Drop OXT atoms for non-canonical amino acids. + if remove_oxt_atom and atom_name == 'OXT': + continue + charge = atom.GetFormalCharge() element = atom.GetAtomicNum() ref_coords = conformer.GetAtomPosition(atom.GetIdx()) @@ -385,6 +391,7 @@ def parse_polymer( name=res_corrected, ref_mol=ref_mol, res_idx=res_idx, + remove_oxt_atom=True, ) parsed.append(residue) continue