Skip to content

Instantly share code, notes, and snippets.

@egonw
Created January 16, 2009 21:02
Show Gist options
  • Select an option

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

Select an option

Save egonw/48130 to your computer and use it in GitHub Desktop.
// debug CDK atom types starting from SMILES
var smiles = "[nH0]1c([nH0]cc1[N+](=O)[O-])"
var file = "/Virtual/smiles5.mol"
var mol = cdk.fromSMILES(smiles)
mol = cdk.generate2dCoordinates(mol)
cdk.saveMDLMolfile(mol, file)
cdx.perceiveCDKAtomTypes(mol)
ui.open(file) // should open JChemPaint
@egonw
Copy link
Copy Markdown
Author

egonw commented Apr 13, 2019

The SMILES is actually invalid, according to CDK 2.2 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment