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 Vecatom_potential () const override
 
double energy () const override
 
std::string name () const override
 
std::optional< SolvationSurfacessurfaces () 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::Surfacesurface () const
 
const Vecsurface_charges () const
 Surface apparent charge σ at the most recent update().
 
double dielectric () const
 
double f_epsilon () const
 
const occ::scrf::ReactionFieldEngineengine () const
 Access the underlying engine (for inspection / tests).
 
- Public Member Functions inherited from occ::xtb::XtbSolvationModel
virtual ~XtbSolvationModel ()=default
 

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()

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

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