Skip to content

Instantly share code, notes, and snippets.

@johnmay
Created September 5, 2012 14:19
Show Gist options
  • Save johnmay/3637359 to your computer and use it in GitHub Desktop.
Save johnmay/3637359 to your computer and use it in GitHub Desktop.
CDK IteratingMDLReader with skip
Reader reader = new BufferedReader(new FileReader(new File("ChEBI_lite.sdf")),
2048);
// instantiate the iterating reader with skip=true in the constructor
IteratingMDLReader sdf = new IteratingMDLReader(reader,
SilentChemObjectBuilder.getInstance(),
Boolean.TRUE);
while (sdf.hasNext()){
IAtomContainer container = sdf.next();
/// logic
}
sdf.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment