-
-
Save egonw/25713 to your computer and use it in GitHub Desktop.
Creates a local structure database and adds three molecules to it.
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 characters
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment