occ
Loading...
Searching...
No Matches
occ::xtb::XtbSolvationModel Class Referenceabstract

Abstract interface for an implicit-solvent contribution to a GFN-xTB SCC. More...

#include <solvation_interface.h>

Inheritance diagram for occ::xtb::XtbSolvationModel:
[legend]

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 Vecatom_potential () const =0
 
virtual double energy () const =0
 
virtual std::string name () const =0
 
virtual std::optional< SolvationSurfacessurfaces () 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).
 

Detailed Description

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.

Constructor & Destructor Documentation

◆ ~XtbSolvationModel()

virtual occ::xtb::XtbSolvationModel::~XtbSolvationModel ( )
virtualdefault

Member Function Documentation

◆ atom_potential()

virtual const Vec & occ::xtb::XtbSolvationModel::atom_potential ( ) const
pure virtual

◆ energy()

virtual double occ::xtb::XtbSolvationModel::energy ( ) const
pure virtual

◆ gradient()

virtual Mat3N occ::xtb::XtbSolvationModel::gradient ( ) const
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.

◆ initialize()

virtual void occ::xtb::XtbSolvationModel::initialize ( const Mat3N positions_bohr,
const IVec atomic_numbers 
)
pure virtual

◆ name()

virtual std::string occ::xtb::XtbSolvationModel::name ( ) const
pure virtual

◆ surfaces()

virtual std::optional< SolvationSurfaces > occ::xtb::XtbSolvationModel::surfaces ( ) const
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.

◆ update()

virtual void occ::xtb::XtbSolvationModel::update ( const Vec atomic_charges)
pure virtual

The documentation for this class was generated from the following file: