coordgenlibs
coordgenlibs copied to clipboard
sketcherMinimizer::clear() doesn't completely reset the object
Some of the vectors of pointers which are members of the sketcherMinimizer
class that get populated either by the initialize()
method, or during coordinate generation do not get emptied by the clear()
method. The objects that these pointers reference do get deleted during the cleanup, but the pointers still exist, and are therefore in an invalid state.
This is not caught by the current (mem) tests because the "SampleTest" test case that is in place in this repository only works on a single molecule, so that the sketcherMinimizer
does not get reused and that the invalid pointers are never hit.
This can be fixed, apparently, by adding the following at the end of the clear()
method:
_atoms.clear();
_bonds.clear();
_residueInteractions.clear();
_independentFragments.clear();
m_proximityRelations.clear();
I'm not sure, though, if clearing these is intentionally omitted, or whether doing it would break any other functionality. Also, I don't know if the other members, m_fragmentBuilder
and m_minimizer
, also require clearing.
@ricrogz Hi! I have solved the above issue as you have mentioned. Will you please assign me this issue? so that I can make my first contribution :)