Skip to content

Instantly share code, notes, and snippets.

@egonw
Created April 17, 2009 14:44
Show Gist options
  • Select an option

  • Save egonw/97067 to your computer and use it in GitHub Desktop.

Select an option

Save egonw/97067 to your computer and use it in GitHub Desktop.
import org.openscience.cdk.*
import org.openscience.cdk.io.*
import org.openscience.cdk.nonotify.*
cid = 5282253
reader = new PCCompoundXMLReader(
new URL(
"http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=$cid&disopt=SaveXML"
).newInputStream()
)
mol = reader.read(new NNMolecule())
println "Atom count: $mol.atomCount"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment