occ
Loading...
Searching...
No Matches
occ::xtb::CpcmXSolvationModel Class Referencefinal

CPCM-X (xtb-flavoured CPCM) implicit-solvent model. More...

#include <cpcmx.h>

Inheritance diagram for occ::xtb::CpcmXSolvationModel:
[legend]
Collaboration diagram for occ::xtb::CpcmXSolvationModel:
[legend]

Public Member Functions

 CpcmXSolvationModel (CpcmXOptions opts={})
 
void initialize (const Mat3N &positions_bohr, const IVec &atomic_numbers) override
 
void update (const Vec &atomic_charges) override
 
const Vec & atom_potential () const override
 
double energy () const override
 
std::string name () const override
 
std::optional< SolvationSurfaces > surfaces () const override
 Optional per-element decomposition of the latest solvation contribution.
 
Mat3N gradient () const override
 Analytical gradient of the solvation energy with respect to atomic positions (Hartree/Bohr, 3 × N_atoms).
 
size_t num_surface_points () const
 Number of cavity surface elements (post-masking).
 
const occ::solvent::surface::Surface & surface () const
 
const Vec & surface_charges () const
 Surface apparent charge σ at the most recent update().
 
double dielectric () const
 
double f_epsilon () const
 
const occ::scrf::ReactionFieldEngine & engine () const
 Access the underlying engine (for inspection / tests).
 
virtual void update (const Vec &atomic_charges)=0
 
virtual void update (const Vec &atomic_charges, const Mat3N &, const Mat &)
 Update from the atomic charges together with the CAMM atomic dipoles (3 × N) and traceless quadrupoles (6 × N, CammMoments::qp layout), so the anisotropic part of the density polarises the continuum too.
 
- Public Member Functions inherited from occ::xtb::XtbSolvationModel
virtual ~XtbSolvationModel ()=default
 
virtual void set_multipole_damping (const Vec &, double, double)
 Hand the model the solute's own short-range damping radii for the atom→cavity dipole and quadrupole kernels, so a multipolar reaction field treats the CAMM moments the way the rest of the method does.
 
virtual const Mat3N & dipole_potential () const
 Conjugates of the atomic dipoles and quadrupoles at the last update: ∂E_solv/∂μ (3 × N) and ∂E_solv/∂Θ (6 × N, same layout as the input).
 
virtual const Mat & quadrupole_potential () const
 
virtual const Vec & damping_radius_gradient () const
 ∂E_solv/∂R_co per atom, for damping radii that depend on the geometry.
 

Detailed Description

CPCM-X (xtb-flavoured CPCM) implicit-solvent model.

Treats each atom as a point charge of magnitude q_atom (the SCC's converged Mulliken charge) producing an electrostatic potential φ_i = Σ_a q_atom_a / |r_i − R_a| at cavity point i. Solves the COSMO linear system A σ = −f(ε) φ for surface charges σ, then folds back the atom-resolved screening potential V_solv_a = Σ_i σ_i / |R_a − r_i|. The variational solvation energy is E_solv = ½ q · V_solv = ½ σ · φ.

Implementation is a thin adapter over occ::scrf::ReactionFieldEngine (Phase 2). Kept as its own class because the SCC interacts with solvation via the XtbSolvationModel virtual contract; the engine itself is just the shared CPCM/COSMO math.

Constructor & Destructor Documentation

◆ CpcmXSolvationModel()

occ::xtb::CpcmXSolvationModel::CpcmXSolvationModel ( CpcmXOptions  opts = {})
explicit

Member Function Documentation

◆ atom_potential()

const Vec & occ::xtb::CpcmXSolvationModel::atom_potential ( ) const
inlineoverridevirtual

◆ dielectric()

double occ::xtb::CpcmXSolvationModel::dielectric ( ) const
inline

◆ energy()

double occ::xtb::CpcmXSolvationModel::energy ( ) const
inlineoverridevirtual

◆ engine()

const occ::scrf::ReactionFieldEngine & occ::xtb::CpcmXSolvationModel::engine ( ) const
inline

Access the underlying engine (for inspection / tests).

◆ f_epsilon()

double occ::xtb::CpcmXSolvationModel::f_epsilon ( ) const
inline

◆ gradient()

Mat3N occ::xtb::CpcmXSolvationModel::gradient ( ) const
inlineoverridevirtual

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 from occ::xtb::XtbSolvationModel.

◆ initialize()

void occ::xtb::CpcmXSolvationModel::initialize ( const Mat3N &  positions_bohr,
const IVec &  atomic_numbers 
)
overridevirtual

◆ name()

std::string occ::xtb::CpcmXSolvationModel::name ( ) const
overridevirtual

◆ num_surface_points()

size_t occ::xtb::CpcmXSolvationModel::num_surface_points ( ) const
inline

Number of cavity surface elements (post-masking).

May be zero for an empty / pathological input.

◆ surface()

const occ::solvent::surface::Surface & occ::xtb::CpcmXSolvationModel::surface ( ) const
inline

◆ surface_charges()

const Vec & occ::xtb::CpcmXSolvationModel::surface_charges ( ) const
inline

Surface apparent charge σ at the most recent update().

Empty until update() is called.

◆ surfaces()

std::optional< SolvationSurfaces > occ::xtb::CpcmXSolvationModel::surfaces ( ) const
overridevirtual

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 from occ::xtb::XtbSolvationModel.

◆ update() [1/3]

void occ::xtb::CpcmXSolvationModel::update ( const Vec &  atomic_charges)
overridevirtual

◆ update() [2/3]

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

◆ update() [3/3]

virtual void occ::xtb::XtbSolvationModel::update ( const Vec &  atomic_charges,
const Mat3N &  ,
const Mat &   
)
inlinevirtual

Update from the atomic charges together with the CAMM atomic dipoles (3 × N) and traceless quadrupoles (6 × N, CammMoments::qp layout), so the anisotropic part of the density polarises the continuum too.

The default drops them, which leaves charge-only models unchanged.

Reimplemented from occ::xtb::XtbSolvationModel.


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