Sampling Structures

Speed up Hit Identification with rapid molecule sampling

Efficiently expand into chemical space by sampling from generative Deep-Learning models around an underlying distribution of molecules. With the ability to easily generate hundreds of thousands of unique structures in minutes, building a diverse library of molecular structures reduces the time and cost associated with traditional first Hit Identification methods - additionally see our other solutions to further improve Drug Discovery pipeline stages.

Considerations:

  • Sampling speed is limited by API request rate limits and data transfer bottlenecks. For larger sampling requirements, contact us to discuss custom solutions.

  • Structures are generated as unique SMILES within a single request, however duplicate structures may be generated across multiple requests. See individual model metadata for more information on uniqueness rates.

See here for more information on our Generative AI capability.

Experimental

List samples

get

Retrieve a list of samples. Key-based pagination is supported. See query parameters for more details on how to retrieve the next or previous page of results.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired

OAuth2 authentication.

Authenticate using the Pending AI authorization server through an implicit OAuth2 flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.

Authorization URL:
AuthorizationstringRequired

Bearer token authentication.

Provide a valid Pending AI authentication token. Generating tokens can be done manually through the Pending AI CLI. Ensure you have an existing account or register now.

pendingai auth login
pendingai auth token
Query parameters
limitinteger · min: 1 · max: 100Optional

Limit the number of resources returned within the data field of the paged response. The field may contain fewer items than the specified limit when there are not enough items to return.

Default: 5Example: 5
next-pageany ofOptional

A key used to navigate pagination results. The given value must match an id for the specific resource object type. If provided, the paged response will contain resources from the next 'page', or those that were submitted before the matched resource (reverse chronological order).

Example: id_32RD0TWLolsAdFKufk3p4eE1ttK
string · min: 1 · max: 255OptionalPattern: ^\w+$
or
nullOptional
prev-pageany ofOptional

A key used to navigate pagination results. The given value must match an id for the specific resource object type. If provided, the paged response will contain resources from the previous 'page', or those that were submitted after the matched resource (reverse chronological order).

Example: id_32RD0TWLolsAdFKufk3p4eE1ttK
string · min: 1 · max: 255OptionalPattern: ^\w+$
or
nullOptional
Responses
200

Returns a list of samples.

application/json
get
/samples
GET /generator/v1/samples HTTP/1.1
Host: api.pending.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "created_at": "2023-10-05T14:48:00.000Z",
      "id": "id_32RD0TWLolsAdFKufk3p4eE1ttK",
      "model_id": "mod_32RD0TWLolsAdFKufk3p4eE1ttK",
      "num_smiles": "500",
      "object": "object"
    }
  ],
  "has_more": true,
  "object": "list"
}
Experimental

Create a sample

post

Create a sample by generating molecules from a specific model. When no model is provided, any will be used that is readily available.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired

OAuth2 authentication.

Authenticate using the Pending AI authorization server through an implicit OAuth2 flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.

Authorization URL:
AuthorizationstringRequired

Bearer token authentication.

Provide a valid Pending AI authentication token. Generating tokens can be done manually through the Pending AI CLI. Ensure you have an existing account or register now.

pendingai auth login
pendingai auth token
Header parameters
accept-encodingstring · enumOptional

An optional header to be provided when accepting Base64 compressed response content. Providing the header value gzip yields gzipped Base64-encoded content for the response body.

Default: *Example: gzipPossible values:
Body

Request data for creating a new sample.

model_idany ofOptional

Optional id belonging to a model to use for generating the sample. If no model is provided, any will be used that is readily available.

stringOptionalPattern: ^\w+$
or
nullOptional
sizeinteger · min: 1 · max: 10000Required

The number of sampled molecules to generate for the request. Must be a positive integer.

Example: 500
Responses
200

Returns the sample.

application/json
post
/samples
POST /generator/v1/samples HTTP/1.1
Host: api.pending.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 32

{
  "model_id": "text",
  "size": "500"
}
{
  "created_at": "2000-01-01T00:00:00.000Z",
  "id": "id_32RD0TWLolsAdFKufk3p4eE1ttK",
  "model_id": "mod_32RD0TWLolsAdFKufk3p4eE1ttK",
  "object": "object",
  "smiles": [
    "C1=CC=CC=C1",
    "C1CCCCC1"
  ]
}
Experimental

Retrieve a sample

get

Retrieves a sample and all generated structures. This is designed to allow retrieving any samples previously generated.

Required scopes
This endpoint requires the following scopes:
Authorizations
OAuth2implicitRequired

OAuth2 authentication.

Authenticate using the Pending AI authorization server through an implicit OAuth2 flow. You will be redirected to a Pending AI login page to authenticate and authorize access to your account. After authorization, you will be redirected back to the original application with an access token. Ensure that the application is registered with Pending AI and/or that the correct redirect URI is configured. Contact Pending AI support for more information if the application is not registered.

Authorization URL:
AuthorizationstringRequired

Bearer token authentication.

Provide a valid Pending AI authentication token. Generating tokens can be done manually through the Pending AI CLI. Ensure you have an existing account or register now.

pendingai auth login
pendingai auth token
Path parameters
sample_idstring · min: 1 · max: 255Required

A unique identifier for a sample resource.

Example: smp_32RD0TWLolsAdFKufk3p4eE1ttKPattern: ^\w+$
Header parameters
accept-encodingstring · enumOptional

An optional header to be provided when accepting Base64 compressed response content. Providing the header value gzip yields gzipped Base64-encoded content for the response body.

Default: *Example: gzipPossible values:
Responses
200

Returns the sample.

application/json
get
/samples/{sample_id}
GET /generator/v1/samples/{sample_id} HTTP/1.1
Host: api.pending.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "created_at": "2000-01-01T00:00:00.000Z",
  "id": "id_32RD0TWLolsAdFKufk3p4eE1ttK",
  "model_id": "mod_32RD0TWLolsAdFKufk3p4eE1ttK",
  "object": "object",
  "smiles": [
    "C1=CC=CC=C1",
    "C1CCCCC1"
  ]
}

Was this helpful?