Skip to content

Quickstart

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, followed by the legacy sectioned .inp format.

Development input format

The .oqp parser is available on the current development branch (see the companion OpenQP PR #282), but it is not part of the published OpenQP 1.2.0 release. With OpenQP 1.2.0, use the legacy .inp example below; otherwise build the current development version before running this .oqp quickstart.

.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*
energy
geom="h2o.xyz"

Read the file from top to bottom: use MRSF-TDDFT with BHHLYP/6-31G*, calculate three states, run a single-point energy, and read the water geometry. OpenQP selects the required high-spin working reference automatically.

The same items may be placed on one line; whitespace outside quotes and parentheses has no semantic effect. Examples use one logical item per line and put geom last for readability.

Run it:

openqp h2o_mrsf.oqp

For a gradient or geometry optimization, replace energy with grad(S0) or opt(S0). 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.

Legacy .inp Input

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

[input]
system=
   8   0.000000000   0.000000000  -0.041061554
   1  -0.533194329   0.533194329  -0.614469223
   1   0.533194329  -0.533194329  -0.614469223
charge=0
runtype=energy
basis=6-31g*
functional=bhhlyp
method=tdhf

[guess]
type=huckel

[scf]
type=rohf
multiplicity=3

[tdhf]
type=mrsf
nstate=3

Save it as h2o_mrsf.inp and run openqp h2o_mrsf.inp. 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

Use these .oqp inputs as nearby templates. Every linked .oqp example has a same-stem legacy .inp companion.

Goal Recommended example
MRSF-TDDFT energy examples/MRSF-TDDFT/H2O_BHHLYP-MRSFTDDFT_ENERGY.oqp
RHF energy examples/HF/H2O_RHF-HF_ENERGY.oqp
MP2 energy examples/MP2/h2o_ump2_6-31g.oqp
DFT gradient examples/DFT/H2O_RHF-DFT_GRADIENT.oqp
Analytic HF/DFT Hessian examples/HESS/H2O_RHF-DFT_ANA_HESS.oqp
Native geometry optimization examples/OPT/H2O_RHF-DFT_OPTIMIZE_OQP.oqp
SOC examples/SOC/H2O_BHHLYP_SOC.oqp
PCM/ddX energy examples/PCM/H2O_RHF-HF_DDPCM_ENERGY_ISPHER.oqp
NMR shielding examples/NMR/H2O_RHF-NMR.oqp