Skip to content

Instantly share code, notes, and snippets.

@gilleain
Created January 23, 2009 17:15
Show Gist options
  • Save gilleain/51090 to your computer and use it in GitHub Desktop.
Save gilleain/51090 to your computer and use it in GitHub Desktop.
make and save a benzene, then fuse it with another
// showing off the scripting potential of the jchempaint editor
// create a benzene ring, and save it in the /Vitrual folder
cdk.saveMolecule(cdk.generate2dCoordinates(cdk.fromSMILES("c1ccccc1")), "/Virtual/benzene.cml")
// open this file in a jchempaint editor
ui.open("/Virtual/benzene.cml")
// fuse this benzene with another
jcp.addPhenyl(jcp.getModel().atomContainer.getBond(0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment