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
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}
Accept: application/json

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

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

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

Invoke a most similars search of a query molecule.

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
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}/distribution

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 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
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.

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
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}/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
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
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.

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
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}/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
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
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
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
Accept: application/json

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

                
{
  "choices" : [ {
    "command" : "...",
    "description" : "...",
    "defaultvalues" : "...",
    "parameters" : [ {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "ENUM",
      "enumeration" : [ { }, { } ]
    }, {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "INTEGER",
      "enumeration" : [ { }, { } ]
    } ]
  }, {
    "command" : "...",
    "description" : "...",
    "defaultvalues" : "...",
    "parameters" : [ {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "BOOLEAN",
      "enumeration" : [ { }, { } ]
    }, {
      "name" : "...",
      "description" : "...",
      "value" : "...",
      "type" : "ENUM",
      "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
Accept: application/json

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

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