From 9830bee5b644a78035204365617866c43cd9084f Mon Sep 17 00:00:00 2001 From: Nathaniel Corley Date: Tue, 10 Dec 2024 11:47:43 -0800 Subject: [PATCH] Update src/biotite/structure/bonds.pyx Co-authored-by: Patrick Kunzmann --- src/biotite/structure/bonds.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/biotite/structure/bonds.pyx b/src/biotite/structure/bonds.pyx index 65da11f1e..ac9f295e1 100644 --- a/src/biotite/structure/bonds.pyx +++ b/src/biotite/structure/bonds.pyx @@ -1647,7 +1647,11 @@ def connect_via_residue_names(atoms, bint inter_residue=True, res_names[curr_start_i], {} ) - atom_names_in_res = atom_names[curr_start_i : next_start_i] + std_name_mapping = get_std_atom_names(res_names[curr_start_i]) + atom_names_in_res = { + std_name_mapping[atom_name] for atom_name + in atom_names[curr_start_i : next_start_i] + } # Check if we should use alternative atom names std_atom_ids = get_from_ccd(