From e7a610b01a8b2ee9107ca298f8f7a7b33783cd51 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Tue, 17 May 2022 22:49:57 +0200 Subject: [PATCH] lDDT: bugfix --- modules/mol/alg/pymod/lddt.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/mol/alg/pymod/lddt.py b/modules/mol/alg/pymod/lddt.py index 3f3c7d1eb..95450b489 100644 --- a/modules/mol/alg/pymod/lddt.py +++ b/modules/mol/alg/pymod/lddt.py @@ -506,7 +506,8 @@ class lDDTScorer: f" expect {self.compound_names[r_idx]}" ) res_start_idx = self.res_start_indices[r_idx] - anames = self.compound_anames[self.compound_names[r_idx]] + rname = self.compound_names[r_idx] + anames = self.compound_anames[rname] atoms = [r.FindAtom(aname) for aname in anames] res_ref_atom_indices.append( list(range(res_start_idx, res_start_idx + len(anames))) @@ -520,9 +521,9 @@ class lDDTScorer: pos[res_start_idx + a_idx][1] = p[1] pos[res_start_idx + a_idx][2] = p[2] res_atom_indices[-1].append(res_start_idx + a_idx) - if r.name in self.compound_symmetric_atoms: + if rname in self.compound_symmetric_atoms: sym_indices = list() - for sym_tuple in self.compound_symmetric_atoms[r.name]: + for sym_tuple in self.compound_symmetric_atoms[rname]: a_one = atoms[sym_tuple[0]] a_two = atoms[sym_tuple[1]] if a_one.IsValid() and a_two.IsValid(): -- GitLab