|
occ
|
Abstract interface for an implicit-solvent contribution to a GFN-xTB SCC. More...
#include <solvation_interface.h>
Public Member Functions | |
| virtual | ~XtbSolvationModel ()=default |
| virtual void | initialize (const Mat3N &positions_bohr, const IVec &atomic_numbers)=0 |
| virtual void | update (const Vec &atomic_charges)=0 |
| virtual const Vec & | atom_potential () const =0 |
| virtual double | energy () const =0 |
| virtual std::string | name () const =0 |
| virtual std::optional< SolvationSurfaces > | surfaces () const |
| Optional per-element decomposition of the latest solvation contribution. | |
| virtual Mat3N | gradient () const |
| Analytical gradient of the solvation energy with respect to atomic positions (Hartree/Bohr, 3 × N_atoms). | |
Abstract interface for an implicit-solvent contribution to a GFN-xTB SCC.
Concrete models (CPCM-X in Phase 7B, SMD in Phase 7C) implement an atom-resolved potential shift folded into the per-shell isotropic V plus a scalar energy term added to the SCC breakdown. The contract is:
initialize(positions, Z) is called once at the top of an SCC, after the engine has built its geometry caches. The model sizes its internal buffers and (re)builds the cavity here.update(atom_charges) is called at the start of every SCC iteration with the input-iter atomic Mulliken charges (length = N_atoms). The model solves its surface response and caches energy + potential.atom_potential() returns the cached per-atom V_solv (Hartree), length = N_atoms. The engine adds V_solv[atom_of(s)] to the per-shell iso V before forming H.energy() returns the cached scalar contribution to scc_energy, Hartree, evaluated against the same atom_charges passed to update().NullSolvationModel below is a no-op implementation used as a gate during Phase 7A — it must not perturb gas-phase numbers.
|
virtualdefault |
|
pure virtual |
Implemented in occ::xtb::CpcmXSolvationModel, occ::xtb::SmdSolvationModel, and occ::xtb::NullSolvationModel.
|
pure virtual |
Implemented in occ::xtb::CpcmXSolvationModel, occ::xtb::SmdSolvationModel, and occ::xtb::NullSolvationModel.
|
inlinevirtual |
Analytical gradient of the solvation energy with respect to atomic positions (Hartree/Bohr, 3 × N_atoms).
Frozen-cavity convention — the cavity points move rigidly with their parent atoms and per-element areas are constant. Concrete models override; the default returns an empty matrix so callers can detect "no gradient available" without surprise.
Reimplemented in occ::xtb::CpcmXSolvationModel, and occ::xtb::SmdSolvationModel.
|
pure virtual |
Implemented in occ::xtb::NullSolvationModel, occ::xtb::CpcmXSolvationModel, and occ::xtb::SmdSolvationModel.
|
pure virtual |
Implemented in occ::xtb::CpcmXSolvationModel, occ::xtb::SmdSolvationModel, and occ::xtb::NullSolvationModel.
|
inlinevirtual |
Optional per-element decomposition of the latest solvation contribution.
Concrete models (CPCM-X, SMD) override; the default returns std::nullopt. Reflects the state at the most recent update(q).
Reimplemented in occ::xtb::CpcmXSolvationModel, and occ::xtb::SmdSolvationModel.
|
pure virtual |
Implemented in occ::xtb::NullSolvationModel, occ::xtb::CpcmXSolvationModel, and occ::xtb::SmdSolvationModel.