Synthesis
albert.resources.synthesis
ColumnDescriptor
Bases: BaseAlbertModel
A single column in the reaction worksheet table.
Show JSON schema:
{
"description": "A single column in the reaction worksheet table.",
"properties": {
"id": {
"description": "The column identifier.",
"title": "Id",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The human-readable column heading.",
"title": "Label"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The category the column belongs to.",
"title": "Category"
},
"default": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"description": "The default value for cells in this column.",
"title": "Default"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data type of the column's values.",
"title": "Type"
}
},
"required": [
"id"
],
"title": "ColumnDescriptor",
"type": "object"
}
Fields:
ColumnSequence
Bases: BaseAlbertModel
The ordered columns shown for reactants and products in the table.
Show JSON schema:
{
"$defs": {
"ColumnDescriptor": {
"description": "A single column in the reaction worksheet table.",
"properties": {
"id": {
"description": "The column identifier.",
"title": "Id",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The human-readable column heading.",
"title": "Label"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The category the column belongs to.",
"title": "Category"
},
"default": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"description": "The default value for cells in this column.",
"title": "Default"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data type of the column's values.",
"title": "Type"
}
},
"required": [
"id"
],
"title": "ColumnDescriptor",
"type": "object"
}
},
"description": "The ordered columns shown for reactants and products in the table.",
"properties": {
"reactants": {
"description": "The columns, in display order, for the reactant rows.",
"items": {
"$ref": "#/$defs/ColumnDescriptor"
},
"title": "Reactants",
"type": "array"
},
"products": {
"description": "The columns, in display order, for the product rows.",
"items": {
"$ref": "#/$defs/ColumnDescriptor"
},
"title": "Products",
"type": "array"
}
},
"title": "ColumnSequence",
"type": "object"
}
Fields:
RowSequence
Bases: BaseAlbertModel
The ordered row IDs for reactants and products in the table.
Show JSON schema:
{
"description": "The ordered row IDs for reactants and products in the table.",
"properties": {
"reactants": {
"description": "The reactant row IDs, in display order.",
"items": {
"type": "string"
},
"title": "Reactants",
"type": "array"
},
"products": {
"description": "The product row IDs, in display order.",
"items": {
"type": "string"
},
"title": "Products",
"type": "array"
}
},
"title": "RowSequence",
"type": "object"
}
Fields:
ReactionParticipant
Bases: BaseAlbertModel
A single reactant or product row in a reaction.
Show JSON schema:
{
"description": "A single reactant or product row in a reaction.",
"properties": {
"rowId": {
"description": "The identifier of this row, used to target it in [`update_reactant_row_values`][albert.collections.synthesis.SynthesisCollection.update_reactant_row_values].",
"title": "Rowid",
"type": "string"
},
"smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string of this participant's structure.",
"title": "Smiles"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The quantities entered for this row, keyed by column.",
"title": "Values"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The kind of participant (for example, reactant or product).",
"title": "Type"
},
"limitingReagent": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this participant is the limiting reagent.",
"title": "Limitingreagent"
}
},
"required": [
"rowId"
],
"title": "ReactionParticipant",
"type": "object"
}
Fields:
-
row_id(str) -
smiles(str | None) -
values(dict[str, Any] | None) -
type(str | None) -
limiting_reagent(str | bool | None)
Synthesis
Bases: BaseAlbertModel
A synthesis (reaction) record documenting a chemical reaction.
Captures a reaction drawn on a Ketcher canvas together with its reactant and
product rows and their quantities. Retrieve one with
get_by_id, edit the
updatable fields, and save with
update.
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"ColumnDescriptor": {
"description": "A single column in the reaction worksheet table.",
"properties": {
"id": {
"description": "The column identifier.",
"title": "Id",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The human-readable column heading.",
"title": "Label"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The category the column belongs to.",
"title": "Category"
},
"default": {
"anyOf": [
{},
{
"type": "null"
}
],
"default": null,
"description": "The default value for cells in this column.",
"title": "Default"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data type of the column's values.",
"title": "Type"
}
},
"required": [
"id"
],
"title": "ColumnDescriptor",
"type": "object"
},
"ColumnSequence": {
"description": "The ordered columns shown for reactants and products in the table.",
"properties": {
"reactants": {
"description": "The columns, in display order, for the reactant rows.",
"items": {
"$ref": "#/$defs/ColumnDescriptor"
},
"title": "Reactants",
"type": "array"
},
"products": {
"description": "The columns, in display order, for the product rows.",
"items": {
"$ref": "#/$defs/ColumnDescriptor"
},
"title": "Products",
"type": "array"
}
},
"title": "ColumnSequence",
"type": "object"
},
"ReactionParticipant": {
"description": "A single reactant or product row in a reaction.",
"properties": {
"rowId": {
"description": "The identifier of this row, used to target it in [`update_reactant_row_values`][albert.collections.synthesis.SynthesisCollection.update_reactant_row_values].",
"title": "Rowid",
"type": "string"
},
"smiles": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The SMILES string of this participant's structure.",
"title": "Smiles"
},
"values": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The quantities entered for this row, keyed by column.",
"title": "Values"
},
"type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The kind of participant (for example, reactant or product).",
"title": "Type"
},
"limitingReagent": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this participant is the limiting reagent.",
"title": "Limitingreagent"
}
},
"required": [
"rowId"
],
"title": "ReactionParticipant",
"type": "object"
},
"RowSequence": {
"description": "The ordered row IDs for reactants and products in the table.",
"properties": {
"reactants": {
"description": "The reactant row IDs, in display order.",
"items": {
"type": "string"
},
"title": "Reactants",
"type": "array"
},
"products": {
"description": "The product row IDs, in display order.",
"items": {
"type": "string"
},
"title": "Products",
"type": "array"
}
},
"title": "RowSequence",
"type": "object"
}
},
"description": "A synthesis (reaction) record documenting a chemical reaction.\n\nCaptures a reaction drawn on a Ketcher canvas together with its reactant and\nproduct rows and their quantities. Retrieve one with\n[`get_by_id`][albert.collections.synthesis.SynthesisCollection.get_by_id], edit the\nupdatable fields, and save with\n[`update`][albert.collections.synthesis.SynthesisCollection.update].",
"properties": {
"albertId": {
"description": "The Synthesis ID (format ``SYN...``).",
"title": "Albertid",
"type": "string"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Notebook ID that owns this record (format ``NTB...``).",
"title": "Parentid"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The human-readable name of the synthesis.",
"title": "Name"
},
"status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the synthesis record.",
"title": "Status"
},
"blockId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Ketcher block ID this synthesis is associated with.",
"title": "Blockid"
},
"inventoryId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Inventory ID backing the reaction worksheet, set once the reactant/product table is initialized.",
"title": "Inventoryid"
},
"hideReactionWorksheet": {
"anyOf": [
{
"type": "string"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether the reaction worksheet table is hidden.",
"title": "Hidereactionworksheet"
},
"s3Key": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The storage key for the record's canvas assets.",
"title": "S3Key"
},
"canvasData": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "The serialized Ketcher canvas data and preview image.",
"title": "Canvasdata"
},
"smiles": {
"description": "The reaction SMILES strings for the drawn reaction.",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"title": "Smiles",
"type": "array"
},
"reactants": {
"description": "The reactant rows of the reaction.",
"items": {
"$ref": "#/$defs/ReactionParticipant"
},
"title": "Reactants",
"type": "array"
},
"products": {
"description": "The product rows of the reaction.",
"items": {
"$ref": "#/$defs/ReactionParticipant"
},
"title": "Products",
"type": "array"
},
"columnSequence": {
"anyOf": [
{
"$ref": "#/$defs/ColumnSequence"
},
{
"type": "null"
}
],
"default": null,
"description": "The ordered columns for the reactant and product tables."
},
"rowSequence": {
"anyOf": [
{
"$ref": "#/$defs/RowSequence"
},
{
"type": "null"
}
],
"default": null,
"description": "The ordered reactant and product row IDs."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit information about when and by whom the record was created."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit information about the most recent update."
}
},
"required": [
"albertId"
],
"title": "Synthesis",
"type": "object"
}
Fields:
-
id(SynthesisId) -
parent_id(NotebookId | str | None) -
name(str | None) -
status(str | None) -
block_id(str | None) -
inventory_id(str | None) -
hide_reaction_worksheet(str | bool | None) -
s3_key(str | None) -
canvas_data(dict[str, Any] | None) -
smiles(list[str | None]) -
reactants(list[ReactionParticipant]) -
products(list[ReactionParticipant]) -
column_sequence(ColumnSequence | None) -
row_sequence(RowSequence | None) -
created(AuditFields | None) -
updated(AuditFields | None)
parent_id
parent_id: NotebookId | str | None = None
The Notebook ID that owns this record (format NTB...).
inventory_id
inventory_id: str | None = None
The Inventory ID backing the reaction worksheet, set once the reactant/product table is initialized.
hide_reaction_worksheet
Whether the reaction worksheet table is hidden.
canvas_data
The serialized Ketcher canvas data and preview image.
column_sequence
column_sequence: ColumnSequence | None = None
The ordered columns for the reactant and product tables.
created
created: AuditFields | None = None
Audit information about when and by whom the record was created.
ReactantValues
Bases: BaseAlbertModel
The quantities entered for a single reactant row.
Passed to
update_reactant_row_values
to set a reactant's amounts. Any field left as None is not set.
Example
Show JSON schema:
{
"description": "The quantities entered for a single reactant row.\n\nPassed to\n[`update_reactant_row_values`][albert.collections.synthesis.SynthesisCollection.update_reactant_row_values]\nto set a reactant's amounts. Any field left as ``None`` is not set.\n\n!!! example\n ```python\n from albert.resources.synthesis import ReactantValues\n values = ReactantValues(mass=10.0, eq=1.0)\n ```",
"properties": {
"mass": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The mass of the reactant.",
"title": "Mass"
},
"moles": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The amount of the reactant in moles.",
"title": "Moles"
},
"eq": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "The number of equivalents of the reactant.",
"title": "Eq"
},
"concentration": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "The concentration of the reactant.",
"title": "Concentration"
}
},
"title": "ReactantValues",
"type": "object"
}
Fields: