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

Fix nitrogen symmetry #1064

Merged
merged 2 commits into from
Jun 27, 2017
Merged

Fix nitrogen symmetry #1064

merged 2 commits into from
Jun 27, 2017

Conversation

goldmanm
Copy link
Contributor

This fixes a Nitrogen symmetry bug by removing the special exception for NO2 (since it is no longer necessary with the updated algorithm).

@goldmanm
Copy link
Contributor Author

For some reason, the travis build threw the same error as before. It also cited the same line (116 in symmetry.py). This confuses me since now that I fixed the issue (runs fine on my computer), line 116 of symmetry.py is blank on the branch. I don't know why travis is throwing the same error as before when it runs fine on my branch. Maybe I am not understanding something or maybe Travis somehow didn't fully update/recompile properly.

@KEHANG, can you check out the travis build for this PR? The commit numbers for the two branches are the same 'abb37e8', and I am not sure if that indicates there was some issue updating/syncing. All the other builds listed 2 commit numbers (example). Any idea what only having one commit number indicates?

@KEHANG
Copy link
Member

KEHANG commented Jun 27, 2017

The failing message is from running NC job using benchmark version which is current master, we know that has the bug. In this case, we probably have to make sure the NC example runs successfully locally using the new branch and merge it into master. The merged master should pass RMG-tests.

rmgpy/species.py Outdated
logging.warning('Resonance Hybrid: {}'.format(resonanceHybrid.toAdjacencyList()))
for index, mol in enumerate(self.molecule):
logging.warning("Resonance Structure {}: {}".format(index,mol.toAdjacencyList()))
raise
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this line is just for your debugging purpose. Maybe add exception with helpful information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the helpful note : Wrong bond order generated by resonance hybrid. Replacing the old exception with a new one will hide information within the key error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified to logging.error to be consistent with error checking in #907

@@ -113,7 +113,7 @@ def calculateAtomSymmetryNumber(molecule, atom):
# Two single bonds
if count == [2]:
symmetryNumber *= 2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely. I just make this to try to re-trigger RMG-tests, since it wasn't functioning properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit should be removed.

@KEHANG
Copy link
Member

KEHANG commented Jun 27, 2017

I just tested this branch locally with NC example, as you mentioned, it runs smoothly. So I agree to merge soon.

@goldmanm goldmanm force-pushed the fix_nitrogen_symmetry branch from fba52ab to 5119e4f Compare June 27, 2017 14:55
@goldmanm
Copy link
Contributor Author

I just removed the commit. Let me know if anything else should be modified before rebasing onto the master branch.

goldmanm added 2 commits June 27, 2017 12:15
The special case for NO2 atom symmetry was removed since the updated
symmetry algorithm can correctly identify the atom symmetry, with
the addition to the if/elif block.
@goldmanm goldmanm force-pushed the fix_nitrogen_symmetry branch from 5119e4f to 044f0d8 Compare June 27, 2017 16:15
@goldmanm goldmanm merged commit 4bd520a into master Jun 27, 2017
@goldmanm goldmanm deleted the fix_nitrogen_symmetry branch June 27, 2017 16:51
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

Successfully merging this pull request may close these issues.

2 participants