Self-Consistent Field Methods
Hartree–Fock methods
Quiqbox supports basic Hartree–Fock methods with various configurations:
Items | Options |
---|---|
HF Types | restricted closed-shell (RHF), unrestricted open-shell (UHF) |
Initial Guesses | core Hamiltonian, generalized Wolfsberg-Helmholtz, superposition of atomic densities (SAD), pre-defined coefficient matrix |
Converging Methods | direct diagonalization, direct inversion in the iterative subspace (DIIS), E-DIIS, A-DIIS, combinations of multiple methods |
DIIS-type Method Solvers | Lagrange multiplier solver, L-BFGS solver |
Basic Hartree–Fock
To run a Hartree–Fock method, the lines of code required in Quiqbox are as simple as below:
julia> nuc = ["H", "H"];
julia> nucCoords = [[-0.7, 0.0, 0.0], [0.7, 0.0, 0.0]];
julia> bs = genBasisFunc.(nucCoords, "STO-3G", nuc) |> flatten;
julia> resRHF = runHF(bs, nuc, nucCoords)
Hartree–Fock (HF) Initialization: •HF Type: RHF •Basis Set Size: 2 •Initial Guess Method: SAD •Initial HF energy E: -1.8310000395 Ha •Initial RMS(FDS-SDF): 1.110223e-16 •Convergence Threshold of E: 1.0e-10 Ha •Convergence Threshold Ratios of (FDS-SDF, D) to E: (50.0, 50.0) Self-Consistent Field (SCF) Iteration: ======================================================================= | Step | E (Ha) | ΔE (Ha) | RMS(FDS-SDF) | RMS(ΔD) |======|===============|===============|===============|=============== |–––––<1>–[:ADIIS] | 1 | -1.8310000395 | 0.0000000000 | 1.110223e-16 | 0.0000000000 |–––––<2>–[:DIIS] | 2 | -1.8310000395 | 0.0000000000 | 1.110223e-16 | 0.0000000000 The SCF iteration of RHF has converged at step 2: |ΔE| → 0.0000000000 Ha, RMS(FDS-SDF) → 1.110223e-16, RMS(ΔD) → 0.0000000000. Hartree–Fock Energy ¦ Nuclear Repulsion ¦ Total Energy -1.8310000395 Ha 0.7142857143 Ha -1.1167143252 Ha Quiqbox.HFfinalVars{Float64, 3, :RHF, 2, 2, 1}(Ehf=-1.831000039, Enn, Ns, nuc, nucCoord, C, D, F, Eo, occu, temp, isConverged, basis)
julia> @show resRHF.Ehf resRHF.C resRHF.Eo resRHF.occu;
resRHF.Ehf = -1.8310000394614825 resRHF.C = ([0.5489340404350301 1.2114640729141275; 0.5489340404350301 -1.2114640729141275],) resRHF.Eo = ([-0.5782029768532932, 0.670267760593301],) resRHF.occu = (("↿⇂", "0"),)
After the SCF procedure, one can also store the result in a MatterByHF
for further data processing such as generating a Molden file.
julia> mol = MatterByHF(resRHF);
Flexible core functions
If the user wants to fine-tune the SCF iteration to achieve better performance, Quiqbox has provided various core types and functions that allow the user to customize the HF methods:
Stand-alone integral functions
Quiqbox also provides efficient native functions for one-electron and two-electron integral calculations.