User bf27213fcf
11-09-2009 18:29:42
User c1ce6b3d19
14-09-2009 16:47:55
User bf27213fcf
14-09-2009 18:01:28
Hi John,
Thank you for clarifying the WSDL url. Unfortunately I'm still getting the socket connect timeout error. I checked
http://10.0.0.184:8180/axis2/services/ChemicalTermsWS?wsdl
in my browser and got a connection timed out error. Pining the remote host does not receive a response. Maybe the server is not running?
Thanks
Ben
User c1ce6b3d19
14-09-2009 19:36:18
Ben,
Sorry, I misunderstood the context of your question, so let me ask a question.
Have you downloaded and installed your own JChem Web Services server?
You can do that here --> http://www.chemaxon.com/webservices/download.html
Once you have your own server running you can change the <server_host> with your own server name and port, perhaps "localhost:8180".
If you need help with the setup of the server --> http://www.chemaxon.com/webservices/adminGuide.html
Otherwise, how would you like to use web services?
Jonathan Lee
User bf27213fcf
14-09-2009 20:37:30
Hi John,
I'm actually just trying to write a simple python script to take simles codes from an excel file and use MarvinSketch to estimate a octanol-water partition coefficient then paste that value back into excel. I'm a complete novice at programming/python but the example on the web page below looked promising for what I'm trying to do.
http://www.chemaxon.com/webservices/python/index.html
I think I misunderstood what the web services are. Is there just a chemicalterms module I could download?
Ben
User c1ce6b3d19
14-09-2009 21:19:04
Ben,
I think you are working on a Windows machine, so there is a very easy to use installer on the download page from the previous post. (If not, you can just download and unzip the .zip file)
Just double click on the .msi installer file after it is downloaded. The server can be started from the start menu (Start >> All Programs >> JChem Web Services >> startup.bat)
then type
C:\Python26\Scripts\wsdl2py --complexType http://localhost:8180/axis2/services/ChemicalTermsWS?wsdl
The resulting files must be put in the python path or in your current working directory.
The following example script files should also be in your python path or your current working directory.
C:\Program Files\ChemAxon\JChem Web services\examples\python\ChemTermsScript.py
C:\Program Files\ChemAxon\JChem Web services\examples\python\toolbox.py
(In the beginning, you could use the C:\Program Files\ChemAxon\JChem Web services\examples\python directory to run your scripts.)
Then for help on the script you can run
ChemTermsScript.py -h
And to run a logP calculation on a smiles string
ChemTermsScript.py -t <my_smiles_string> -e logP
Let us know how it goes,
Jon
User bf27213fcf
16-09-2009 22:12:01
Hi,
I thought I would post my python code since I like it when other people do. Its nothing special.
from win32com.client import Dispatch
from subprocess import Popen, PIPE
Popen(['C:\Octanol-WaterPartition\PartitionTable.xlsx'], shell=True)
xlApp = Dispatch("Excel.Application")
i=2
while i<589:
smiles = xlApp.ActiveSheet.Cells(i,7).value
output = Popen(['ChemTermsScript.py -t' + smiles + ' -e logP'], stdout=PIPE, shell=True).stdout
ParCoef=output.read()
xlApp.ActiveSheet.Cells(i,8).value=ParCoef
i=i+1
Ben
User c1ce6b3d19
21-09-2009 19:53:58
I believe the following helps to run the example better:
1. Confirm that the ChemTermScript python is setup and running.
http://www.chemaxon.com/webservices/python/index.html#setup
2. Download Python for Windows extensions, if you don't already have it.
http://sourceforge.net/projects/pywin32/
3. Edit the script appropriately, inserting your file name and the specific rows and columns. Also ParCoef.strip() may help to remove any nasty whitespaces.
4. Make sure your Excel file with a smiles column is open and the sheet is active inside of Excel.
Jonathan Lee