Skip to content

Instantly share code, notes, and snippets.

@olas
Created April 14, 2009 14:04
Show Gist options
  • Save olas/95194 to your computer and use it in GitHub Desktop.
Save olas/95194 to your computer and use it in GitHub Desktop.
Calculate 2 descr for a molecule
/*******************************************************************************
* Bioclipse script to calculate 2 descriptors for a molecule.
* Requires the Chemoinformatics and QSAR features to be installed.
*
* Author: Ola Spjuth
*
******************************************************************************/
mol=cdk.fromSMILES("C1CNCCC1CC(COC)CCNC");
descid="http://www.blueobelisk.org/ontologies/chemoinformatics-algorithms/#bpol";
descid2="http://www.blueobelisk.org/ontologies/chemoinformatics-algorithms/#hBondDonors";
dres = qsar.calculate(mol, descid);
js.print("\nDescriptor results: " + dres.getLabels()[0] + ": " + dres.getValues()[0]+"\n")
dres = qsar.calculate(mol, descid2);
js.print("Descriptor results: " + dres.getLabels()[0] + ": " + dres.getValues()[0]+"\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment