vibe-qcDocumentation

OMx-SECCM: the OM2/OM3 terms on the cyclic cluster

Status: experimental, issue #1116 (programme #1120). Implementation: cpp/src/semiempirical/seccm/omx.cpp; Python adapter: python/vibeqc/semiempirical/seccm/omx.py; tests: tests/test_omx_seccm_cyclic.py and the OMx nodes of tests/test_ccm_semiempirical.py.

Sources

  • Dral, Wu, Spoerkel, Koslowski, Weber, Steiger, Scholten and Thiel, J. Chem. Theory Comput. 12, 1082 (2016), doi:10.1021/acs.jctc.5b01046 (“Dral 2016”): the OM2/OM3 Hamiltonian, eqs 6-20, and section 2.3 (the Gaussian STO-3G/ECP-3G operands and the uniform Klopman-Ohno scaling of every two-center Coulomb-class integral).

  • Weber and Thiel, Theor. Chem. Acc. 103, 495 (2000), doi:10.1007/s002149900083: the ORT terms (eq 50) and the semiempirical ECP (eqs 60, 63).

  • Kolb and Thiel, J. Comput. Chem. 14, 775 (1993), doi:10.1002/jcc.540140704: the ECP-3G contractions (Table I).

  • Peintinger and Bredow, J. Comput. Chem. 35, 839 (2014), doi:10.1002/jcc.23550 (“PB 2014”): two-center weights (eq 4), the three-center weights over the union of Wigner-Seitz supercells (eqs 11-13), the four-center weights (eq 18) and the cyclic Coulomb and exchange matrices (eqs 21-24). Janetzko et al., J. Chem. Phys. (2008), doi:10.1063/1.2817582 (citation key janetzko_ccm_2008): the earlier three-center weights (PB 2014 eq 10).

  • Bredow, Geudtner and Jug, J. Comput. Chem. 22, 89 (2001): the CCM record construction with Evjen weights 1/n for equidistant images, and the Madelung embedding; Janetzko, Bredow and Jug, J. Chem. Phys. 116, 8994 (2002): its Ewald matrices.

Records and weights

Every atom A owns its Wigner-Seitz supercell WSSC(A): the closest image of every other atom B, with weight x_AB = 1/n when n images are equidistant (PB 2014 eq 4). An atom’s own images never enter its WSSC. A directed record is (A -> B image, w = x_AB, label L); its reverse is (B -> A, -L) with the same weight.

For a two-center orbital pair (mu on A, lam on the B image) the third center C runs over the union WSSC(A) u WSSC(B image) (PB 2014 eq 11), with the eq-13 weight x_muLamC = x_AB (x_AC + x_BC)/2, where x_AC is the weight of this absolute C image in WSSC(A) and x_BC its weight in the translated WSSC(B), zero when absent. For a one-center pair (mu, nu on A), x_muNu = 1 and the union is WSSC(A), so the third-center weight is the record weight w.

Each geometric pair operand (overlap, resonance, local energy, Gaussian pair tensor) is evaluated for the pair “atom X at home, atom C at its image” with the molecular routines and cached by (X, C, label); the reverse pair is its transpose.

Interaction-class table

Term

Equation

Centers

Closure

Weight

Range

One-center U, Gss..Hsp

Dral 2016 eq 6, sec 2.1

A

none (on site)

1

0

Core attraction, full same-center block, f_KO-scaled

eqs 13-14

mu nu on A, core B

two-center, WSSC(A)

w

+-t/2

Resonance beta

eq 17

mu on A, lam on B

two-center, WSSC(A)

w

+-t/2

ORT on the one-center block (F1, F2)

eq 8

mu nu on A, rho on B

eq 13 with x_muNu = 1 (= two-center)

w

+-t/2

ORT on the two-center block (G1, G2)

eq 9

mu on A, lam on B, rho on C

eq 13, union WSSC(A) u WSSC(B)

w (x_AC + x_BC)/2

+-t

OM2/OM3 ECP

Weber 2000 eqs 60/63 (Dral eqs 15-16)

mu nu on A, core alpha on B

eq 13 with x_muNu = 1 (eq 10: w/2)

w

+-t/2

Coulomb J (mu nu on A, lam sig on B)

eq 18

A, B

PB 2014 eq 18 with x_muNu = x_lamSig = 1

w

+-t/2

Exchange K (mu on A, lam on B)

eq 18

A, B

PB 2014 eqs 18, 24 with one-center pairs

w

+-t/2

Core-core repulsion

eq 20

A, B

two-center, half per directed record

w/2

+-t/2

Monopole tail beyond WSSC(A)

(embedding)

A, all images

Madelung, 1-D wire Ewald / 2-D Parry; 3-D refused

q.V/2

infinite

The exchange and Coulomb rows use the supercell density: the density block of atom B serves every image of B, and the A-B density element serves every A-B image pair, as in PB 2014 eqs 19-24.

Checks against PB 2014

  1. What eq 13 weights. PB 2014 introduces eq 13 for the nuclear attraction integral I_muNuC (eqs 12-15), a genuine three-center integral whose orbital pair is the reference. The eq-9 ORT correction and the ECP are of the same type: one orbital pair (the matrix element being corrected) and one third center. The code applies eq 13 to exactly that pair: x_muLam is the record weight of the corrected element, and x_muC, x_lamC are the ownership of the absolute C image in the endpoint WSSCs, image by image (not a unit weight redistributed over the images of C). The eq-8 correction and the ECP correct a one-center element, for which eq 13 reduces to the two-center weight w, exactly the weight of the core attraction of the same record.

  2. One C image on both legs. The eq-9 summand is S_mu,rho beta_rho,lam: both legs refer to the same image of C. The code takes the overlap and resonance of both legs from that one geometric C image. The alternative, multiplying the cyclic matrices S^CCM and beta^CCM (each already WS-folded, PB 2014 eq 5), would pair mu with one image of C and lam with another; it agrees in the molecular limit but adds cross-image products with no three-center interpretation, so it is not used.

  3. Stoichiometric closure. For a third atom C distinct from A and B, its union images carry total weight (1 + 1)/2 = 1, because the images of C in each WSSC sum to 1: each third atom is counted once, as in the molecule and as in the two-center terms of the same record. Further images of A or B enter as third centers with weight (1 - w)/2, which is nonzero only for boundary-tied pairs (w < 1). The 1/4, 3/4 split of the four-site oracle in test_omx_seccm_eq13_weights_each_union_image_from_its_endpoints is this rule.

  4. Range. The union reaches one full translation (+-t), the PB 2014 statement that a consistent three-center treatment needs the cluster translated by +-t. The two-center terms stay within +-t/2.

  5. Consistency of the Coulomb-class terms. Electron-core attraction, electron-electron Coulomb and core-core repulsion of one record share the same weight w and the same f_KO, so a neutral atom pair cancels to its multipole remainder inside every WSSC, the property PB 2014 gives for the stoichiometric WSSC.

Molecular limit

On a trivial topology (one replica, label-zero records of weight 1) every term above is the molecular term: records are molecular pairs and every union weight is 1. The default delegates to nddo::run_omx_v2; the forced cyclic engine (_delegate_molecular_limit=False) reproduces it to rounding (test_forced_cyclic_engine_reproduces_molecular_omx). The cyclic engine calls the public Gaussian routines of the molecular driver (omx_fock.cpp, omx_gaussian_pair.cpp) and keeps private copies of the two energy kernels it needs; its analytic gradient calls the molecular derivative blocks, so the molecular and cyclic gradients share one derivative implementation.

For H2O replicas in a cubic box with two replicas per cell, the per-cell energy differs from the molecular one only by the replica coupling. At 30 bohr the WS-truncated point-charge coupling is 1.0e-4 to 2.3e-4 Ha per cell for q_O = -0.4 to -0.6 e, the converged lattice dipole sum 3e-6 Ha, and the charge/atomic-dipole terms of the pair tensor about 2e-4 Ha. The test bound is 1e-3 Ha at 30 bohr and 3e-4 Ha at 60 bohr, where all terms scale as R^-2.

Long-range closure

madelung=True (1-D, 2-D) uses the PM6-SECCM machinery unchanged (detail::build_seccm_madelung_state, indo::_madelung_potential_ewald): the potential is the Ewald lattice sum of the net charges q_I = Z_core(I) - population(I) minus their WS-internal bare 1/r (MSINDO madelsum.f, SMADEL branch), deposited on the Fock diagonal (ccmfockcl.f). The energy carries 1/2 Tr[P(H+F)] with the deposit plus the core half 1/2 Z.V, so e_madelung = 1/2 q.V and energy = e_electronic + e_core + e_madelung, the PM6-SECCM bookkeeping. The deposit is the derivative of 1/2 q.V with respect to the populations, so the embedded SCF is variational. test_wire_madelung_embedding_matches_point_charge_lattice_sum checks e_madelung against a direct point-charge lattice sum.

The embedding completes the monopole tail only. Inside the WSSC the f_KO-scaled Gaussian integrals carry the full multipole content of the s/p densities; beyond it atomic dipoles and quadrupoles are truncated, which converges in 1-D and 2-D.

Three dimensions are refused, as for PM6-SECCM: the f_KO scaling makes the monopole part of every Coulomb-class operand gamma_AB = 1/sqrt(R^2 + eta_AB^2) with eta_AB = (1/Gss_A + 1/Gss_B)/2, whose remainder gamma - 1/R = -eta_AB^2/(2 R^3) + O(R^-5) has a pair-dependent coefficient; its charge-weighted WS sum grows as ln(R_WS) in 3-D, so the per-cell energy has no thermodynamic limit (seccm_common.h, require_gamma_thermodynamic_limit; former-tracker issues 211, 425, 444). No PM6 3-D scheme exists in this tree. If one lands, OMx adopts it at three places, all isolated in omx.cpp: the 3-D branch of build_seccm_madelung_state (the lattice potential), the removal of the 3-D refusals (C++ and Python), and an OMx-specific remainder kernel built from omx_gamma_k, because the OMx remainder differs from PM6’s multi-term gamma. The deposit, the energy bookkeeping and the closure record stay as they are.

The result records long_range_closure: "molecular", "ws_truncated" (cyclic images without embedding; requires allow_truncated_electrostatics=True and warns), or "madelung_embedded".

SCF

Reading the former cyclic loop gave these defects, each of which can stall or falsely end an SCF on a solid:

  1. The damping window started at max(2, min(64, max_iter/2)), so the path, and possibly the root, depended on the iteration budget (the defect fixed for the molecular driver in #1120 N6).

  2. Convergence was declared on the current density without checking that it was idempotent; inside the damped window the density is a mixture 0.5 D + 0.5 D_new, which can commute with its Fock in a degenerate frontier without being a Slater determinant.

  3. The orbital energies and the HOMO-LUMO gap were those of the DIIS-extrapolated Fock, not the physical one.

  4. No state check: a DIIS stationary point that is a saddle was accepted.

The cyclic SCF now uses the fixed schedule of the molecular driver (plain DIIS on [F, P], 64 damped steps from iteration 64, fresh DIIS from 128; a 32-step 0.7/0.3 damped recovery after a rejected state), an optional virtual-space level shift F + b (1 - D/2), and accepts only the Aufbau projector P of the physical Fock that is close to the iterate (|P - D| < sqrt(conv_tol)) and stationary for its own Fock (|[F(P), P]| < conv_tol, |E(P) - E(D)| < conv_tol); the energy is evaluated at that idempotent P, so its error is second order. The bounded orbital-rotation descent screen of molecular OM2 (om2_descent_seed; Seeger and Pople, J. Chem. Phys. 66, 3045 (1977)) runs for OM2 and OM3, with at most two restarts and never accepting a higher root after a detected descent. Fermi smearing is not exposed: the route requires a positive finite-torus gap, and a Mermin free energy would change the reported energy functional and its finite-difference gradient.

A charge-kernel estimate explains why diamond clusters are delicate without embedding. With a Klopman-Ohno model kernel (eta = 2.2 bohr, U = Gss(C)), the WS-truncated monopole kernel of the 16-atom (2x2x2) diamond cluster has a negative eigenvalue (-0.026 Ha) in the neutral subspace, the sublattice alternation mode; for the 54-atom (3x3x3) cluster that mode is positive (+0.09 Ha). With bare 1/r both are negative (-0.23, -0.08 Ha); MSINDO’s bare 2x2x2 diamond has a saddle there (tests/msindo_seccm_article_systems.py).

Measured with the published operators (WS-truncated, no embedding; per primitive cell of two carbons):

Cluster

Variant

Cold-start state

E (Ha/cell)

Symmetric state

Curvature

2x2x2 (16 C)

OM2

ionic, 7.172 / 0.828 e

-9.69648040

-9.35255602, saddle

-0.187

2x2x2 (16 C)

OM3

ionic, 7.183 / 0.817 e

-9.51373974

-9.17802218, saddle

-0.183

3x3x3 (54 C)

OM2

symmetric, 4 / 4 e

-9.37925285

same state, minimum

+0.064

3x3x3 (54 C)

OM3

symmetric, 4 / 4 e

-9.18664183

same state, minimum

+0.069

The populations are the valence electrons on the two sublattices. Every state is idempotent, gapped (0.72-0.75 Ha ionic, 0.31-0.33 Ha symmetric) and translation-symmetric. The 2x2x2 symmetric state was reached from the inversion-symmetrised density. The curvature (Ha per cell and rad^2) is that of the energy along the occupied-virtual rotation that responds to a staggered sublattice potential. It was evaluated from E(D) at theta = +-0.01 to 0.1 and is constant over that range. The model-kernel estimate therefore has the right sign on both clusters: on the 16-atom cluster the WS-truncated Coulomb closure makes the neutral sublattice-alternation mode unstable, and the SCF falls into an ionic charge-density wave 0.34 Ha per cell below the symmetric state. That is an artefact of the truncated closure, not a property of diamond. The 54-atom cluster is stable and converges to the symmetric state without damping or level shift. A level shift (0.3, 1.0 Ha) does not stop the 2x2x2 cold start from reaching the ionic state; at 1.0 Ha the OM2 run exhausts 600 iterations. The bounded single-orbital descent screen does not detect the collective mode. tests/test_omx_seccm_cyclic.py pins both clusters.

Gradient

run_omx_seccm(..., compute_gradient=True) returns the analytic gradient of the converged per-cell energy with respect to every supercell atom, over the frozen topology (gradient_method="analytic", the default; implementation omx_seccm_gradient_terms in omx.cpp).

  1. No orbital response. The cyclic secular equation is solved in the orthogonal NDDO basis, as in the molecule: the orbitals satisfy C^T C = 1 with a metric that does not depend on the geometry (the overlap enters only the ORT/ECP operators). At the accepted idempotent, stationary P the gradient is therefore the derivative of the energy at fixed P; there is no energy-weighted-density term. The Madelung deposit is the derivative of 1/2 q.V with respect to the populations, so the embedded energy is variational in q as well.

  2. Fixed topology, fixed weights. The record set, every record weight x_ab = 1/n, every eq-13 union weight x_ab (x_aC + x_bC)/2 and the ECP weight belong to the topology, which is held fixed, so no weight derivative enters. Only the record displacements follow the atoms. The result reports how close the geometry is to a topology change: topology_switching_margin (bohr) is the smallest gap, over all atom pairs, between the farthest included image and the nearest excluded one, and topology_tie_spread is the largest spread of the equidistant images that share a fractional weight (zero at an exact reference tie). The gradient is the derivative of the fixed-topology energy, which is the energy only while the margin is positive.

  3. Per-record pair derivatives. Every operand of a record (a home, b at its image) depends on d = R_a - (R_b + T_label). The molecular routine nddo::omx_pair_derivative_blocks forms its derivatives with respect to d (libint first-derivative Gaussian overlap, attraction and pair ERIs; the derivative of f_KO = gamma_K / J_ssss; the eq-17 resonance and eq-10 local energies), which are deposited +g on a and -g on b with the weight the term carries in the energy: w for the attraction, resonance, eq-8 ORT and ECP (Janetzko eq 10: w/2), w/2 for Coulomb and core repulsion (each record of a pair carries half), and w with the per-record exchange product -1/4 P_ml P_ns. These per-vector derivatives are the intermediates a strain derivative will contract with the record displacements.

  4. Three-center legs. An eq-9 term is a product of the legs (a, C) and (b, C); its derivative is the sum of the leg derivatives, each with respect to its own interatomic vector, weighted by w x_C and deposited on a or b and on the C image’s atom. A C image that is an image of a or b gives equal and opposite deposits on one atom.

  5. Embedding. 1/2 q.(dM_eff/dR).q at the converged charges, with the 1-D wire-kernel derivative (ewald_1d.h) and the 2-D CCM deposit (indo::_add_madelung_gradient) that the SCC-DFTB-SECCM gradient uses.

The term energies of omx_seccm_gradient_terms partition the accepted energy; the run refuses a mismatch above 1e-8 Ha. In the exact molecular limit the delegated run returns the molecular analytic gradient.

Verification (standalone build of the OMx translation units against libint, 2026-11-13; OM2 and OM3): every term’s gradient against central differences (h = 1e-4 bohr) of its own fixed-density energy, and the total against warm-started re-converged energies, on a polyethylene chain (three and four replicas, Madelung-embedded, truncated, eq-10), an HF chain (four replicas, embedded), a water sheet (2x2, embedded) and an HF molecular crystal (2x1x1, truncated), all within 1e-9 Ha/bohr per cell; on the 54-atom (3x3x3) diamond cluster (truncated, symmetric state) the directional derivative along a random pattern agrees with re-converged energies to 8e-10 Ha/bohr. The net force vanishes to rounding, and the forced cyclic engine reproduces the molecular analytic gradient in the molecular limit (4e-14 OM2, 3e-11 OM3).

gradient_method="finite_difference" keeps the former central differences as a cross-check: step gradient_fd_step (default 1e-3 bohr), each displaced SCF warm-started from the reference density (initial_density), required to converge and to stay on the reference state (atomic populations within 1e-2 + 25 h electrons, atom-pair density-block spectra within 5e-2 + 25 h, symmetric second difference within 1e-4 Ha per cell).

The route table carries the gradient row: boundary seccm_direct_torus, methods om2/om3, property gradient, status_route = "omx-seccm-gradient-analytic", maturity experimental, execution native.

Strain derivative

run_omx_seccm(..., compute_stress=True) (and the front-door route option compute_stress) returns strain_derivative, W_ab = dE/d eps_ab in Hartree per primitive cell, derivative index first, unsymmetrised, for the homogeneous strain x -> (1 + eps) x of the atoms and the cyclic translations together at the frozen topology. This is the shared contract of the stress design note; the stress, the periodic stress, the pressure and the cell gradient are assembled from W by seccm.cell. Implementation: the same pass of omx_seccm_gradient_terms that forms the gradient (omx.cpp).

  1. What moves. Every geometric operand of the energy depends on one interatomic vector, formed from atom positions and integer image labels: a two-center operand of the record (a -> b, label L) on d_ab = R_a - (R_b + T_L), an eq-9 leg on d_aC = R_a - (R_C + T_K) or d_bC = (R_b + T_L) - (R_C + T_K). The derivative blocks (OMxPairDerivativeBlocks) are taken with respect to exactly these vectors (d = pos_x - pos_c). Under the strain every position and every cyclic translation is multiplied by 1 + eps while the labels stay, so every such vector maps to (1 + eps) d. The record weights, the eq-13 union weights x_ab (x_aC + x_bC)/2, the eq-10 weights and the ECP weight are functions of the labels only and have no strain derivative.

  2. No response term. The secular equation is solved in the orthogonal NDDO basis; its metric is the identity at every geometry and every cell, so the stationary idempotent density needs no orbital response and there is no energy-weighted-density (Pulay) term, as for the gradient. The Madelung deposit makes the embedded energy variational in the charges. Hence W is the derivative of the energy at fixed density.

  3. Two-center terms. A term E_t = sum_rec c_t e_t(d_ab) with the weight c_t of the gradient (w for the attraction, resonance, eq-8 ORT and exchange, w/2 for Coulomb and core repulsion, w or w/2 for the ECP) gives dE_t/d eps_ab = sum_rec c_t (de_t/dd)_a (d_ab)_b, where de_t/dd is the vector the gradient deposits +g on a and -g on b. The ECP and the eq-8 correction act on the one-center block of a, but their operands (the core Gaussian of b, the overlap, resonance and local energies of the pair) are functions of d_ab only, so they are of this form.

  4. Three-center terms. The eq-9 term of the record (a -> b, L) and the union image (C, K) is e = w x_C t(d_aC, d_bC), a product of operands of the leg (a, C) and of the leg (b-image, C) evaluated at the one C image (check 2 above). Both leg vectors are differences of strained points, so

    de/d eps_ab = w x_C [ (dt/dd_aC)_a (d_aC)_b + (dt/dd_bC)_a (d_bC)_b ],
    

    with the image vectors the energy used. In point form it is sum_p (de/dx_p)_a (x_p)_b over the three points R_a, R_b + T_L and R_C + T_K, translation invariant because the three point derivatives sum to zero; the gradient is the other contraction (+g_aC on a, +g_bC on b, -(g_aC + g_bC) on C). When the third center is an image of a or of b (boundary-tied pairs, union weight (1 - w)/2), its leg vector is a pure lattice vector: the two gradient deposits fall on one atom and cancel, but the strain contribution remains. A stress assembled from atomic forces would miss it; on a two-replica polyethylene chain it is about 5e-7 Ha. The local-energy screen is the energy’s, on the same overlaps.

  5. Madelung embedding. E_mad = 1/2 q.V at the converged net charges gives detail::seccm_madelung_strain_derivative(topology, q): the strain derivative of the converged 1-D wire kernel through Euler’s theorem, of the 2-D Parry sum at fixed splitting, and of the -1/|d| SMADEL subtraction, over the Ewald WS set including each atom’s own image (which has no gradient but a strain derivative). The kernels are homogeneous of degree -1, so trace(dE_mad/d eps) = -E_mad.

  6. Dimensions and refusals. One and two dimensions with or without the embedding; three dimensions WS-truncated only, because the 3-D embedding is refused (Long-range closure above), so no stress without its long-range term is ever returned. Fermi smearing is not exposed (SCF section). In the delegated molecular limit every record is a label-zero molecular pair, and W = sum_A g_A R_A^T from the molecular analytic gradient.

  7. Symmetry. At a fixed density a term’s W need not be symmetric: the space-fixed p functions do not rotate with the geometry. The total is symmetric at the stationary density, since a rigid rotation changes the energy at fixed density only through a density variation that the stationary state does not feel to first order; the antisymmetric part is of the order of the SCF residual.

Verification (standalone build of the OMx translation units against libint, 2026-11-13; OM2 and OM3, SCF converged to [F, P] below 1e-11): each term’s W against fourth-order central differences (F = 1 + h e_a e_b^T, h = 1e-3, all nine components) of its own fixed-density energy, and the total against the same stencil of warm-started re-converged energies, on polyethylene (three replicas embedded and truncated, four with eq-10, two truncated and embedded, where the own-image legs enter), the HF chain (four, embedded), the water sheet (2x2, embedded), the HF crystal (2x1x1, truncated) and a triclinic HCN + HOF crystal (2x1x1, truncated, all nine components between 0.2 and 0.6 Ha): totals within 1.8e-10 Ha, terms within 1.7e-10 Ha for term derivatives up to 80 Ha, antisymmetric part below 8e-12 Ha, rotation covariance W(Qx) = Q W Q^T within 1.1e-12 Ha. The molecular limit (delegated and forced cyclic engine) agrees with re-converged molecular energies to 1.4e-11 Ha. The front-door oracle seccm_strain_derivative_fd (second order, h = 1e-4) differs from W by its truncation error, below 1e-7 Ha on these cells. The status row is omx-seccm-stress-analytic.

Elements

OM2/OM3 parameters exist for H, C, N, O and F only (Dral 2016 Tables 1-3), and the ECP-3G tables cover the same elements. OMx-SECCM refuses every other element before the SCF (Python and native). The solids it can treat are networks of these elements (diamond, graphite-like carbon, carbon nitrides) and molecular crystals of H/C/N/O/F molecules. Boron has no OMx parameters, so BN is not available.