Workspace Structure
OpenQuantum is a multi-crate Cargo workspace of 11 crates:
crates/
├── common/ # Core data types (Molecule, BasisSet, ScfResult), error types, linalg
├── basis/ # Basis set loading, normalization, ECP parsing, .obs embedded files
├── integral/ # One- and two-electron integrals (MD, SP fast paths, Rys quadrature), ECP, gradients, Hessians
├── symmetry/ # Point group detection, character tables, irrep assignment
├── dft/ # Kohn–Sham DFT: exchange-correlation functionals, grid integration, dispersion
├── solvent/ # Implicit solvent models: PCM-family, ddCOSMO/ddPCM, SMD
├── iooq/ # Input file parsing (section-based format)
├── scf/ # RHF/UHF/ROHF + RKS/UKS solvers, DIIS, Fock builder, CPHF, analytic gradients/Hessians
├── posthf/ # MP2 and CCSD(T) correlation energies
├── geometry/ # BFGS/RFO/IC optimization, IRC, NEB, harmonic frequencies, thermochemistry
└── driver/ # Binary entry point (oquantum), pipeline dispatch, checkpoint
Dependency Graph (acyclic)
common (root)
├─ basis
│ └─ integral ────────────────────────────────────┐
├─ symmetry ─────────────────────────────────────────┤
├─ dft ──────────────────────────────────────────────┤
├─ solvent (depends on common, dft, integral) ───────┤
├─ iooq ─────────────────────────────────────────────┤
├─ geometry ─────────────────────────────────────────┤
│ ▼
└─ scf ── posthf ── driver ──────────────────────────┘
Crate Descriptions
| Crate | Role | Key Exports |
|---|---|---|
common | Root crate: error types, linalg, shared data types | Molecule, Atom, BasisSet, Shell, Primitive, ScfOptions, ScfResult, OneElectronIntegrals, IntegralProvider, ReactionField, CoordinateUnit, OpenQuantumError |
basis | Basis set loading & storage, normalization, ECP parsing | load_basis_set, ecp::load_ecp_library, cartesian_to_pure_tmatrix |
integral | 1e/2e integrals, ECP & gradient integrals, ERI Hessians | compute_one_electron_integrals, TwoElectronIntegrals, DirectScfIntegrals, shell_quartet_eri, shell_quartet_eri_hessian, ecp::build_ecp_matrix_from_molecule |
symmetry | Point group detection, symmetry operations | detect_symmetry, PointGroup, SymmetryInfo |
dft | Kohn–Sham DFT: functionals, grid, XC integration, dispersion | Functionals, functional, FunctionalSpec, MolecularGrid, GridLevel, integrate_xc, build_xc_matrix, build_unrestricted_xc_matrices, dispersion_energy, DispersionModel |
solvent | Implicit solvation: PCM, ddCOSMO/ddPCM, SMD, gradients, Hessians | PcmSolver, DdSolver, SmdCds, build_surface, pcm_matrices, pcm_gradient, pcm_hessian, ddcosmo_gradient |
scf | RHF/UHF/ROHF/RKS/UKS solvers, DIIS, Fock builder, output, checkpoint, CPHF, analytic gradients/Hessians | rhf_scf, uhf_scf, rohf_scf, rks_scf, uks_scf, rks_scf_range_separated, rks_scf_with_reaction_field, uks_scf_with_reaction_field, DiisAccelerator, checkpoint::{save,load} |
posthf | MP2 and CCSD(T) correlation energy | mp2_correlation_energy, ccsd_energy, ccsdt_energy |
iooq | Input file parsing (section-based format) | Route, Method, RunType, parse_molecule, Route::parse |
geometry | BFGS optimization, Berny RFO, GDIIS/GEDIIS, harmonic frequencies, IRC, NEB | optimize, OptimizationResult, frequencies, frequencies_from_hessian, FreqResult |
driver | Binary entrypoint, pipeline dispatch, checkpoint | prepare_scf, run_pipeline |
Commands
| Action | Command |
|---|---|
| Build all | cargo build --release |
| All tests | cargo test |
| Single crate | cargo test -p <name> |
| Run input | cargo run --release --package oquantum -- <input_file> |
| Documentation | cargo doc --no-deps |
Note:
cargo runrequires--package oquantum(or-p oquantum) because the workspace has multiple crates. The binary's name isoquantum.