Skip to content

Instantly share code, notes, and snippets.

@gilleain
Created January 16, 2009 15:36
Show Gist options
  • Save gilleain/47967 to your computer and use it in GitHub Desktop.
Save gilleain/47967 to your computer and use it in GitHub Desktop.
SMILES to JCP in one line
//create a molecule from a smiles, generate 2D coords, and load it into jcp in one line
ui.open(cdk.generate2dCoordinates(cdk.fromSMILES("C1=C(=O)CC=C(N)C1")), "net.bioclipse.cdk.ui.editors.jchempaint")
// replace the molecule with a new one (cubane)
jcp.setModel(cdk.generate2dCoordinates(cdk.fromSMILES("C12C3C4C1C5C4C3C25")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment