VeloxChem supports robust restart capabilities via binary HDF5 (.h5) files that capture the essential electronic‑structure state needed to resume or reuse calculations reproducibly and efficiently.
What is stored in the restart file?¶
The restart file is designed to be portable, compact, and self‑describing. It typically contains:
System definition
Cartesian geometry (atomic numbers, positions)
Charge and spin multiplicity
Basis and integral metadata
Basis‑set and ECP identifiers per atom
Integral conventions
XC grid settings
SCF/DFT electronic state
Total energies
Molecular‑orbital (MO) coefficients and orbital energies
Occupations (including fractional, if used)
Density matrix (α/β for unrestricted cases)
SCF convergence thresholds and last achieved residuals
Functional specification
Additional model context (when active)
Implicit solvation model and parameters (e.g., CPCM/SMD)
Explicit solvation model and parameters (polarizable embedding)
External fields (if present) and unit specifications
Provenance and versioning
VeloxChem version, build info, and I/O schema version
Host and timestamp metadata to aid reproducibility
What can be restarted?¶
SCF/DFT single‑point energy
Resume from a converged density and MO set for instant re‑evaluation (e.g., with tighter thresholds or different print options).Geometry optimization & PES scans
Reuse the last converged density/MOs at a new geometry as a high‑quality initial guess to accelerate SCF convergence along a path or during restarts after wall‑time limits.Vibrational analysis (IR/Raman)
Start the property step from a converged electronic state at the optimized geometry.Spectroscopies (UV/vis, optical activity)
Provide a clean ground‑state reference (MOs, occupations, density) for TDDFT and CPP runs to reduce set‑up time and ensure consistency of state definitions.
Writing restart files¶
VeloxChem can write a restart file at the end of an SCF/DFT calculation (and at checkpoints for longer runs).
import veloxchem as vlx
molecule = vlx.Molecule.read_name("water")
basis = vlx.MolecularBasis.read(molecule, "def2-svp")
scf_drv = vlx.ScfRestrictedDriver()
scf_drv.xcfun = "b3lyp"
# specify name of HDF5 file
scf_drv.filename = "vlx_results_hdf5"
scf_results = scf_drv.compute(molecule, basis)
opt_drv = vlx.OptimizationDriver(scf_drv)
opt_drv.filename = scf_drv.filename
opt_results = opt_drv.compute(molecule, basis, scf_results)Reading water from PubChem...
Reference: S. Kim, J. Chen, T. Cheng, A. Gindulyte, J. He, S. He, Q. Li, B. A. Shoemaker, P. A. Thiessen, B. Yu, L. Zaslavsky, J. Zhang, E. E. Bolton, Nucleic Acids Res., 2025, 53, D1516-D1525.
Please double-check the compound since names may refer to more than one record.
Self Consistent Field Driver Setup
====================================
Wave Function Model : Spin-Restricted Kohn-Sham
Initial Guess Model : Restart from Checkpoint
Convergence Accelerator : Direct Inversion of Iterative Subspace
Max. Number of Iterations : 50
Max. Number of Error Vectors : 10
Convergence Threshold : 1.0e-06
ERI Screening Threshold : 1.0e-12
Linear Dependence Threshold : 1.0e-06
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * Restarting from checkpoint file: vlx_results_hdf5_scf.h5
Iter. | Kohn-Sham Energy | Energy Change | Gradient Norm | Max. Gradient | Density Change
--------------------------------------------------------------------------------------------
1 -74.657848608735 0.0000000000 1.53048719 0.14771146 0.00000000
2 -75.890215584441 -1.2323669757 2.20347019 0.26394699 0.95581299
3 -76.217821125908 -0.3276055415 1.18833815 0.14415372 0.22378573
4 -76.355190636452 -0.1373695105 0.14604238 0.01777192 0.26227643
5 -76.357141437126 -0.0019508007 0.02844335 0.00319620 0.04502840
6 -76.357216063145 -0.0000746260 0.00356195 0.00034191 0.00670202
7 -76.357217253671 -0.0000011905 0.00040762 0.00004509 0.00095390
8 -76.357217270082 -0.0000000164 0.00007941 0.00000875 0.00013562
9 -76.357217270769 -0.0000000007 0.00000574 0.00000062 0.00002581
10 -76.357217270774 -0.0000000000 0.00000054 0.00000006 0.00000260
* Info * Checkpoint written to file: vlx_results_hdf5_scf.h5
* Info * SCF results written to file: vlx_results_hdf5.h5
*** SCF converged in 10 iterations. Time: 0.85 sec.
Spin-Restricted Kohn-Sham:
--------------------------
Total Energy : -76.3572172708 a.u.
Electronic Energy : -85.2452833708 a.u.
Nuclear Repulsion Energy : 8.8880661000 a.u.
------------------------------------
Gradient Norm : 0.0000005380 a.u.
Ground State Information
------------------------
Charge of Molecule : 0.0
Multiplicity (2S+1) : 1
Magnetic Quantum Number (M_S) : 0.0
Optimization Driver Setup
===========================
Coordinate System : TRIC
Constraints : No
Max. Number of Steps : 300
Transition State : No
IRC : No
Hessian : never
* Info * Using geomeTRIC for geometry optimization.
L.-P. Wang and C.C. Song, J. Chem. Phys. 2016, 144, 214108
* Info * Computing energy and gradient...
SCF Gradient Driver Setup
===========================
Gradient Type : Analytical
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -2.972803000000 0.616643000000 0.437549000000
H -2.711441000000 1.354416000000 -0.169068000000
H -2.344331000000 0.687504000000 1.199523000000
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O -0.015838326219 -0.014394435657 -0.002765544526
H 0.003311434167 0.015604740365 -0.015844415793
H 0.012554218782 -0.001186756137 0.018614358151
*** Time spent in gradient calculation: 0.58 sec ***
* Info * Energy : -76.3572172708 a.u.
* Info * Gradient : 2.218656e-02 a.u. (RMS)
* Info * 2.248375e-02 a.u. (Max)
* Info * Time : 0.84 sec
* Info * Computing energy and gradient...
SCF Gradient Driver Setup
===========================
Gradient Type : Analytical
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -2.973639439311 0.615900992299 0.437408784637
H -2.704153305875 1.341143389648 -0.141827494067
H -2.351649895769 0.700770936026 1.172283075458
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O -0.001039061085 -0.000945480237 -0.000185871519
H 0.000873123622 -0.000172874663 0.001412778043
H 0.000163712210 0.001115301713 -0.001231492056
*** Time spent in gradient calculation: 0.40 sec ***
* Info * Energy : -76.3582959539 a.u.
* Info * Gradient : 1.589924e-03 a.u. (RMS)
* Info * 1.669782e-03 a.u. (Max)
* Info * Time : 1.13 sec
* Info * Computing energy and gradient...
SCF Gradient Driver Setup
===========================
Gradient Type : Analytical
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -2.970920113644 0.618385102524 0.437942091539
H -2.706664474321 1.342034115942 -0.146362357210
H -2.351804087121 0.697476020651 1.176417714266
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O -0.000257698285 -0.000236657445 -0.000046651303
H 0.000112829032 0.000147739323 -0.000038838878
H 0.000144231711 0.000087261312 0.000082451410
*** Time spent in gradient calculation: 0.60 sec ***
* Info * Energy : -76.3583188797 a.u.
* Info * Gradient : 2.555209e-04 a.u. (RMS)
* Info * 3.529752e-04 a.u. (Max)
* Info * Time : 3.14 sec
* Info * Computing energy and gradient...
SCF Gradient Driver Setup
===========================
Gradient Type : Analytical
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -2.970626359728 0.618668391124 0.438040375034
H -2.706861241292 1.341990002223 -0.146536244452
H -2.351880353768 0.697292203170 1.176596378801
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O 0.000008736437 0.000005850552 -0.000000642510
H -0.000002589998 -0.000006771495 0.000005724322
H -0.000007042913 -0.000001012108 -0.000008090081
*** Time spent in gradient calculation: 0.73 sec ***
* Info * Energy : -76.3583190766 a.u.
* Info * Gradient : 1.020413e-05 a.u. (RMS)
* Info * 1.077388e-05 a.u. (Max)
* Info * Time : 1.40 sec
* Info * Geometry optimization completed.
Final Geometry (Angstroms)
============================
Atom Coordinate X Coordinate Y Coordinate Z
O -2.970626359728 0.618668391124 0.438040375034
H -2.706861241292 1.341990002223 -0.146536244452
H -2.351880353768 0.697292203170 1.176596378801
Summary of Geometry Optimization
==================================
Opt.Step Energy (a.u.) Energy Change (a.u.) Displacement (RMS, Max)
-------------------------------------------------------------------------------------
0 -76.357217270774 0.000000000000 0.000e+00 0.000e+00
1 -76.358295953923 -0.001078683149 2.545e-02 3.117e-02
2 -76.358318879731 -0.000022925808 4.812e-03 5.287e-03
3 -76.358319076627 -0.000000196896 3.229e-04 3.954e-04
Statistical Deviation between
Optimized Geometry and Initial Geometry
=========================================
Internal Coord. RMS deviation Max. deviation
-----------------------------------------------------------
Bonds 0.024 Angstrom 0.024 Angstrom
Angles 1.419 degree 1.419 degree
*** Time spent in Optimization Driver: 6.54 sec
* Info * Optimization results written to file: vlx_results_hdf5.h5
File content¶
Depending on the details of calculations, restart files contain different information. A quick overview of the information is readily available.
import h5py
with h5py.File("./vlx_results_hdf5.h5", "r") as f:
for key in f.keys():
print(key)atom_basis_labels_flattened
atom_coordinates
basis_set
dft_func_label
molecular_charge
nuclear_charges
nuclear_repulsion
number_of_alpha_electrons
number_of_atoms
number_of_beta_electrons
opt
potfile_text
scf
spin_multiplicity
Restarting calculations¶
VeloxChem can read a restart file in the beginning of the calculation.
import veloxchem as vlx
rsp_drv = vlx.LinearResponseEigenSolver()
rsp_drv.nstates = 5
rsp_drv.filename = "vlx_results_hdf5"import veloxchem as vlx
scf_drv = vlx.ScfRestrictedDriver()
# specify name of HDF5 file
scf_drv.filename = "vlx_results_hdf5"
opt_drv = vlx.OptimizationDriver(scf_drv)
opt_drv.filename = scf_drv.filename