Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created September 18, 2012 07:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnmay/3741888 to your computer and use it in GitHub Desktop.
Save johnmay/3741888 to your computer and use it in GitHub Desktop.
CDK iterators
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