Skip to content

Calculation

Calculation results from Rowan workflows.

Calculation pydantic-model

Bases: BaseModel

Rowan calculation result.

Attributes:

Name Type Description
uuid str

UUID of the calculation

name str | None

name of the calculation

status int | None

status code of the calculation

elapsed float | None

execution time in seconds

engine str | None

compute engine used

molecules list[Molecule]

molecules (geometries) from this calculation

Show JSON schema:
{
  "$defs": {
    "Molecule": {
      "description": "Molecular structure with optional computed properties.\n\nCan be created from SMILES, XYZ, or directly from atoms. Wraps stjames.Molecule\ninternally but provides a cleaner interface.",
      "properties": {},
      "title": "Molecule",
      "type": "object"
    }
  },
  "description": "Rowan calculation result.\n\nAttributes:\n    uuid: UUID of the calculation\n    name: name of the calculation\n    status: status code of the calculation\n    elapsed: execution time in seconds\n    engine: compute engine used\n    molecules: molecules (geometries) from this calculation",
  "properties": {
    "uuid": {
      "title": "Uuid",
      "type": "string"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Name"
    },
    "status": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Status"
    },
    "elapsed": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Elapsed"
    },
    "engine": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Engine"
    },
    "molecules": {
      "items": {
        "$ref": "#/$defs/Molecule"
      },
      "title": "Molecules",
      "type": "array"
    }
  },
  "required": [
    "uuid"
  ],
  "title": "Calculation",
  "type": "object"
}

Config:

  • arbitrary_types_allowed: True

Fields:

  • uuid (str)
  • name (str | None)
  • status (int | None)
  • elapsed (float | None)
  • engine (str | None)
  • molecules (list[Molecule])

energy property

energy: float | None

Energy of the final molecule (Hartree).

molecule property

molecule: Molecule | None

Final molecule geometry.

refresh

refresh(in_place: bool = True) -> Self

Fetch the latest calculation data from the API.

Parameters:

Name Type Description Default
in_place bool

update this instance in place rather than return a new instance

True

Returns:

Type Description
Self

updated Calculation object

retrieve_calculation

retrieve_calculation(uuid: str) -> Calculation

Retrieve a calculation from the API by UUID.

Parameters:

Name Type Description Default
uuid str

UUID of the calculation to retrieve

required

Returns:

Type Description
Calculation

calculation object with the fetched data

Raises:

Type Description
HTTPStatusError

API request fails

TimeoutError

response times out