Skip to content

Instantly share code, notes, and snippets.

@jonalv
Created November 11, 2008 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jonalv/23900 to your computer and use it in GitHub Desktop.
Save jonalv/23900 to your computer and use it in GitHub Desktop.
var dbName = "exampleScriptDB";
if ( structuredb.allDatabaseNames().contains(dbName) ) {
structuredb.deleteDatabase(dbName);
}
toluene = cdk.fromSMILES("Cc1ccccc1");
ethanol = cdk.fromSMILES("CCO");
oxygen = cdk.fromSMILES("O=O");
structuredb.createDatabase(dbName);
toluene = structuredb.createMolecule(dbName, "toluene", toluene);
ethanol = structuredb.createMolecule(dbName, "ethanol", ethanol);
oxygen = structuredb.createMolecule(dbName, "oxygen", oxygen);
js.print("Starting sub structure search");
var hits = structuredb.subStructureSearch( dbName, cdk.fromSMILES("C") );
js.print(hits);
hits;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment