Skip to content

ECCE-QM: geometry optimisation, frequencies, size limits #248

Closed

Description

@ohlincha

ECCE-QM, the built-in Hartree–Fock/DFT engine (since 9.0.0-alpha.8), computes energies, orbitals, Mulliken charges and the dipole moment at a fixed geometry. Planned next steps, in order:

1. Geometry optimisation

  • Analytic nuclear gradients for RHF/UHF/ROHF and the supported functionals (SVWN, PBE, B3LYP, PBE0). This includes the grid-weight contribution, or a grid fine enough that it can be neglected; to be decided by comparison.
  • An optimiser in internal or redundant coordinates (BFGS with a line search, or RFO) with the usual convergence criteria.
  • Results go to the Builder's existing geometry trace, so steps can be played back and an energy plot shown.
  • Calculation Editor: run type "Geometry".
  • Validation against ORCA: final geometries and energies for the test set (H2O, NH3, CH4, CO, N2, O2 triplet, HF), within agreed tolerances.

2. Vibrational frequencies

  • Hessian by finite differences of analytic gradients first. It is simpler and adequate for small molecules; an analytic Hessian can come later if needed.
  • Harmonic frequencies and normal modes, with IR intensities from dipole derivatives.
  • Raman activities from polarisability derivatives. This needs the static polarisability, from coupled-perturbed HF/KS or finite electric fields, differentiated along the modes. Depolarisation ratios are shown in the spectrum viewer's Raman pane.
  • Output in the form the Builder's vibration panel and spectrum viewer already read.
  • Validation against ORCA frequencies and intensities.

3. Size limits from benchmarks

  • Time single points, gradients and frequency runs on typical laptops (recent and older; Windows, macOS, Linux) for a range of molecules and the five basis sets.
  • From that, set the largest number of atoms or basis functions the Calculation Editor accepts for ECCE-QM, or warns about, so a run does not appear to hang.
  • Record the benchmark table in the help.
  • Known factors to measure:
    • two-electron integrals are held in memory (about N⁴ bytes for N basis functions; the program refuses above a fixed 12 GB), so the cap should follow the machine's memory;
    • integrals and the XC grid use OpenMP threads, but the J/K build per SCF cycle is serial;
    • the macOS build has no OpenMP (Apple clang without libomp), so it runs on one core;
    • an integral-direct mode would be needed beyond about 250–300 functions.

Later

  • Defining parts of a calculation by hand for teaching quantum chemistry:
    • a user-specified basis, initial guess or orbital occupation;
    • a user-defined exchange–correlation functional, for example a hybrid given as the fractions of exact (HF) exchange, Slater/B88 exchange and VWN/LYP/PBE correlation (B3LYP- or PBE0-type mixtures), built on libxc's components;
    • step-by-step SCF output.

Activity

  1. ohlincha commented on Oct 11, 2026

    @ohlincha
    CollaboratorAuthor

    Part 1, geometry optimisation, is on main (69d9a86, a4f033f, 9d1bb37):

    • Analytic gradients for RHF/UHF/ROHF and SVWN, PBE, B3LYP and PBE0 (restricted, unrestricted, restricted-open). The DFT grid-weight derivative is neglected. Against central differences (6-31G*): HF ≤ 1.4e-8 Eh/bohr, DFT ≤ 1.1e-6 on the default grid (99×590).
    • Cartesian BFGS from a Lindh model Hessian, rational-function steps with translation and rotation removed, ORCA Opt/TightOpt criteria.
    • Against ORCA 6.1.1 (6-31G*, HF and B3LYP; H2O, NH3, CH4, CO, N2, HF, O2 triplet): bond lengths within 1.4e-4 Å, angles within 0.007°, HF energies within 1.1e-8 Eh. B3LYP energies are within 1.5e-6 Eh; the same difference is seen at ORCA's own final geometry on either grid, so it does not come from the optimisation. Step counts are similar to ORCA's, up to 2-3 more for CO and N2. ORCA 6.1.1 cannot optimise ROHF/ROKS, so the O2 restricted-open reference is a fit to ORCA single points.
    • Calculation Editor run types Energy, Gradient and Geometry; the steps go to the geometry trace and the energy plot (GEOMTRACE, TEVEC, EGRAD).
      Not yet checked: the trace in the Builder in a real run, and the Windows/macOS clients. Next: frequencies and IR intensities.
  2. ohlincha commented on Oct 11, 2026

    @ohlincha
    CollaboratorAuthor

    Part 2, frequencies, is on main (7380b04, b8c57df, d0c4f15, edfb86b, 53d1979):

    • Hessian by central differences of the analytic gradient (0.005 bohr, 6N gradients; each displaced SCF starts from the reference orbitals); translations and rotations projected out (3N−5 for linear molecules); IR intensities in km/mol from the dipole derivatives of the same points; RRHO thermochemistry at 298.15 K, 1 atm (ZPE, thermal energy, H, T·S, G), symmetry number found from the geometry.
    • Run types Vibration and GeoVib in the Calculation Editor (named as for ORCA); frequencies, IR spectrum, normal modes and thermochemistry reach the Builder through the same keys as ORCA's. Molden file carries the modes.
    • Against ORCA 6.1.1 (HF and B3LYP/6-31G*; H2O, NH3, CH4, CO, N2, HF, O2 triplet UHF/UKS; ORCA with QuasiRRHO off): frequencies within 0.83 cm⁻¹, IR within 0.07 km/mol, ZPE within 5e-6 Eh, G within 7e-6 Eh. ORCA has no ROHF Hessian; the O2 ROHF frequency agrees with a fit to ECCE-QM's own energies to 0.05 cm⁻¹.
    • Each SCF of an optimisation now starts from the previous step's orbitals.
    • Rough timings (6-31G*, shared 8-core machine): water B3LYP frequencies 19 s, ethanol B3LYP 4 min, benzene B3LYP 23 min. Proposed warnings (not blocks): before a frequency run when N²·nbf > 5000 (DFT) or 15000 (HF); before any run above 25 atoms or 150 basis functions (memory ≈ 4 GB at 250).
      Not yet: the size warning in the editor, progress output during a long frequency run, Raman.
  3. ohlincha commented on Oct 12, 2026

    @ohlincha
    CollaboratorAuthor

    In 9.0.0: integral screening and a pruned DFT grid make DFT 2–3.4 times faster with unchanged results; timings are in the help (Size and speed). Raman and an analytic Hessian remain.

  4. ohlincha commented on Oct 13, 2026

    @ohlincha
    CollaboratorAuthor

    Raman: plan

    ECCE already shows Raman data from ORCA (activities and depolarisation ratios as VIBRAM/VIBRAMDEPOL, in the vibration panel and the spectrum viewer's Raman pane) and draws a polarisability as an ellipsoid. ECCE-QM has to compute and print these; the display needs no new work.

    Theory. Raman activity of mode k: S_k = 45 a'_k² + 7 γ'_k² (Å⁴/amu), with a' and γ' the isotropic and anisotropic invariants of ∂α/∂Q_k; depolarisation ratio ρ_k = 3γ'²/(45a'² + 4γ'²). ∂α/∂Q_k comes from ∂α/∂x (Cartesian) and the normal modes ECCE-QM already has.

    Stages

    1. Static polarisability α at one geometry, by finite field: an electric-field term −F·μ added to the core Hamiltonian (dipole integrals exist), α_ij = [μ_i(+F_j) − μ_i(−F_j)] / 2F, six extra SCFs started from the field-free orbitals. RHF/UHF/ROHF and all supported functionals. Printed as a tensor and read into ECCE's polarisability property (ellipsoid). Useful by itself.
    2. Raman activities: α at each displaced geometry the frequency run already computes (6N points), central differences give ∂α/∂x, projected onto the normal modes; printed in the form ecceqm.desc reads as VIBRAM/VIBRAMDEPOL. A "Raman activities" tick box for run types Vibration and GeoVib. Cost about 7× the frequency run (water B3LYP/6-31G*: roughly 2 min); the existing size warning is extended.
    3. Analytic α by coupled-perturbed HF/KS (three response equations per geometry; the XC kernel from libxc's fxc), replacing the six field SCFs per point. Only if stage 2 is too slow for the teaching set.

    Validation against ORCA 6.1.1 (%elprop Polar 1, NumFreq with Raman) and NWChem (property; polarizability, raman) on H2O, NH3, CH4, CO, N2, HF at HF and B3LYP/6-31G*: α components, Raman activities and depolarisation ratios, with tolerances set from the field step (finite-field α is accurate to about 1e-4 a.u. at F = 0.001 a.u.).

  5. ohlincha commented on Oct 14, 2026

    @ohlincha
    CollaboratorAuthor

    ECCE-QM in 9.1.0 computes static polarisabilities and Raman activities with depolarisation ratios (agreement with ORCA 6.1.1 in the release notes), adds 6-31G, 6-31+G*, 6-311G*, aug-cc-pVDZ and cc-pVTZ, and runs the displaced geometries of a frequency run side by side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions