Descriptors
albert.resources.descriptors
Attributes:
| Name | Type | Description |
|---|---|---|
DescriptorNumber |
|
DescriptorNumber
DescriptorNumber = Annotated[
NumericDescriptorValue
| NumericListDescriptorValue
| IntegerDescriptorValue
| IntegerListDescriptorValue
| BooleanDescriptorValue
| StringDescriptorValue,
Field(discriminator="type"),
]
DescriptorFamily
Feature family a descriptor belongs to.
A family is a way to ask for a group of descriptors by what they measure.
fingerprints_ml is 2214 values per molecule; prefer one fingerprint by
name. shape_3d embeds a 3D conformer, which is slower and can fail.
Attributes:
| Name | Type | Description |
|---|---|---|
PHYSICOCHEMICAL |
|
|
COMPOSITION |
|
|
FUNCTIONAL_GROUPS |
|
|
FINGERPRINTS_ML |
|
|
SHAPE_3D |
|
NumericDescriptorValue
Bases: BaseAlbertModel
One numeric descriptor result.
Show JSON schema:
{
"description": "One numeric descriptor result.",
"properties": {
"type": {
"const": "numeric",
"default": "numeric",
"description": "Value kind. Always ``numeric``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The number, or null when the descriptor could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "NumericDescriptorValue",
"type": "object"
}
Fields:
NumericListDescriptorValue
Bases: BaseAlbertModel
A list of numeric descriptor results, such as a fingerprint.
Show JSON schema:
{
"description": "A list of numeric descriptor results, such as a fingerprint.",
"properties": {
"type": {
"const": "numeric_list",
"default": "numeric_list",
"description": "Value kind. Always ``numeric_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One number per bit or component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "NumericListDescriptorValue",
"type": "object"
}
Fields:
IntegerDescriptorValue
Bases: BaseAlbertModel
One integer descriptor result.
Show JSON schema:
{
"description": "One integer descriptor result.",
"properties": {
"type": {
"const": "integer",
"default": "integer",
"description": "Value kind. Always ``integer``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The integer, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "IntegerDescriptorValue",
"type": "object"
}
Fields:
IntegerListDescriptorValue
Bases: BaseAlbertModel
A list of integer descriptor results.
Show JSON schema:
{
"description": "A list of integer descriptor results.",
"properties": {
"type": {
"const": "integer_list",
"default": "integer_list",
"description": "Value kind. Always ``integer_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One integer per component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "IntegerListDescriptorValue",
"type": "object"
}
Fields:
BooleanDescriptorValue
Bases: BaseAlbertModel
One boolean descriptor result.
Show JSON schema:
{
"description": "One boolean descriptor result.",
"properties": {
"type": {
"const": "boolean",
"default": "boolean",
"description": "Value kind. Always ``boolean``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The flag, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "BooleanDescriptorValue",
"type": "object"
}
Fields:
StringDescriptorValue
Bases: BaseAlbertModel
One string descriptor result.
Show JSON schema:
{
"description": "One string descriptor result.",
"properties": {
"type": {
"const": "string",
"default": "string",
"description": "Value kind. Always ``string``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The text, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "StringDescriptorValue",
"type": "object"
}
Fields:
DescriptorInfo
Bases: BaseAlbertModel
Catalog entry for one molecular descriptor.
Show JSON schema:
{
"description": "Catalog entry for one molecular descriptor.",
"properties": {
"name": {
"description": "Registered descriptor name, used in ``calculate``.",
"title": "Name",
"type": "string"
},
"dimension": {
"description": "Number of values this descriptor returns for one molecule.",
"title": "Dimension",
"type": "integer"
},
"default": {
"type": "boolean",
"description": "Whether this descriptor is in the default calculate set.",
"title": "Default"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "What the descriptor measures.",
"title": "Description"
},
"families": {
"description": "Feature families this descriptor belongs to. Pass one to ``calculate``.",
"items": {
"type": "string"
},
"title": "Families",
"type": "array"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Unit shared by every value this descriptor returns.",
"title": "Unit"
},
"requires_3d": {
"default": false,
"description": "True when the descriptor embeds a 3D conformer. That is slower and can return null.",
"title": "Requires 3D",
"type": "boolean"
}
},
"required": [
"name",
"dimension",
"default",
"description"
],
"title": "DescriptorInfo",
"type": "object"
}
Fields:
-
name(str) -
dimension(int) -
default(bool) -
description(str | None) -
families(list[str]) -
unit(str | None) -
requires_3d(bool)
requires_3d
requires_3d: bool = False
True when the descriptor embeds a 3D conformer. That is slower and can return null.
DescriptorValue
Bases: BaseAlbertModel
One calculated descriptor for one molecule.
Show JSON schema:
{
"$defs": {
"BooleanDescriptorValue": {
"description": "One boolean descriptor result.",
"properties": {
"type": {
"const": "boolean",
"default": "boolean",
"description": "Value kind. Always ``boolean``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The flag, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "BooleanDescriptorValue",
"type": "object"
},
"IntegerDescriptorValue": {
"description": "One integer descriptor result.",
"properties": {
"type": {
"const": "integer",
"default": "integer",
"description": "Value kind. Always ``integer``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The integer, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "IntegerDescriptorValue",
"type": "object"
},
"IntegerListDescriptorValue": {
"description": "A list of integer descriptor results.",
"properties": {
"type": {
"const": "integer_list",
"default": "integer_list",
"description": "Value kind. Always ``integer_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One integer per component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "IntegerListDescriptorValue",
"type": "object"
},
"NumericDescriptorValue": {
"description": "One numeric descriptor result.",
"properties": {
"type": {
"const": "numeric",
"default": "numeric",
"description": "Value kind. Always ``numeric``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The number, or null when the descriptor could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "NumericDescriptorValue",
"type": "object"
},
"NumericListDescriptorValue": {
"description": "A list of numeric descriptor results, such as a fingerprint.",
"properties": {
"type": {
"const": "numeric_list",
"default": "numeric_list",
"description": "Value kind. Always ``numeric_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One number per bit or component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "NumericListDescriptorValue",
"type": "object"
},
"StringDescriptorValue": {
"description": "One string descriptor result.",
"properties": {
"type": {
"const": "string",
"default": "string",
"description": "Value kind. Always ``string``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The text, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "StringDescriptorValue",
"type": "object"
}
},
"description": "One calculated descriptor for one molecule.",
"properties": {
"name": {
"description": "Registered descriptor name.",
"title": "Name",
"type": "string"
},
"value": {
"description": "The calculated value. A null scalar or list component means it could not be calculated.",
"discriminator": {
"mapping": {
"boolean": "#/$defs/BooleanDescriptorValue",
"integer": "#/$defs/IntegerDescriptorValue",
"integer_list": "#/$defs/IntegerListDescriptorValue",
"numeric": "#/$defs/NumericDescriptorValue",
"numeric_list": "#/$defs/NumericListDescriptorValue",
"string": "#/$defs/StringDescriptorValue"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/NumericDescriptorValue"
},
{
"$ref": "#/$defs/NumericListDescriptorValue"
},
{
"$ref": "#/$defs/IntegerDescriptorValue"
},
{
"$ref": "#/$defs/IntegerListDescriptorValue"
},
{
"$ref": "#/$defs/BooleanDescriptorValue"
},
{
"$ref": "#/$defs/StringDescriptorValue"
}
],
"title": "Value"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Unit of ``value``, the same as the catalog entry for this descriptor.",
"title": "Unit"
}
},
"required": [
"name",
"value"
],
"title": "DescriptorValue",
"type": "object"
}
Fields:
value
value: DescriptorNumber
The calculated value. A null scalar or list component means it could not be calculated.
MoleculeDescriptors
Bases: BaseAlbertModel
Descriptor values for one molecule.
Show JSON schema:
{
"$defs": {
"BooleanDescriptorValue": {
"description": "One boolean descriptor result.",
"properties": {
"type": {
"const": "boolean",
"default": "boolean",
"description": "Value kind. Always ``boolean``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The flag, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "BooleanDescriptorValue",
"type": "object"
},
"DescriptorValue": {
"description": "One calculated descriptor for one molecule.",
"properties": {
"name": {
"description": "Registered descriptor name.",
"title": "Name",
"type": "string"
},
"value": {
"description": "The calculated value. A null scalar or list component means it could not be calculated.",
"discriminator": {
"mapping": {
"boolean": "#/$defs/BooleanDescriptorValue",
"integer": "#/$defs/IntegerDescriptorValue",
"integer_list": "#/$defs/IntegerListDescriptorValue",
"numeric": "#/$defs/NumericDescriptorValue",
"numeric_list": "#/$defs/NumericListDescriptorValue",
"string": "#/$defs/StringDescriptorValue"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/NumericDescriptorValue"
},
{
"$ref": "#/$defs/NumericListDescriptorValue"
},
{
"$ref": "#/$defs/IntegerDescriptorValue"
},
{
"$ref": "#/$defs/IntegerListDescriptorValue"
},
{
"$ref": "#/$defs/BooleanDescriptorValue"
},
{
"$ref": "#/$defs/StringDescriptorValue"
}
],
"title": "Value"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Unit of ``value``, the same as the catalog entry for this descriptor.",
"title": "Unit"
}
},
"required": [
"name",
"value"
],
"title": "DescriptorValue",
"type": "object"
},
"IntegerDescriptorValue": {
"description": "One integer descriptor result.",
"properties": {
"type": {
"const": "integer",
"default": "integer",
"description": "Value kind. Always ``integer``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The integer, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "IntegerDescriptorValue",
"type": "object"
},
"IntegerListDescriptorValue": {
"description": "A list of integer descriptor results.",
"properties": {
"type": {
"const": "integer_list",
"default": "integer_list",
"description": "Value kind. Always ``integer_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One integer per component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "IntegerListDescriptorValue",
"type": "object"
},
"NumericDescriptorValue": {
"description": "One numeric descriptor result.",
"properties": {
"type": {
"const": "numeric",
"default": "numeric",
"description": "Value kind. Always ``numeric``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The number, or null when the descriptor could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "NumericDescriptorValue",
"type": "object"
},
"NumericListDescriptorValue": {
"description": "A list of numeric descriptor results, such as a fingerprint.",
"properties": {
"type": {
"const": "numeric_list",
"default": "numeric_list",
"description": "Value kind. Always ``numeric_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One number per bit or component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "NumericListDescriptorValue",
"type": "object"
},
"StringDescriptorValue": {
"description": "One string descriptor result.",
"properties": {
"type": {
"const": "string",
"default": "string",
"description": "Value kind. Always ``string``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The text, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "StringDescriptorValue",
"type": "object"
}
},
"description": "Descriptor values for one molecule.",
"properties": {
"smiles": {
"description": "The submitted SMILES for this result.",
"title": "Smiles",
"type": "string"
},
"descriptors": {
"description": "One entry per calculated descriptor.",
"items": {
"$ref": "#/$defs/DescriptorValue"
},
"title": "Descriptors",
"type": "array"
}
},
"required": [
"smiles",
"descriptors"
],
"title": "MoleculeDescriptors",
"type": "object"
}
Fields:
DescriptorInfoList
Bases: BaseAlbertModel
Catalog response.
Show JSON schema:
{
"$defs": {
"DescriptorInfo": {
"description": "Catalog entry for one molecular descriptor.",
"properties": {
"name": {
"description": "Registered descriptor name, used in ``calculate``.",
"title": "Name",
"type": "string"
},
"dimension": {
"description": "Number of values this descriptor returns for one molecule.",
"title": "Dimension",
"type": "integer"
},
"default": {
"type": "boolean",
"description": "Whether this descriptor is in the default calculate set.",
"title": "Default"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "What the descriptor measures.",
"title": "Description"
},
"families": {
"description": "Feature families this descriptor belongs to. Pass one to ``calculate``.",
"items": {
"type": "string"
},
"title": "Families",
"type": "array"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Unit shared by every value this descriptor returns.",
"title": "Unit"
},
"requires_3d": {
"default": false,
"description": "True when the descriptor embeds a 3D conformer. That is slower and can return null.",
"title": "Requires 3D",
"type": "boolean"
}
},
"required": [
"name",
"dimension",
"default",
"description"
],
"title": "DescriptorInfo",
"type": "object"
}
},
"description": "Catalog response.",
"properties": {
"items": {
"description": "The descriptors in the catalog.",
"items": {
"$ref": "#/$defs/DescriptorInfo"
},
"title": "Items",
"type": "array"
}
},
"required": [
"items"
],
"title": "DescriptorInfoList",
"type": "object"
}
Fields:
CalculateDescriptorsResponse
Bases: BaseAlbertModel
Calculate response.
Show JSON schema:
{
"$defs": {
"BooleanDescriptorValue": {
"description": "One boolean descriptor result.",
"properties": {
"type": {
"const": "boolean",
"default": "boolean",
"description": "Value kind. Always ``boolean``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "The flag, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "BooleanDescriptorValue",
"type": "object"
},
"DescriptorValue": {
"description": "One calculated descriptor for one molecule.",
"properties": {
"name": {
"description": "Registered descriptor name.",
"title": "Name",
"type": "string"
},
"value": {
"description": "The calculated value. A null scalar or list component means it could not be calculated.",
"discriminator": {
"mapping": {
"boolean": "#/$defs/BooleanDescriptorValue",
"integer": "#/$defs/IntegerDescriptorValue",
"integer_list": "#/$defs/IntegerListDescriptorValue",
"numeric": "#/$defs/NumericDescriptorValue",
"numeric_list": "#/$defs/NumericListDescriptorValue",
"string": "#/$defs/StringDescriptorValue"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/NumericDescriptorValue"
},
{
"$ref": "#/$defs/NumericListDescriptorValue"
},
{
"$ref": "#/$defs/IntegerDescriptorValue"
},
{
"$ref": "#/$defs/IntegerListDescriptorValue"
},
{
"$ref": "#/$defs/BooleanDescriptorValue"
},
{
"$ref": "#/$defs/StringDescriptorValue"
}
],
"title": "Value"
},
"unit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Unit of ``value``, the same as the catalog entry for this descriptor.",
"title": "Unit"
}
},
"required": [
"name",
"value"
],
"title": "DescriptorValue",
"type": "object"
},
"IntegerDescriptorValue": {
"description": "One integer descriptor result.",
"properties": {
"type": {
"const": "integer",
"default": "integer",
"description": "Value kind. Always ``integer``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "The integer, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "IntegerDescriptorValue",
"type": "object"
},
"IntegerListDescriptorValue": {
"description": "A list of integer descriptor results.",
"properties": {
"type": {
"const": "integer_list",
"default": "integer_list",
"description": "Value kind. Always ``integer_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One integer per component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "IntegerListDescriptorValue",
"type": "object"
},
"MoleculeDescriptors": {
"description": "Descriptor values for one molecule.",
"properties": {
"smiles": {
"description": "The submitted SMILES for this result.",
"title": "Smiles",
"type": "string"
},
"descriptors": {
"description": "One entry per calculated descriptor.",
"items": {
"$ref": "#/$defs/DescriptorValue"
},
"title": "Descriptors",
"type": "array"
}
},
"required": [
"smiles",
"descriptors"
],
"title": "MoleculeDescriptors",
"type": "object"
},
"NumericDescriptorValue": {
"description": "One numeric descriptor result.",
"properties": {
"type": {
"const": "numeric",
"default": "numeric",
"description": "Value kind. Always ``numeric``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"description": "The number, or null when the descriptor could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "NumericDescriptorValue",
"type": "object"
},
"NumericListDescriptorValue": {
"description": "A list of numeric descriptor results, such as a fingerprint.",
"properties": {
"type": {
"const": "numeric_list",
"default": "numeric_list",
"description": "Value kind. Always ``numeric_list``.",
"title": "Type",
"type": "string"
},
"value": {
"description": "One number per bit or component. An entry is null when it could not be calculated.",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"title": "Value",
"type": "array"
}
},
"required": [
"value"
],
"title": "NumericListDescriptorValue",
"type": "object"
},
"StringDescriptorValue": {
"description": "One string descriptor result.",
"properties": {
"type": {
"const": "string",
"default": "string",
"description": "Value kind. Always ``string``.",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The text, or null when it could not be calculated.",
"title": "Value"
}
},
"required": [
"value"
],
"title": "StringDescriptorValue",
"type": "object"
}
},
"description": "Calculate response.",
"properties": {
"results": {
"description": "One entry per input SMILES.",
"items": {
"$ref": "#/$defs/MoleculeDescriptors"
},
"title": "Results",
"type": "array"
}
},
"required": [
"results"
],
"title": "CalculateDescriptorsResponse",
"type": "object"
}
Fields: