You are here

Potentially incorrect heavyAtoms_end() iterator in core/conformation/Residue.hh

4 posts / 0 new
Last post
Potentially incorrect heavyAtoms_end() iterator in core/conformation/Residue.hh

The following is the definition of heavyAtoms_end in Residue.hh

Atoms::const_iterator heavyAtoms_end() const
return atoms_.begin() + nheavyatoms() - 1;

With this definition, any loop of the form for( conformation::Atoms::const_iterator blah = res.sidechainAtoms_begin(); blah != res.heavyAtoms_end(); ++blah), will SKIP iterating over the LAST heavyatom in the residue. From my understanding of the iterator concept, the end iterator should always point to one past the last element to be accessed.

Is this a bug or am I missing something here?

Post Situation: 
Wed, 2012-08-15 12:20

You are correct that this is incorrect. It was fixed in SVN 46006, which predates 3.4 (SVN 48005) - so I assume you found this in pre-3.4?

Wed, 2012-08-15 14:54

Yes. I found this in 3.3. Is there a changelog that accompanies the new releases?

Wed, 2012-08-15 15:08

We don't keep a public-facing changelog to that depth. There is a broad-scope new modules list with the releases sometimes. We are considering going to weekly releases; we may integrate that with the bug tracker and do a weekly bugs-fixed-list, but it seems only medium likely.

Thu, 2012-08-16 06:30