Created
September 18, 2012 07:56
-
-
Save johnmay/3741888 to your computer and use it in GitHub Desktop.
CDK iterators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IAtomContainer container = ... | |
Iterator<IAtom> it = container.atoms(); | |
while(it.hasNext()){ | |
IAtom atom = it.next(); | |
if("H".equals(atom.getSymbol())){ | |
it.remove(); // invokes container.removeBond(IBond); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment