Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

General considerations

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:

  1. Start a prediction task and get a task ID
  2. Fetch your prediction task using the task ID from step (1). Keep fetching until the task is ready
Icon

Some OCHEM models (e.g. models aggregated using Bagging method), require significant amount of calculations.
Thus, prediction of even a single molecule can take a minute. However, predictions of the models are cached and will be simultaneous for repetitive calls.

Service URLs and formats

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:

Given that the result.modelResponse.status is "success", the task ID used for retrieving the predictions is result.modelResponse.taskId


To fetch the model, use the following request:

http://ochem.eu/modelservice/fetchModel.do?taskId=YOUR_TASK_ID

If the task is still running, the resulting JSON will look like:

When the task is ready, the JSON will look like:

 

 

 

 

 

  • No labels