diff --git a/modules/qa/src/all_atom_potential.cc b/modules/qa/src/all_atom_potential.cc index b59337914c6148d89945a4351930fff5cb1efadf..348880447a93c9f8530bc1a4b65a146f809e2d72 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);