From 3dca79651c9e3754386d52079501ff8d6bde715f Mon Sep 17 00:00:00 2001 From: pascal <pascal@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Fri, 20 Aug 2010 06:45:26 +0000 Subject: [PATCH] Get Handle for interaction potenial in order to have correct residue index git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2661 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/qa/src/all_atom_potential.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/qa/src/all_atom_potential.cc b/modules/qa/src/all_atom_potential.cc index b59337914..348880447 100644 --- a/modules/qa/src/all_atom_potential.cc +++ b/modules/qa/src/all_atom_potential.cc @@ -81,7 +81,8 @@ public: if (d<0) d=0.0; if (d>options_.lower_cutoff) { - if (abs(atom_handle.GetResidue().GetIndex()-a.GetResidue().GetIndex())<options_.sequence_sep) { + // GetHandle() necessary to retriev original index of the view (as compared to index in the view): + if (abs(atom_handle.GetResidue().GetIndex()-a.GetResidue().GetHandle().GetIndex())<options_.sequence_sep) { continue; } energy_+=energies_.Get(type_a, type_b, d); -- GitLab