Skip to content

Strain

Strain workflow - calculate molecular strain energy.

StrainResult dataclass

StrainResult(workflow_data: dict[str, Any], workflow_type: str, workflow_uuid: str, complete: bool = True)

Bases: WorkflowResult

Result from a strain workflow.

strain property

strain: float | None

Computed strain energy (kcal/mol).

conformer_uuids property

conformer_uuids: list[str | None]

UUIDs of conformer calculations.

constrained_optimization_uuid property

constrained_optimization_uuid: str | None

UUID of the constrained optimization calculation.

messages property

messages: list[Message]

Any messages or warnings from the workflow.

constrained_optimization property

constrained_optimization: Calculation | None

The constrained optimization calculation.

conformers property

conformers: list[Calculation]

All conformer calculations.

Note

Makes one API call per conformer on first access. Results are cached. Call clear_cache() to refresh.

conformer_energies property

conformer_energies: list[float | None]

Energies for all conformers (Hartree).

conformer_molecules property

conformer_molecules: list[Molecule]

Molecule objects for all conformers.

get_boltzmann_weights

get_boltzmann_weights(temperature: float = 300.0) -> list[float]

Compute Boltzmann weights for conformers.

Parameters:

Name Type Description Default
temperature float

temperature in Kelvin (default: 300K)

300.0

Returns:

Type Description
list[float]

list of weights (sum to 1.0), excluding failed conformers

submit_strain_workflow

submit_strain_workflow(initial_molecule: StructureInput, harmonic_constraint_spring_constant: float = 5.0, constrain_hydrogens: bool = False, conf_gen_settings: ConformerGenSettingsUnion | None = None, multistage_opt_settings: MultiStageOptSettings | None = None, name: str = 'Strain Workflow', folder_uuid: str | None = None, folder: Folder | None = None, max_credits: int | None = None, webhook_url: str | None = None, is_draft: bool = False) -> Workflow[StrainResult]

Submits a strain workflow to the API.

Parameters:

Name Type Description Default
initial_molecule StructureInput

molecule to calculate strain for

required
harmonic_constraint_spring_constant float

spring constant for harmonic constraints (kcal/mol/A). Default 5.0

5.0
constrain_hydrogens bool

whether to constrain hydrogen positions. Default False

False
conf_gen_settings ConformerGenSettingsUnion | None

conformer generation settings. Defaults to OpenConf with max 200 conformers

None
multistage_opt_settings MultiStageOptSettings | None

optimization settings for conformer ranking. Defaults to GFN2-xTB optimization in water (ALPB) with a g-xTB singlepoint in water (CPCMx)

None
name str

name of the workflow

'Strain Workflow'
folder_uuid str | None

UUID of the folder to store the workflow in

None
folder Folder | None

destination folder

None
max_credits int | None

maximum credits for the workflow

None
webhook_url str | None

URL that Rowan will POST to when the workflow completes

None
is_draft bool

save as a draft without starting execution

False

Returns:

Type Description
Workflow[StrainResult]

submitted workflow

Raises:

Type Description
HTTPStatusError

request to the API fails