Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sketcherMinimizer::clear() doesn't completely reset the object #51

Open
ricrogz opened this issue Feb 11, 2020 · 1 comment
Open

sketcherMinimizer::clear() doesn't completely reset the object #51

ricrogz opened this issue Feb 11, 2020 · 1 comment

Comments

@ricrogz
Copy link
Collaborator

ricrogz commented Feb 11, 2020

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.

@CodeAnk2829
Copy link

@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 :)

CodeAnk2829 added a commit to CodeAnk2829/coordgenlibs that referenced this issue Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants