JSON formatting for pka calculator

User 762d73597f

16-12-2013 21:22:01

Can someone provide guidance for creating JSON query input for REST webservices that run the pKa calculator?  I want to generate pKa values without pulling them from the database (as in this example;chemaxon.com/#postdetails).   This example shows pKa values (https://restdemo.chemaxon.com/#pka) but is pulling the chemical from the database and then running the calculator and providing way too much detail.  Help would be appreciated.

ChemAxon e07e2a364b

16-12-2013 21:46:46

Do you want to submit the molecule and get back the array of the pKa values? In this case the molecule(s) can be posted to the "/rest-v0/util/detail" url on your WS server in the following JSON message:


"structures":


[{"structure": "aspirin"}],


"display":  {"include": ["structureData"],


        "additionalFields": {"pka": "chemicalTerms(pka)"},


        "parameters": {"structureData": "smiles"}


}


}


 


See more info here: https://restdemo.chemaxon.com/#postdetails and  href="https://restdemo.chemaxon.com/#pka" style="font-family: arial, verdana, sans-serif; font-size: 12px;">https://restdemo.chemaxon.com/#pka

User 762d73597f

16-12-2013 22:30:06










gguta wrote:

Do you want to submit the molecule and get back the array of the pKa values? In this case the molecule(s) can be posted to the "/rest-v0/util/detail" url on your WS server in the following JSON message:


"structures":


[{"structure": "aspirin"}],


"display":  {"include": ["structureData"],


        "additionalFields": {"pka": "chemicalTerms(pka)"},


        "parameters": {"structureData": "smiles"}


}


}


 


Appreciate the help qquta, but you must be running something other than the server examples found here: https://restdemo.chemaxon.com/#pka.  The example you provided does not run in either Chrome, IE or Firefox; I get a JSON format exception.  Operator error on my part?  Should I be able to copy/paste your JSON expression in the example and have it run when submitted?  Or am I supposed to decorate/edit it in some fashion?


See more info here: https://restdemo.chemaxon.com/#postdetails and  href="https://restdemo.chemaxon.com/#pka" style="font-family: arial, verdana, sans-serif; font-size: 12px;">https://restdemo.chemaxon.com/#pka


ChemAxon e07e2a364b

17-12-2013 06:41:59

Hmmm, strange. I re-tested the example I wrote by overwriting the first "POST" example on the demo page and works fine for me. Copy the URL and the content from "{" to "}" into the URL field and POST request box, respectively. It should work, if not please let me know!