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

Failing moleculetest - bondByUniqueID #348

Closed
ghutchis opened this issue Aug 5, 2018 · 3 comments
Closed

Failing moleculetest - bondByUniqueID #348

ghutchis opened this issue Aug 5, 2018 · 3 comments

Comments

@ghutchis
Copy link
Member

ghutchis commented Aug 5, 2018

The current Travis is failing out for all builds after #336. That merge was tested without #316 so ctest didn't show the failure.

I have no idea why the test is failing qtgui/moleculetest.cpp#L544

  EXPECT_FALSE(assign.bondByUniqueId(2).isValid());

The commit doesn't change anything in the qtgui/molecule class.

Help debugging this would be most welcome (e.g., how many bonds does the water molecule think it has at this point, etc.)

@cryos
Copy link
Member

cryos commented Aug 5, 2018

I can take a look at this, I have been traveling a lot, but will try to set some time aside to figure out what is wrong unless @psavery gets a chance to look into it before me.

@psavery
Copy link
Collaborator

psavery commented Aug 5, 2018

I believe I found a solution and submitted PR #349 as a fix.

The issue is that QtGui::Molecule::addBond for atom types was appending to m_bondUniqueIds, then calling Core::Molecule::addBond for atom types, which then called QtGui::Molecule::addBond for atom indices because QtGui overrides the Core version of this function, and then m_bondUniqueIds would get appended a second time.

My fix calls Core::Molecule::addBond for atom indices directly, so it circumvents this complex calling sequence.

If another fix is preferred, let me know.

@ghutchis
Copy link
Member Author

ghutchis commented Aug 6, 2018

Thanks - this is fixed by #349

@ghutchis ghutchis closed this as completed Aug 6, 2018
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

3 participants