oqp.library.openqp_dftb
OpenQP runtime adapter for the optional OpenQP-DFTB backend.
Attributes
Classes
Functions
|
Module Contents
- class OpenQPDFTBAdapter(mol)
Make OpenQP-DFTB look like a normal OpenQP energy/gradient provider.
- mol
- config
- dftb
- natom
- nstate
- energy()
Return an OpenQP-style state-energy array and update molecule data.
- reference()
Return the DFTB reference energy in the same shape as SCF reference().
- excitation(_ref_energy=None)
Return DFTB total state energies after a reference-style call.
- gradient(states)
Return an OpenQP-style gradient array indexed by state number.
- states_overlap(xyz_old, xyz_new, mo_old, mo_new, x_old, x_new, *, noca, nocb, multiplicity, tlf_order=2)
Cross-geometry MRSF/SF state overlap via libopenqp_dftb_c. All matrix inputs are FORTRAN-FLAT 1-D arrays (i.e. tag.ravel() of the native-convention tags). Returns (overlap_mo_tag, states_overlap_tag) in the same native tag layout (transpose view of the Fortran matrices).
- soc_matrix(mo, x_singlet, x_triplet, *, noca, nocb)
Raw one-center MRSF SOC matrix (no alpha^2/2) via libopenqp_dftb_c. Inputs are Fortran-flat 1-D arrays; returns (hsoc_re, hsoc_im) as (dim, dim) numpy arrays in the GAMESS state ordering, where the row/column index layout matches the native soc_mrsf convention.
- HA_TO_WAVENUMBER = 219474.6313708
- FINE_STRUCTURE = 0.0072973525693
- dftb_soc(mol)
Standalone SOC driver for method=dftb (mirror of the native compute_soc). Runs the MRSF response for both target multiplicities from the same ROKS reference, builds the one-center SOC matrix, diagonalizes diag((E - e0) * ha2wn) + hsoc * (alpha^2/2 * ha2wn) in numpy, and fills the same OQP:: tags the native soc_mrsf produces (soc_eval in cm^-1 relative to the lowest MCH excitation; soc_hsoc_* raw, without the alpha^2/2 prefactor).