Basic Calculation
Configuration
Use the exported enums instead of raw strings when setting the method and engine:
import rowan
molecule = rowan.Molecule.from_smiles("CCO")
workflow = rowan.submit_basic_calculation_workflow(
initial_molecule=molecule,
tasks=["optimize"],
method=rowan.Method.GFN2_XTB,
engine=rowan.Engine.XTB,
)
Pass an OptimizationSettings object or
an equivalent dictionary to opt_settings. optimize_cell defaults to False; set it to True
only when optimizing a periodic cell.
Basic calculation workflow - perform quantum chemical calculations.
BasicCalculationResult
dataclass
BasicCalculationResult(workflow_data: dict[str, Any], workflow_type: str, workflow_uuid: str, complete: bool = True)
Bases: WorkflowResult
Result from a basic-calculation workflow.
calculation
property
Lazily fetched Calculation object with full molecule data.
molecule
property
The final molecule geometry with all computed properties.
molecules
property
All molecules from the calculation (e.g., optimization trajectory).
spin_densities
property
Spin densities on each atom (for open-shell systems).
frequencies
property
Vibrational frequencies in cm^-1 (if frequency calculation was performed).
xrd_peaks
property
XRD reflections as (h, k, l, intensity) tuples.
band_structure
property
Electronic band structure and DOS (periodic systems only).
density_of_states
property
Total DOS as (energy in Hartree, k-weighted count) pairs (Fermi level = 0).
elastic_tensor
property
elastic_tensor: tuple[tuple[float, float, float, float, float, float], tuple[float, float, float, float, float, float], tuple[float, float, float, float, float, float], tuple[float, float, float, float, float, float], tuple[float, float, float, float, float, float], tuple[float, float, float, float, float, float]] | None
Elastic stiffness matrix in GPa (Voigt order: xx yy zz yz xz xy).
optimization_energies
Energies for each optimization step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
relative
|
bool
|
return relative energies in kcal/mol (relative to the lowest energy step). If False (default), return absolute energies in Hartree |
False
|
Returns:
| Type | Description |
|---|---|
list[float]
|
list of energies for each optimization step |
settings_from_preset
Construct a Settings object from a named preset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preset
|
PresetName
|
preset name – see |
required |
overrides
|
Any
|
any |
{}
|
Returns:
| Type | Description |
|---|---|
Settings
|
validated |
Raises:
| Type | Description |
|---|---|
ValueError
|
an unknown preset name is given |
submit_basic_calculation_workflow
submit_basic_calculation_workflow(initial_molecule: StructureInput, tasks: list[str], method: Method | str | None = None, basis_set: BasisSet | str | None = None, mode: str = 'auto', engine: Engine | str | None = None, corrections: list[str] | None = None, solvent_settings: SolventSettings | dict[str, Any] | None = None, opt_settings: OptimizationSettings | dict[str, Any] | None = None, pbc_dft_settings: PBCDFTSettings | dict[str, Any] | None = None, excited_state_settings: TDDFTSettings | dict[str, Any] | None = None, preset: PresetName | None = None, name: str = 'Basic Calculation 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[BasicCalculationResult]
Submit a basic-calculation workflow to the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_molecule
|
StructureInput
|
molecule to perform the calculation on |
required |
tasks
|
list[str]
|
tasks to perform, see |
required |
method
|
Method | str | None
|
computational method, see |
None
|
basis_set
|
BasisSet | str | None
|
basis set, see |
None
|
mode
|
str
|
accuracy mode, see |
'auto'
|
engine
|
Engine | str | None
|
compute engine, see |
None
|
corrections
|
list[str] | None
|
dispersion corrections, see |
None
|
solvent_settings
|
SolventSettings | dict[str, Any] | None
|
solvent settings as a dict or |
None
|
opt_settings
|
OptimizationSettings | dict[str, Any] | None
|
optimization settings as a dict or |
None
|
pbc_dft_settings
|
PBCDFTSettings | dict[str, Any] | None
|
periodic boundary condition DFT settings as a dict or
|
None
|
excited_state_settings
|
TDDFTSettings | dict[str, Any] | None
|
excited-state settings for TDDFT calculations |
None
|
preset
|
PresetName | None
|
named preset, mutually exclusive with method/engine/basis_set/corrections.
- |
None
|
name
|
str
|
workflow name |
'Basic Calculation Workflow'
|
folder_uuid
|
str | None
|
UUID of the folder to place the workflow in |
None
|
folder
|
Folder | None
|
folder to place the workflow in |
None
|
max_credits
|
int | None
|
maximum credits to use |
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[BasicCalculationResult]
|
submitted workflow |
Raises:
| Type | Description |
|---|---|
HTTPStatusError
|
API request fails |
ValueError
|
preset is combined with method/engine/basis_set/corrections |
To resubmit with identical settings insulated from future preset changes, use
submit_workflow directly with workflow_data from a previous result.