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

Convenience, return number of rings (circuit rank) when ring flags ar… #290

Merged
merged 1 commit into from Apr 1, 2017

Conversation

johnmay
Copy link
Member

@johnmay johnmay commented Mar 29, 2017

…x by re-adding and delegating the old method.

The number of rings can currently calculated by

Cycles.sssr(mol).numberOfCycles();

This is expensive requiring guass matrix elimination. If only the count is needed we can return that much faster. This patch adds the return value to the Cycles.markRingAtomsAndBonds(). You can now do quick filtering like the following:

if (Cycles.markRingAtomsAndBonds(mol) > 0) {
   // has ring
}

@egonw egonw merged commit 445e144 into master Apr 1, 2017
@johnmay johnmay deleted the patch/ringmark-api branch April 19, 2017 10:25
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.

None yet

2 participants