Created
May 6, 2009 10:25
-
-
Save egonw/107473 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
| // connect to the XMPP hive | |
| xmpp.connect(); | |
| // we are going to call the Lipinski Rule of Five function of the descriptor service | |
| service = xmpp.getService("descriptor.ws1.bmc.uu.se"); | |
| service.discoverSync(5000); | |
| service.getFunctions(); | |
| f = service.getFunction("LipinskiRuleOfFive"); | |
| // we use Bioclipse to create a CML document, starting from a SMILES | |
| smiles = "COC"; | |
| propane = cdk.fromSMILES(smiles); | |
| js.clear(); | |
| js.print("Molecule SMILES: " + smiles + "\n"); | |
| result = f.invokeSync(propane.getCML(), 900000); | |
| cmlReturned = xmpp.toString(result); | |
| // convert the returned CML into CMLXOM and extract the value | |
| cmlReturned = cmlReturned.replace("xsd:int", "xsd:integer") | |
| propertyList = cml.fromString(cmlReturned); | |
| value = propertyList.getPropertyElements().get(0). | |
| getScalarElements().get(0).getValue() | |
| js.print("Lipinski Rule of Five: " + value + "\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment