You can run predictions on OCHEM using simple REST-like web services.
Since a prediction is not an instantaneous task and can take several seconds to minutes, the prediction is performed asynchroniously, that is in two steps:
To post a task, run the following request:
https://ochem.eu/modelservice/postModel.do?modelId=YOUR_MODEL_ID&mol=YOUR_MOLECULE
The resulting JSON will look like:
{
"web-root": "http://localhost:8080/",
"modelResponse": {
"taskId": "1000042989",
"metaserverTaskId": "-1",
"status": "success"
}
} |
{
"web-root": "http://localhost:8080/",
"modelResponse": {
"taskId": "0",
"predictions": {
"moleculeID": "4492",
"predictions": {
"unit": "-log(mmol/L)",
"predictedValueString": "0.7695",
"value": "0.7695",
"dm": "0.2294",
"property": "log(IGC50-1)",
"accuracy": "0.4313671566856475",
"realValue": "0.0"
},
"depictionID": "1000618460"
},
"metaserverTaskId": "0",
"status": "success",
"modelDescriptionUrl": "http://ochem.eu/model/3"
}
} |