Created
April 14, 2009 13:57
-
-
Save olas/95189 to your computer and use it in GitHub Desktop.
Calculate a list of descriptors (no params) for a list of molecules
This file contains 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
/******************************************************************************* | |
* Bioclipse-script to calculate a list of descriptors for a list of molecules. | |
* This script does not support parameters to descriptors and requires the | |
* Chemoinformatics and QSAR features to be installed. | |
* | |
* Author: Ola Spjuth | |
* | |
******************************************************************************/ | |
//Set up list of descriptors | |
dlist = java.util.ArrayList(); | |
d1="http://www.blueobelisk.org/ontologies/chemoinformatics-algorithms/#hBondDonors"; | |
d2="bpol"; //Optional to use short form of descriptorID | |
dlist.add(d1); | |
dlist.add(d2); | |
//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")); | |
//Some debug output | |
js.print("\nWe have " + mols.size() +" mols and " + dlist.size() + " descriptors.\n\n"); | |
//Do descriptor calculation | |
res=qsar.calculate(mols,dlist); | |
//Display results | |
js.print(res.toMatrix()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment