Created
December 28, 2009 12:58
-
-
Save olas/264658 to your computer and use it in GitHub Desktop.
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
//============================================================== | |
// Create a sample StructureDB instance and populate it with | |
// 10 molecules from SMILES. | |
// | |
// Author: Ola Spjuth <ola(AT)bioclipse.net> | |
//============================================================== | |
//Create a project to hold temporary SDFile | |
project=ui.newProject("cheatsheet"); | |
//Set up list of molecules | |
mols = java.util.ArrayList(); | |
mols.add(cdk.fromSMILES("C(=O)N(Cc1ccco1)C(c1cc2ccccc2cc1)C(=O)NCc1ccccc1")); | |
mols.add(cdk.fromSMILES("C(=O)(CNC(=O)OC(C)(C)C)N(Cc1oc(C(F)(F)F)cc1)C(c1ccccc1)C(=O)NCc1ccccc1")); | |
mols.add(cdk.fromSMILES("C(=O)(C=CC)N(CCCCCCC)C(c1cc2c(cccc2)c2ccccc12)C(=O)NC(C)(C)C")); | |
mols.add(cdk.fromSMILES("O=S(=O)(N)CC1=NOC2=CC=CC=C12")); | |
mols.add(cdk.fromSMILES("O=C1CCC5(O)(C4N(CCC25(C=3C(OC12)=C(O)C=CC=3C4))CC6CC6)")); | |
mols.add(cdk.fromSMILES("O=NN(C(=O)NCCCl)CCCl")); | |
mols.add(cdk.fromSMILES("O=P1(OCCCN1(CCCl))(NCCCl)")); | |
mols.add(cdk.fromSMILES("N=1C=NN(C=1)CC=2C=CC=3NC=C(C=3(C=2))CCN(C)C")); | |
mols.add(cdk.fromSMILES("O=C(O)C2N(C(=O)C(NC(C(=O)OCC)CCC1=CC=CC=C1)C)C3CCCC3(C2)")); | |
mols.add(cdk.fromSMILES("O=C(O)C2N(C(=O)C(NC(C(=O)OCC)CCC1=CC=CC=C1)C)C3CCCC3(C2)")); | |
//Save list of molecules to file | |
cdk.saveSDFile("cheatsheet/vs.sdf", mols); | |
//Import file to StructureDB | |
structuredb.addMoleculesFromSDF("myDB","/cheatsheet/vs.sdf") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment