Vortex script interacting with a web service

In previous scripts we have generated data using a local Java program, C program, PERL script, and SVL program. In this tutorial rather than have a local application generate the data we will use a web service.

The Virtual Computational Chemistry Laboratory provides a number of free online tools that are useful for computational chemistry. One of these tools is a web service is a LogPS which provides a prediction of logP and water solubility.

  • 1-octanol/water calculation: ALOGPs was developed with 12908 molecules from the PHYSPROP database using 75 E-state indicies. 64 neural networks were trained using 50% of molecules selected by chance from the whole set. The logP prediction accuracy is root mean squared error rms=0.35 and standard mean error s=0.26.
  • Aqueous solubility calculation: ALOGpS was developed using 1291 molecules and provided improved aqueous solubility prediction (rms=0.49, s=0.38) compared to our previous analysis.
    1. Tetko, I. V.; Tanchuk, V. Y. Application of associative neural networks for prediction of lipophilicity in ALOGPS 2.1 program, J. Chem. Inf. Comput. Sci., 2002, 42, 1136-45.
    2. Tetko, I. V.; Tanchuk, V. Y.; Villa, A. E. Prediction of n-octanol/water partition coefficients from PHYSPROP database using artificial neural networks and E-state indices, J. Chem. Inf. Comput. Sci., 2001, 41, 1407-21.
    3. Tetko, I. V.; Tanchuk, V. Y.; Kasheva, T. N.; Villa, A. E. Estimation of aqueous solubility of chemical compounds using E-state indices, J. Chem. Inf. Comput. Sci., 2001, 41, 1488-93

Whilst the website provides access using a Java applet there is also a web service interface that requires input in the following format

The result is returned thus

Explanation

Since this script access an external web service it is probably not a good idea to send your proprietary structures to this service, the first part of the script reminds the user of this, if the user presses OK then the script runs.

The next part generates two new columns, “aLogP” and “aLogS”. We then need to get the SMILES string for each structure as we loop through the table.

The next task is to generate the URL containing the SMILES string, however since SMILES often contain characters outside the ASCII set, the SMILES string has to be converted into a valid ASCII format. The URL encoding replaces unsafe ASCII characters with a “%” followed by two hexadecimal digits. 

We then submit the data to the web service and capture the text returned. The final part of the script parses the text returned to extract the LogP and LogS values. Finally we update the table.

This script calculates data that people may have access to via a desktop application however it should be possible to modify the script to interact with other web services, perhaps in house tools to calculate physicochemical properties based on experimental data within a series of compounds, or algorithms to predict ADME properties, unwanted HERG or CYP450 interactions.

The Vortex Script

The vortex script can be downloaded from here

Last updated 19 Feb 2013

Related Posts