DescriptorsResource Resource

Molecular desciptors JAX-RS resource.

GET /descriptors

Description of available molecular descriptor data.

Response Body
media type data type description
application/json DescriptorsInfo (JSON) Molecular descriptors available

Example

Request
GET /descriptors
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "descriptors" : [ {
    "size" : 12345,
    "time" : 12345,
    "description" : "...",
    "context" : "...",
    "moleculeseturl" : "...",
    "url" : "...",
    "name" : "..."
  }, {
    "size" : 12345,
    "time" : 12345,
    "description" : "...",
    "context" : "...",
    "moleculeseturl" : "...",
    "url" : "...",
    "name" : "..."
  } ]
}
                
              

GET /descriptors/{desc}

Get info of descriptor data.

Request Parameters
name type description
desc path Descriptor set name
Response Body
media type data type description
application/json DescriptorInfo (JSON) Descriptor info

Example

Request
GET /descriptors/{desc}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "size" : 12345,
  "time" : 12345,
  "description" : "...",
  "context" : "...",
  "moleculeseturl" : "...",
  "url" : "...",
  "name" : "..."
}
                
              

GET /descriptors/{desc}/distribution

Calculate dissimilarity distribution for a query molecule. This endpoint expects parameters as URL encoded query parameters.

Request Parameters
name type description default constraints
desc path Descriptor set name.    
bins query Bin count of histogram. 100 int
h query Highest limit of histogram. 1 double
l query Lowest limit of histogram. 0 double
metric query Metric to use. When not specified default metric will be used.  
query query Query molecule in SMILES format.    
Response Body
media type data type description
application/json DissimilarityDistributionResult (JSON) Dissimilarity distribution result.

Example

Request
GET /descriptors/{desc}/distribution
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "histogram" : {
    "l" : 12345.0,
    "h" : 12345.0,
    "binwidth" : 12345.0,
    "bincount" : 12345,
    "lowcount" : 12345,
    "highcount" : 12345,
    "totalcount" : 12345,
    "bins" : [ 12345, 12345 ],
    "maxBinValue" : 12345
  }
}
                
              

POST /descriptors/{desc}/distribution

Calculate dissimilarity distributon for a query molecule. This endpoint expects request parameters in a application/x-www-form-urlencoded format.

Request Parameters
name type description default constraints
bins form Bin count of histogram. 100 int
h form Highest limit of histogram. 1 double
l form Lowest limit of histogram. 0 double
metric form Metric to use. When not specified default metric will be used.  
query form Query molecule in SMILES format.    
desc path Descriptor set name.    
Response Body
media type data type description
application/json DissimilarityDistributionResult (JSON) Dissimilarity distribution result.

Example

Request
POST /descriptors/{desc}/distribution
Content-Type: application/x-www-form-urlencoded
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "histogram" : {
    "l" : 12345.0,
    "h" : 12345.0,
    "binwidth" : 12345.0,
    "bincount" : 12345,
    "lowcount" : 12345,
    "highcount" : 12345,
    "totalcount" : 12345,
    "bins" : [ 12345, 12345 ],
    "maxBinValue" : 12345
  }
}
                
              

POST /descriptors/{desc}/distribution

Calculate dissimilarity distributon for a query molecule. This endpoint expects parameters as a JSON parameter object sent as application/json.

Request Parameters
name type description
desc path Descriptor set name.
Request Body
media type data type description
application/json DissimilarityDistributionRequest (JSON) Request parameters object
Response Body
media type data type description
application/json DissimilarityDistributionResult (JSON) Dissimilarity distribution result.

Example

Request
POST /descriptors/{desc}/distribution
Content-Type: application/json
Accept: application/json

                
{
  "metric" : "...",
  "query" : "...",
  "l" : 12345.0,
  "h" : 12345.0,
  "bins" : 12345
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "histogram" : {
    "l" : 12345.0,
    "h" : 12345.0,
    "binwidth" : 12345.0,
    "bincount" : 12345,
    "lowcount" : 12345,
    "highcount" : 12345,
    "totalcount" : 12345,
    "bins" : [ 12345, 12345 ],
    "maxBinValue" : 12345
  }
}
                
              

POST /descriptors/{desc}/distribution-async

Launch asynchronous dissimilarity distribution calculation.

Request Parameters
name type description default constraints
desc path Descriptor set name.    
sync-result-timeout-ms query Wait specified time (in milliseconds) for completion before returning. When the launced task completes during this time the results are immediately returned. When value is 0 (this is the default when this parameter is not specified) the server immediately returns. Note that this is a query parameter (for example use ..../distribution-async?sync-result-timeout-ms=150). 0 long
Request Body
media type data type description
application/json DissimilarityDistributionRequest (JSON) Request parameters object
Response Body
media type data type description
application/json AsyncCallDtoOfDissimilarityDistributionResult (JSON) Launched async task descriptor. Content AsyncCallDto#result is DissimilarityDistributionResult.

Example

Request
POST /descriptors/{desc}/distribution-async
Content-Type: application/json
Accept: application/json

                
{
  "metric" : "...",
  "query" : "...",
  "l" : 12345.0,
  "h" : 12345.0,
  "bins" : 12345
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "partialResult" : {
    "searchtime" : 12345,
    "targetcount" : 12345,
    "histogram" : {
      "l" : 12345.0,
      "h" : 12345.0,
      "binwidth" : 12345.0,
      "bincount" : 12345,
      "lowcount" : 12345,
      "highcount" : 12345,
      "totalcount" : 12345,
      "bins" : [ 12345, 12345 ],
      "maxBinValue" : 12345
    }
  },
  "id" : "...",
  "task" : {
    "id" : "...",
    "name" : "...",
    "totalWork" : 12345,
    "workUnit" : "...",
    "worked" : 12345,
    "done" : true,
    "cancelled" : true,
    "startTimeMs" : 12345,
    "runningDurationMs" : 12345
  },
  "result" : {
    "searchtime" : 12345,
    "targetcount" : 12345,
    "histogram" : {
      "l" : 12345.0,
      "h" : 12345.0,
      "binwidth" : 12345.0,
      "bincount" : 12345,
      "lowcount" : 12345,
      "highcount" : 12345,
      "totalcount" : 12345,
      "bins" : [ 12345, 12345 ],
      "maxBinValue" : 12345
    }
  },
  "error" : {
    "statusCode" : 12345,
    "statusReasonPhrase" : "...",
    "statusClass" : "...",
    "message" : "...",
    "exceptionMessage" : "...",
    "exceptionStackTrace" : "..."
  }
}
                
              

GET /descriptors/{desc}/distribution-by-descriptor

Calculate dissimilarity distribution for a query molecule.

Request Parameters
name type description default constraints
desc path Descriptor set name.    
bins query Bin count of histogram. 100 int
h query Highest limit of histogram. 1 double
l query Lowest limit of histogram. 0 double
metric query Metric to use. When not specified default metric will be used.  
query-descriptor query Query descriptor in String serialized format. The underlying context's OverlapAnalysisContext#getDescriptorGenerator() method DescriptorGenerator#fromString(java.lang.String) will be used to parse the query descriptor.    
Response Body
media type data type description
application/json DissimilarityDistributionResult (JSON) Dissimilarity distribution result.

Example

Request
GET /descriptors/{desc}/distribution-by-descriptor
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "histogram" : {
    "l" : 12345.0,
    "h" : 12345.0,
    "binwidth" : 12345.0,
    "bincount" : 12345,
    "lowcount" : 12345,
    "highcount" : 12345,
    "totalcount" : 12345,
    "bins" : [ 12345, 12345 ],
    "maxBinValue" : 12345
  }
}
                
              

POST /descriptors/{desc}/distribution-by-descriptor

Calculate dissimilarity distribution for a query molecule.

Request Parameters
name type description default constraints
bins form Bin count of histogram. 100 int
h form Highest limit of histogram. 1 double
l form Lowest limit of histogram. 0 double
metric form Metric to use. When not specified default metric will be used.  
query-descriptor form Query descriptor in String serialized format. The underlying context's OverlapAnalysisContext#getDescriptorGenerator() method DescriptorGenerator#fromString(java.lang.String) will be used to parse the query descriptor.    
desc path Descriptor set name.    
Response Body
media type data type description
application/json DissimilarityDistributionResult (JSON) Dissimilarity distribution result.

Example

Request
POST /descriptors/{desc}/distribution-by-descriptor
Content-Type: application/x-www-form-urlencoded
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "histogram" : {
    "l" : 12345.0,
    "h" : 12345.0,
    "binwidth" : 12345.0,
    "bincount" : 12345,
    "lowcount" : 12345,
    "highcount" : 12345,
    "totalcount" : 12345,
    "bins" : [ 12345, 12345 ],
    "maxBinValue" : 12345
  }
}
                
              

GET /descriptors/{desc}/find-most-similars

Invoke a most similars search of a query molecule. This endpoint expects parameters as URL encoded query parameters.

Request Parameters
name type description default constraints
desc path Descriptor set name    
base64img query true when Base64 encoded target images are requested false boolean
count query Maximal number of most similar tagets to find; not recommended; use maxCount 1 int
h query Height of the target images in pixel 100 int
max-count query Maximal number of most similar tagets to find 1 int
max-dissimilarity query Maximal dissimilarity to return; inclusive. When no target passes the dissimilarity limit a WuiNotFoundException is throw resulting in a "Not found (404)" response status. 1.7976931348623157E308 double
metric query Metric to use. When not specified default metric will be used.  
query query Query molecule in SMILES format.    
w query Width of the target images in pixel 100 int
Response Body
media type data type description
application/json MostSimilarsResult (JSON) Most similars result. If both count and maxCount specified the larger will be considered.

Example

Request
GET /descriptors/{desc}/find-most-similars
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "query" : "...",
  "querysmi" : "...",
  "targets" : [ {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  }, {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  } ]
}
                
              

POST /descriptors/{desc}/find-most-similars

Invoke a most similars search of a query molecule. This endpoint expects request parameters in a application/x-www-form-urlencoded format.

Request Parameters
name type description default constraints
base64img form true when Base64 encoded target images are requested false boolean
count form Maximal number of most similar tagets to find; not recommended; use maxCount 1 int
h form Height of the target images in pixel 100 int
max-count form Maximal number of most similar tagets to find 1 int
max-dissimilarity form Maximal dissimilarity to return; inclusive 1.7976931348623157E308 double
metric form Metric to use. When not specified default metric will be used.  
query form Query molecule in UTF-8 encoded format    
w form Width of the target images in pixel 100 int
desc path Descriptor set name    
Response Body
media type data type description
application/json MostSimilarsResult (JSON) Most similars result

Example

Request
POST /descriptors/{desc}/find-most-similars
Content-Type: application/x-www-form-urlencoded
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "query" : "...",
  "querysmi" : "...",
  "targets" : [ {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  }, {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  } ]
}
                
              

POST /descriptors/{desc}/find-most-similars

Invoke a most similars search of a query molecule. This endpoint expects parameters as a JSON parameter object sent as application/json.

Request Parameters
name type description
desc path
Request Body
media type data type description
application/json MostSimilarsRequest (JSON) Request parameters object
Response Body
media type data type description
application/json MostSimilarsResult (JSON) Most similars result. If both count and maxCount specified the larger will be considered.

Example

Request
POST /descriptors/{desc}/find-most-similars
Content-Type: application/json
Accept: application/json

                
{
  "metric" : "...",
  "query" : "...",
  "w" : 12345,
  "h" : 12345,
  "count" : 12345,
  "maxCount" : 12345,
  "maxDissimilarity" : 12345.0,
  "base64img" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "query" : "...",
  "querysmi" : "...",
  "targets" : [ {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  }, {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  } ]
}
                
              

POST /descriptors/{desc}/find-most-similars-async

Launch asynchronous similarity search.

Request Parameters
name type description default constraints
desc path Descriptor set name    
sync-result-timeout-ms query Wait specified time (in milliseconds) for completion before returning. When the launced task completes during this time the results are immediately returned. When value is 0 (this is the default when this parameter is not specified) the server immediately returns. Note that this is a query parameter (for example use ..../distribution-async?find-most-similars-async=150). 0 long
Request Body
media type data type description
application/json MostSimilarsRequest (JSON) Request parameters object
Response Body
media type data type description
application/json AsyncCallDtoOfMostSimilarsResult (JSON) Launched async task descriptor. Content AsyncCallDto#result is MostSimilarsResult.

Example

Request
POST /descriptors/{desc}/find-most-similars-async
Content-Type: application/json
Accept: application/json

                
{
  "metric" : "...",
  "query" : "...",
  "w" : 12345,
  "h" : 12345,
  "count" : 12345,
  "maxCount" : 12345,
  "maxDissimilarity" : 12345.0,
  "base64img" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "task" : {
    "id" : "...",
    "name" : "...",
    "totalWork" : 12345,
    "workUnit" : "...",
    "worked" : 12345,
    "done" : true,
    "cancelled" : true,
    "startTimeMs" : 12345,
    "runningDurationMs" : 12345
  },
  "error" : {
    "statusCode" : 12345,
    "statusReasonPhrase" : "...",
    "statusClass" : "...",
    "message" : "...",
    "exceptionMessage" : "...",
    "exceptionStackTrace" : "..."
  },
  "partialResult" : {
    "searchtime" : 12345,
    "targetcount" : 12345,
    "query" : "...",
    "querysmi" : "...",
    "targets" : [ {
      "dissimilarity" : 12345.0,
      "targetindex" : 12345,
      "targetid" : "...",
      "targetmolurl" : "...",
      "targetimageurl" : "...",
      "base64img" : "..."
    }, {
      "dissimilarity" : 12345.0,
      "targetindex" : 12345,
      "targetid" : "...",
      "targetmolurl" : "...",
      "targetimageurl" : "...",
      "base64img" : "..."
    } ]
  },
  "id" : "...",
  "result" : {
    "searchtime" : 12345,
    "targetcount" : 12345,
    "query" : "...",
    "querysmi" : "...",
    "targets" : [ {
      "dissimilarity" : 12345.0,
      "targetindex" : 12345,
      "targetid" : "...",
      "targetmolurl" : "...",
      "targetimageurl" : "...",
      "base64img" : "..."
    }, {
      "dissimilarity" : 12345.0,
      "targetindex" : 12345,
      "targetid" : "...",
      "targetmolurl" : "...",
      "targetimageurl" : "...",
      "base64img" : "..."
    } ]
  }
}
                
              

GET /descriptors/{desc}/find-most-similars-by-descriptor

Invoke a most similars search of a query descriptor.

Request Parameters
name type description default constraints
desc path Descriptor set name    
base64img query true when Base64 encoded target images are requested false boolean
h query Height of the target images in pixel 100 int
max-count query Maximal number of most similar tagets to find 1 int
max-dissimilarity query Maximal dissimilarity to return; inclusive. When no target passes the dissimilarity limit a WuiNotFoundException is throw resulting in a "Not found (404)" response status. 1.7976931348623157E308 double
metric query Metric to use. When not specified default metric will be used.  
query-descriptor query Query descriptor in String serialized format. The underlying context's OverlapAnalysisContext#getDescriptorGenerator() method DescriptorGenerator#fromString(java.lang.String) will be used to parse the query descriptor.    
w query Width of the target images in pixel 100 int
Response Body
media type data type description
application/json MostSimilarsResult (JSON) Most similars result. If both count and maxCount specified the larger will be considered.

Example

Request
GET /descriptors/{desc}/find-most-similars-by-descriptor
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "query" : "...",
  "querysmi" : "...",
  "targets" : [ {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  }, {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  } ]
}
                
              

POST /descriptors/{desc}/find-most-similars-by-descriptor

Invoke a most similars search of a query descriptor.

Request Parameters
name type description default constraints
base64img form true when Base64 encoded target images are requested false boolean
h form Height of the target images in pixel 100 int
max-count form Maximal number of most similar tagets to find 1 int
max-dissimilarity form Maximal dissimilarity to return; inclusive. When no target passes the dissimilarity limit a WuiNotFoundException is throw resulting in a "Not found (404)" response status. 1.7976931348623157E308 double
metric form Metric to use. When not specified default metric will be used.  
query-descriptor form Query descriptor in String serialized format. The underlying context's OverlapAnalysisContext#getDescriptorGenerator() method DescriptorGenerator#fromString(java.lang.String) will be used to parse the query descriptor.    
w form Width of the target images in pixel 100 int
desc path Descriptor set name    
Response Body
media type data type description
application/json MostSimilarsResult (JSON) Most similars result. If both count and maxCount specified the larger will be considered.

Example

Request
POST /descriptors/{desc}/find-most-similars-by-descriptor
Content-Type: application/x-www-form-urlencoded
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "query" : "...",
  "querysmi" : "...",
  "targets" : [ {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  }, {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  } ]
}
                
              

GET /descriptors/{desc}/find-most-similars-by-id

Invoke a most similars search of a molecule identified by its ID.

Request Parameters
name type description default constraints
desc path Descriptor set name    
base64img query true when Base64 encoded target images are requested false boolean
h query Height of the target images in pixel 100 int
max-count query Maximal number of most similar tagets to find 1 int
max-dissimilarity query Maximal dissimilarity to return; inclusive. When no target passes the dissimilarity limit a WuiNotFoundException is throw resulting in a "Not found (404)" response status. 1.7976931348623157E308 double
metric query Metric to use. When not specified default metric will be used.  
query-id query ID of the query structure in the associated molecule storage. If the given ID is not found or the current descriptor storage does not contain descriptor for the given structure a WuiNotFoundException resulting in "Not found (404)" is thrown.    
w query Width of the target images in pixel 100 int
Response Body
media type data type description
application/json MostSimilarsResult (JSON) Most similars result. If both count and maxCount specified the larger will be considered.

Example

Request
GET /descriptors/{desc}/find-most-similars-by-id
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "searchtime" : 12345,
  "targetcount" : 12345,
  "query" : "...",
  "querysmi" : "...",
  "targets" : [ {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  }, {
    "dissimilarity" : 12345.0,
    "targetindex" : 12345,
    "targetid" : "...",
    "targetmolurl" : "...",
    "targetimageurl" : "...",
    "base64img" : "..."
  } ]
}
                
              

GET /descriptors/{desc}/get-available-metrics

List of available metrics. The returned object description contains description to expose available metric parameters on a UI and to compose valid parameter string.

Request Parameters
name type description
desc path Descriptor set name
Response Body
media type data type description
application/json LinenoteDto (JSON) Description of available options

Example

Request
GET /descriptors/{desc}/get-available-metrics
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "choices" : [ {
    "command" : "...",
    "description" : "...",
    "defaultvalues" : "...",
    "parameters" : [ {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "STRING",
      "enumeration" : [ { }, { } ]
    }, {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "DOUBLE",
      "enumeration" : [ { }, { } ]
    } ]
  }, {
    "command" : "...",
    "description" : "...",
    "defaultvalues" : "...",
    "parameters" : [ {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "BOOLEAN",
      "enumeration" : [ { }, { } ]
    }, {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "STRING",
      "enumeration" : [ { }, { } ]
    } ]
  } ]
}
                
              

GET /descriptors/{desc}/get-sizeinfo

Experimental endpoint to estimate allocated size. Please note that this endpoint is under construction, use with caution: execution might fail and execution might have significant memory/cpu impact. The availability/functionality of this endpoint might change in any of the subsequent releases.

Request Parameters
name type description default constraints
desc path Descriptor set name.    
dc query Duplicate check on the large storages. false boolean
method query Size info method to use.   "CALCULATED" or "JAVAAGENT"
Response Body
media type data type description
application/json SizeInfoDto (JSON) Size info description

Example

Request
GET /descriptors/{desc}/get-sizeinfo
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "size" : 12345,
  "details" : [ {
    "size" : 12345,
    "name" : "..."
  }, {
    "size" : 12345,
    "name" : "..."
  } ]
}