Skip to content

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.

opt_settings = rowan.OptimizationSettings(max_steps=200, optimize_cell=False)

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_uuid property

calculation_uuid: str | None

The UUID of the calculation.

calculation property

calculation: Calculation | None

Lazily fetched Calculation object with full molecule data.

molecule property

molecule: Molecule | None

The final molecule geometry with all computed properties.

molecules property

molecules: list[Molecule]

All molecules from the calculation (e.g., optimization trajectory).

energy property

energy: float | None

Energy of the final molecule (Hartree).

charges property

charges: list[float] | None

Partial charges on each atom.

spin_densities property

spin_densities: list[float] | None

Spin densities on each atom (for open-shell systems).

dipole property

dipole: tuple[float, float, float] | None

Dipole moment vector (Debye).

frequencies property

frequencies: list[float] | None

Vibrational frequencies in cm^-1 (if frequency calculation was performed).

symmetry property

symmetry: str | int | None

Space group number (1–230) or point group symbol.

xrd_peaks property

xrd_peaks: list[tuple[int, int, int, float]] | None

XRD reflections as (h, k, l, intensity) tuples.

band_structure property

band_structure: BandStructure | None

Electronic band structure and DOS (periodic systems only).

band_gap property

band_gap: float | None

Band gap (Hartree).

density_of_states property

density_of_states: list[tuple[float, float]] | None

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

optimization_energies(relative: bool = False) -> list[float]

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

settings_from_preset(preset: PresetName, **overrides: Any) -> stjames.Settings

Construct a Settings object from a named preset.

Parameters:

Name Type Description Default
preset PresetName

preset name – see PresetName for options

required
overrides Any

any Settings fields to override (e.g. tasks, mode, solvent_settings)

{}

Returns:

Type Description
Settings

validated Settings object

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 Task (e.g. optimize, energy, frequencies)

required
method Method | str | None

computational method, see Method. Default: omol25_conserving_s

None
basis_set BasisSet | str | None

basis set, see BasisSet

None
mode str

accuracy mode, see Mode. Default: auto

'auto'
engine Engine | str | None

compute engine, see Engine. Auto-selected from method if not specified

None
corrections list[str] | None

dispersion corrections, see Correction

None
solvent_settings SolventSettings | dict[str, Any] | None

solvent settings as a dict or SolventSettings

None
opt_settings OptimizationSettings | dict[str, Any] | None

optimization settings as a dict or OptimizationSettings

None
pbc_dft_settings PBCDFTSettings | dict[str, Any] | None

periodic boundary condition DFT settings as a dict or PBCDFTSettings. Specifies the plane-wave cutoff (Hartree), Monkhorst–Pack k-point grid, and optional smearing. When set, the engine is automatically set to Quantum ESPRESSO unless engine is explicitly provided

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. - general_nnp – omol25_conserving_s on omol25 - organic_nnp – aimnet2_wb97md3 on aimnet2 - rapid_semiempirical – gfn2_xtb on xtb - routine_dft – r2scan-D4/vDZP on gpu4pyscf - careful_dft – wb97m_d3bj/vDZP on gpu4pyscf

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.