Running your own molecule
Start with an XYZ geometry you have prepared, exported from a molecular editor, or obtained from a documented source. Use coordinates suitable for your scientific question, such as a geometry optimized elsewhere. RustiQ calculates at the positions you supply.
Prepare and configure the calculation
In a new working directory, save your geometry as molecule.xyz. Verify
that the atom count matches the coordinate rows, that the symbols identify
the intended elements, and that no atoms are missing or duplicated. Check
the coordinate units against the source and inspect a representative bond
length. XYZ has no dedicated unit field. See the geometry guide.
Generate a starting configuration in the same directory.
rustiq init molecule.xyz -o calculation.toml
If you already know the state is charged or has a higher multiplicity, you
can supply --charge and --multiplicity to init. Without them,
init assumes neutral charge and chooses singlet for an even electron
count or doublet for an odd count. These choices use electron parity. Confirm the intended spin state before
running.
Open calculation.toml in a plain-text editor. The following complete
configuration shows explicit settings for a neutral closed-shell molecule
with coordinates in Angstrom. Adapt the state and basis to your molecule
before saving.
[molecule]
geometry = "molecule.xyz"
units = "Angstrom"
charge = 0
multiplicity = 1
[basis]
name = "sto-3g"
[method.hf]
method = "Auto"
convergence_threshold = 1e-8
max_iterations = 100
[method.hf.diis]
enabled = false
Geometry and electronic state. Relative paths are resolved from the
directory containing the TOML file. For example, use ../molecule.xyz if
you move the TOML into an inputs subdirectory. You can also use an
absolute path in your platform’s syntax. Use "Bohr" if the coordinates
are already in Bohr. Set charge in units of the elementary charge
(positive for cations). The electron count \(N\) is the sum of the nuclear
charges minus the molecular charge. For multiplicity \(M=2S+1\), check
that \(N\) is positive and that \((N\pm(M-1))/2\) gives nonnegative
integer alpha and beta populations. Choose the spin state using evidence
about the molecule. A compatible multiplicity can still describe a state
other than the one you intend.
Basis and HF reference. With an internet connection and an online
build, use rustiq basis download sto-3g for the configuration above.
You can also obtain a Basis Set Exchange JSON file and import it as in
the H₂ example.
Use rustiq basis list to check the local names. The basis must cover
every element in the geometry. Check the supported functions
before choosing a basis with higher angular momentum or effective core
potentials. The minimal STO-3G basis is useful for checking inputs cheaply,
but offers limited radial and angular flexibility. For example, the
reference cases use 6-31G to
increase valence radial flexibility and cc-pVDZ for comparisons that
include polarization functions. Check support for the elements and shells
in your molecule and assess basis quality for the quantity you need. For a code-to-code comparison, start with a supported
basis available in both programs and match its Cartesian or spherical
convention and contraction.
Auto is the default and uses RHF for even-electron singlets, UHF for
other compatible states. Use "Rhf" to require a closed-shell reference,
or "Uhf" to request different alpha and beta spatial orbitals explicitly.
Inspect spin contamination for UHF, including when exploring broken-symmetry
singlets. See HF method and guess selection.
Adjust numerical controls only when needed
The example shows the default SCF threshold (1e-8), iteration limit
(100), and DIIS setting (off). The default initial guess uses the
core Hamiltonian. If the run oscillates or converges slowly, check the
geometry, basis, and state first. Then consider enabling DIIS to accelerate
the SCF iterations or trying a different guess. Compare the converged
solutions if the starting guess affects the result. If the overlap rank
drops, investigate near-redundant functions and geometry before adjusting
the overlap cutoff. Changing it can change the orbital space.
Optionally add MP2 correlation
To request MP2, append this section once to the TOML. Omit the section for HF only.
[method.mp2]
frozen_orbitals = 0
memory_limit = "auto"
Zero includes all occupied orbitals in the correlation treatment. Match the frozen occupied orbital convention when comparing MP2 results. The automatic budget governs additional integral-transformation workspace. It excludes HF data and other memory already in use. See MP2 memory use if the required blocks cannot fit or memory is limited.
Run, assess and preserve
Run rustiq run calculation.toml from the directory holding your
configuration. Use the output checklist
to assess the result. To repeat the calculation and save both structured
results and reusable data, run the following.
rustiq run calculation.toml --format json --pretty --artifact molecule.rustiq > results.json
rustiq artifact inspect molecule.rustiq
rustiq artifact verify molecule.rustiq
The shell redirects the numerical report to results.json. Use a fresh
report filename if you want to keep an earlier report. Check the run’s
status before relying on the file. inspect lists the saved calculation
and available artifacts. verify checks the artifact data and reports
validation failures or skipped entries. Keep the JSON report, bundle, and
original inputs together so you can compare energies and revisit your
choices. See portable bundles for
reruns, reuse, Post-SCF MP2, and Molden export.
When a calculation fails
Read the diagnostic message and its code, then check the
exit status.
Exit status 3 for a single run identifies SCF non-convergence. If you
requested JSON, also check the recorded outcome.
| What stopped the run | What to inspect first |
|---|---|
| Invalid input | Check the highlighted TOML field or the geometry path, atom count, and coordinate rows. See run inputs and calculations. |
| Missing or unsupported basis | For rustiq::basis::missing_offline, check the local basis names or import the file. For a basis application error, check coverage and shell support. See basis sets and cache. |
| Invalid charge or multiplicity | For rustiq::calculation::molecule or rustiq::calculation::hf_method, check the electron populations and HF choice. See run inputs and calculations. |
| SCF non-convergence | For rustiq::scf::non_convergence, confirm the geometry, state and basis, then inspect the energy and residual trends. See SCF convergence. |
| Numerical failure | For rustiq::calculation::numerical or an MP2 error, read the underlying operation. Check geometry, overlap rank, or the cited workspace or orbital settings as appropriate. See run inputs and calculations. |
| Invalid or incompatible portable artifact | Check the bundle path and selected calculation with artifact inspect, then run artifact verify. For reuse, also check that your new geometry, basis, and integral settings match the reusable data. See portable bundle diagnostics. |
Next, work through the water, hydroxyl radical, and benzene tutorials for saved-reference MP2, open-shell analysis, and orbital export.