Skip to content

Basic Calculation

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

If True, 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

if 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

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

If True, submit the workflow as a draft without starting execution.

False

Returns:

Type Description
Workflow

Submitted workflow.

Raises:

Type Description
requests.HTTPError

if the API request fails.

ValueError

if 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.