From d02643a0fee8c0ee164cc211291de7de556521a8 Mon Sep 17 00:00:00 2001 From: Ernest Glukhov <39369110+glukhove@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:05:51 -0500 Subject: [PATCH] fixing sample name in schema Related to this change: https://github.com/jwohlwend/boltz/commit/95dacb6ab0d467a6b9eae32b148529a4ff393d42 Issue: https://github.com/jwohlwend/boltz/issues/185 --- src/boltz/data/parse/schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/boltz/data/parse/schema.py b/src/boltz/data/parse/schema.py index 79f9c08..1b8545e 100644 --- a/src/boltz/data/parse/schema.py +++ b/src/boltz/data/parse/schema.py @@ -651,10 +651,10 @@ def parse_boltz_schema( # noqa: C901, PLR0915, PLR0912 # Set atom names canonical_order = AllChem.CanonicalRankAtoms(mol) for atom, can_idx in zip(mol.GetAtoms(), canonical_order): - name = atom.GetSymbol().upper() + str(can_idx + 1) - if len(name) > 4: + atom_name = atom.GetSymbol().upper() + str(can_idx + 1) + if len(atom_name) > 4: raise ValueError(f"{seq} has an atom with a name longer than 4 characters.") - atom.SetProp("name", name) + atom.SetProp("name", atom_name) success = compute_3d_conformer(mol) if not success: