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

Faster AtomContainer Prep Work #339

Merged
merged 12 commits into from Jun 24, 2017
Merged

Faster AtomContainer Prep Work #339

merged 12 commits into from Jun 24, 2017

Conversation

johnmay
Copy link
Member

@johnmay johnmay commented Jun 20, 2017

Towards #278

These patches add some API points to IAtom/IBond, introduce the AtomRef/BondRef base implementations and make some small changes.

I'm still testing the Faster Implementation locally but these are some independant changes that are needed and should be relatively quick to review (compared to the imminent 'AtomContainer2' implementation).

To IAtom we add these methods:

IAtom atom = ...;
IAtomContainer container = atom.getContainer(); // the 'parent' atom container
int index = atom.getIndex(); // the index in the container
// bonds of the atom
for (IBond bond : atom.bonds()) {

}
int bondCount = atom.getBondCount();

Similar for bonds with regard to getIndex() and getContainer().

For 'current' atoms these will return null, -1, or throw unsupported operation exceptions.

@johnmay johnmay force-pushed the patch/FasterAtomContainerPrep branch from 2385c18 to aad28ba Compare June 22, 2017 20:48
@egonw egonw merged commit 2ab5e74 into master Jun 24, 2017
@johnmay johnmay mentioned this pull request Sep 13, 2017
@johnmay johnmay deleted the patch/FasterAtomContainerPrep branch March 18, 2018 20:32
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