Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

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 are cached and will be very fast for repetitive calls.

Way 1: "Request until done"

To post predict a prediction task for a molecule, run the following request (as example):

https://ochem.eu/modelservice/getPrediction.do?modelId=YOUR_1&mol=c1ccccc1

It will predict mutagenicity of benzene (c1ccccc1 is MOLECULE) using the AMES model https://ochem.eu/model/1 (1 is MODEL_ID)

In general your request should have form https://ochem.eu/modelservice/getPrediction.do?modelId=MODEL_ID&mol=YOUR_MOLECULEModel id MOLECULE   where MODEL_ID is the public model identifier or "model identity" (GUID) provided by OCHEM administration. If you plan to use predictions systematically, it is recommended to request a model identity (GUID).The molecule and MOLECULE is the analyzed molecule. 

The MOLECULE can be in SMILES or SD format. For both the formats, multiple molecules can be posted using $$$$ separator.
It is much more efficient to predict molecules in batches rather than posting separate tasks for each molecule.

...

Code Block
languagejavascript
{
        "taskId": "0",

		// Array of predictions (for each input molecule)
        "predictions": [{
            "moleculeID": "1002136505",
            
            // Array of predictions for a given molecule. Normally, contains only one prediction. 
            // Can contain multiple predictions for multi-models
            "predictions": [{
                "unit": "-log(mmol/L)",
                // Name of the predicted class for classification models. Same as "value" for regression models.                
                "predictedValueString": "2.713999986648559671", 
                "value": "2.713999986648559671", // Prediction value (round it as you find necessary)
                "dm": "0.861100018024444686", // The "distance to model" used for the accuracy estimation
				"insideAD" : true, // is this molecule inside the model's applicability domain?
 				"property": "log(IGC50-1)", // The predicted property
                "accuracy": "0.706520302834443670", // The prediction accuracy (RMSE)
                "realValue": "0.0"
            }],
            "depictionID": "1000651576"
        }],
        "metaserverTaskId": "0",
        "status": "success",
        "modelDescriptionUrl": "http://ochem.eu/model/3"
}

...

Code Block
{
        "taskId": "0",

		// Array of predictions (for each input molecule)
        "predictions": [{
            "moleculeID": "1002136505",
            
            // Array of predictions for a given molecule. Normally, contains only one prediction. 
            // Can contain multiple predictions for multi-models
            "predictions": [{
                "unit": "-log(mmol/L)",
                // Name of the predicted class for classification models. Same as "value" for regression models.                
                "predictedValueString": "2.713999986648559671", 
                "value": "2.713999986648559671", // Prediction value (round it as you find necessary)
                "dm": "0.861100018024444686", // The "distance to model" used for the accuracy estimation
                "property": "log(IGC50-1)", // The predicted property
                "accuracy": "0.706520302834443670", // The prediction accuracy (RMSE)
                "realValue": "0.0"
            }],
            "depictionID": "1000651576"
        }],
        "metaserverTaskId": "0",
        "status": "success",
        "modelDescriptionUrl": "http://ochem.eu/model/3"
}