namd_mod Module

@details Faithful port of the surface-hopping numerics from the GAMESS namd.src module (S. Lee), restructured into clean, argument-based modern Fortran so the kernels are unit-testable and free of COMMON-block / dynamic-memory coupling. The physics mirrors the original exactly:

- time-derivative couplings (TDC) from wavefunction overlaps
  between consecutive nuclear steps        [GAMESS NACVFD]
- RK4 propagation of the electronic amplitudes
  i*hbar*\dot{c} = (E - i*sigma) c          [GAMESS PPTDECOE/NDDTCR/NDDTCC]
- cumulative Tully hopping probabilities    [GAMESS FSSHPRST/FSSHPR]
- fewest-switches hop decision + isotropic
  velocity rescaling (energy conservation)  [GAMESS FSSH/FSSHT/RESCALV]
- kinetic energy                            [GAMESS MDQKIN]

Internal-conversion accuracy upgrades, added per a verified literature survey (see session RESEARCH_ic_isc_methods.md) and absent from the GAMESS reference: - energy-based decoherence correction (EDC) — Granucci & Persico, J. Chem. Phys. 126, 134114 (2007); the SHARC default decoherence scheme - trivial / unavoided-crossing detection with diabatic state following, in the spirit of SC-FSSH — Wang & Prezhdo, JPCL 5, 713 (2014)

Planned next (documented, not yet implemented here): - norm-preserving interpolation (NPI) time-derivative couplings (Meek & Levine, JPCL 5, 2351 (2014)): rigorous multistate form is the real antisymmetric matrix logarithm of the Loewdin-orthonormalised step overlap, T = logm(orth(S))/dt, which reduces to the exact 2-state identity T*dt = arcsin(S_10). Will replace namd_state_tdc when wired. - intersystem crossing (ISC) via the SHARC spin-adiabatic representation: diagonalise H = H_MCH + H_SOC, hop on the diagonal states, propagate c_diag = U' . P_MCH . U . c_diag. Requires MRSF Breit-Pauli SOC matrix elements as input.

Deliberate, documented deviations from the original ("the GAMESS code may not be perfect"): * Everything is in consistent atomic units (energies in Hartree, velocities in bohr/atomic-time, masses in electron masses). The original mixed Hartree (FSSH) and kcal/mol (FSSHT, QM/MM) paths; here a single code path is used and the caller converts units once. * The O(nstate^2 * nsub) per-substep probability buffer of FSSHPR is dropped: probabilities are accumulated on the fly, then clamped and row-normalised once — numerically identical to the original sum.


Uses