OpenQP Python API
Version 1.2.1 · generated from main@740611d
The OpenQP Python layer is both a fluent calculation builder and the runtime orchestrator for the native OpenQP library. It covers molecular input, electronic-structure model selection, excited-state and dynamics workflows, analysis, interchange formats, and direct access to lower-level execution objects.
Note
This site is the source-level API reference. For installation, scientific background, supported methods, and every input keyword, use the OpenQP manual.
Quick start
The high-level oqp.openqp builder converts readable chained calls into a validated OpenQP input and runs it through the native engine.
from oqp.openqp import OpenQP
job = (
OpenQP(project="water_pbe")
.molecule(geometry="water", basis="6-31g*", charge=0)
.dft("pbe", reference="rhf", runtype="grad", conv=1.0e-7)
)
input_sections = job.to_input_dict() # inspect before execution
molecule = job.run() # native OpenQP Molecule result
OpenQP also exposes theory and workflow namespaces for more involved jobs:
from oqp.openqp import OpenQP
job = (
OpenQP(project="mrsf_crossing")
.molecule(geometry="water", charge=0)
.theory(
"mrsf-tddft",
functional="bhhlyp",
basis="6-31g*",
nstate=5,
)
)
job.workflow.meci(lib="oqp", istate=1, jstate=2)
result = job.run()
API map
Area |
Start here |
What it provides |
|---|---|---|
High-level calculations |
|
|
CLI and runner |
|
|
Semantic input |
Parsing and lowering of concise |
|
Molecule and results |
Molecular geometry, configuration, energies, orbitals, gradients, Hessians, state data, JSON loading, and native data access. |
|
Electronic workflows |
Single points, gradients, optimization/IRC/NEB, frequencies, guesses, basis projection, symmetry, solvent, and engine adapters. |
|
Dynamics and QM/MM |
FSSH NAMD, SOC dynamics, MCH propagation, QM/MM dynamics, hopping, decoherence, restart, and trajectory state management. |
|
Analysis |
NTOs, attachment/detachment densities, transition densities, AO grids, charge-transfer descriptors, and excited-state analysis. |
|
Quantum data |
One- and two-body integrals, AO-to-MO transformations, molecular Hamiltonians, and FCIDUMP reading/writing. |
|
Export and interchange |
Cube generation, QCSchema conversion/validation, FCIDUMP export, and comparison/parsing helpers in oqp.interop. |
|
Utilities |
MPI helpers, matrices, geometry, file handling, performance presets, structured DFTB traces, input checks, and regression tooling. |
High-level calculation models
The OpenQP builder keeps theory selection separate from the requested
workflow. This makes it possible to reuse the same molecular definition and
switch between energy, gradient, optimization, crossing, SOC, or dynamics
workflows while keeping the generated input inspectable.
Model family |
Representative calls |
Supported role in the builder |
|---|---|---|
HF and DFT |
|
Restricted/open-shell references, functionals, SCF convergence, energies, gradients, properties, and downstream workflows. |
MP2 |
|
MP2, SCS-MP2, SOS-MP2, and custom same-/opposite-spin scaling for energy calculations. |
Excited states |
|
TDHF/TDDFT, SF-TDDFT, and MRSF-TDDFT state spaces and response options. |
DFTB |
|
Ground-state, TD-DFTB, SF/MRSF response, SOC, and dynamics configuration. |
Embedded systems |
|
PDB/QM-region setup, electrostatic embedding, force fields, PME/cutoff settings, frontier-charge redistribution, and OpenMM coupling. |
Workflow-oriented example
The same public API can express SOC-enabled QM/MM nonadiabatic dynamics:
from oqp.openqp import OpenQP
job = (
OpenQP(project="soc_namd_qmmm")
.molecule("chromophore.pdb 0-4", basis="6-31g*")
.theory("mrsf-tddft", functional="bhhlyp", nstate=3)
.qmmm(cutoff="PME")
)
job.workflow.namd(
soc=True,
soc_basis="mch",
nstep=200,
dt=0.5,
init_state="S1",
)
trajectory = job.run()
How the Python layer is organized
oqp.openqpUser-facing fluent builder and schema-backed section proxies.
oqp.pyoqpandoqp.runtimeNative-library discovery, runner lifecycle, CLI behavior, and calculation dispatch.
oqp.libraryScientific workflow implementations and adapters around the native core.
oqp.moleculeMain state/result container and typed input data structures.
oqp.analysis,oqp.quantum,oqp.export,oqp.interopPost-processing and portable data interfaces that can be used independently of the fluent builder where appropriate.