Skip to content

Quickstart

Source access and public downloads

Repository paths identify files in the licensed engine source; they are not public downloads. For freely downloadable .oqp inputs and results, see Worked Examples.

This quickstart runs a small MRSF-TDDFT calculation on water. The recommended starting point is the readable .oqp input. The same calculation is then shown with the Python API, with .oqp as the only input-file syntax.

The .oqp parser is included in OpenQP 1.3.0 and is the recommended input style for this quickstart. All input-file examples below use .oqp.

.oqp Input

Create h2o.xyz:

3
water
O   0.000000000   0.000000000  -0.041061554
H  -0.533194329   0.533194329  -0.614469223
H   0.533194329  -0.533194329  -0.614469223

Create h2o_mrsf.oqp beside it:

mrsf(nstate=3)/bhhlyp/6-31g*
geom="h2o.xyz"

Read the file from top to bottom: use MRSF-TDDFT with BHHLYP/6-31G*, calculate three states, and read the water geometry. No task keyword means a single-point energy, and OpenQP selects the required high-spin working reference automatically. Nothing else is needed: the initial guess, SCF convergence, and grid settings are sensible defaults and are written only when they change.

Whitespace outside quotes and parentheses has no semantic effect, so the same items may be split over several lines. Examples put the route and task on one line and geom last for readability.

Run it:

openqp h2o_mrsf.oqp

For a gradient or geometry optimization, add grad(S0) or opt(S0) after the route. For HF and DFT, the only ground-state surface is implicit, so grad and grad(S0) are equivalent, as are opt and opt(S0).

See .oqp Input for routes, physical state labels, workflow controls, and more examples.

Python Script

The same calculation can be set up from Python:

from oqp.openqp import OpenQP

job = OpenQP("h2o_mrsf", silent=1)
job.molecule(geometry="water", charge=0)
job.theory.mrsf(functional="bhhlyp", basis="6-31g*", nstate=3)

mol = job.run()
results = mol.get_results()

print("Ground/reference energy:", results["energy"])
print("TD energies:", results["td_energies"])

For MRSF-TDDFT, the Python theory helper supplies the required ROHF triplet reference internally. HF and DFT scripts can set multiplicity directly in job.molecule(...) when the molecular reference multiplicity is part of the ordinary SCF setup.

OpenQP writes a log and structured output files in the working directory. For more Python examples, see Run OpenQP from Python.

Canonical .oqp input

Existing sectioned inputs remain supported. The legacy spelling of the same calculation is:

mrsf(nstate=3)/bhhlyp/6-31g* energy(S0)
geom="""
8   0.000000000   0.000000000  -0.041061554
1  -0.533194329   0.533194329  -0.614469223
1   0.533194329  -0.533194329  -0.614469223
"""

Save it as h2o_mrsf.oqp and run openqp h2o_mrsf.oqp. Use this format when maintaining an existing input deck or when a legacy-only option is required; new input examples in this manual lead with .oqp.

Next Calculations

For complete copy-and-run inputs with the expected results, molecule and orbital pictures, and an explanation of each result, see Worked Examples.

Use these public downloads as starting points. Each link names the actual input; the method guides provide additional options and release restrictions.

Goal Public input or guide
MRSF-TDDFT energy formaldehyde-gas.oqp
RHF energy h2-rhf.oqp
MP2 energy water-mp2.oqp
Analytic RHF-MP2 gradient MP2 gradient guide
DFT geometry optimization formaldehyde-opt.oqp
Analytic HF Hessian hessian.oqp
Native MRSF geometry optimization mrsf-opt.oqp
SOC formaldehyde-soc.oqp
PCM/ddX energy PCM/ddX guide
NMR shielding benzene-nmr.oqp