Forked from egonw/sstructuredb test script.js
Created
February 4, 2009 12:42
Revisions
-
egonw revised this gist
Nov 17, 2008 . 1 changed file with 12 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,21 @@ var dbName = "exampleScriptDB"; if ( structuredb.allDatabaseNames().contains(dbName) ) { structuredb.deleteDatabase(dbName); } structuredb.createDatabase(dbName); smiles = new Array("Cc1ccccc1", "CCO", "O=O"); names = new Array("toluene", "beer", "air"); for (i=0; i<3; i++) { mol = cdk.fromSMILES(smiles[i]); structuredb.createMolecule(dbName, names[i], mol); } js.print("Starting sub structure search"); var hits = structuredb.subStructureSearch( dbName, cdk.fromSMILES("C") ); js.print(hits); hits; -
jonalv created this gist
Nov 11, 2008 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ 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;