Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created September 18, 2012 07:56
Show Gist options
  • Select an option

  • Save johnmay/3741888 to your computer and use it in GitHub Desktop.

Select an option

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