Solvers¶
We will here describe the inheritance hierarchy for generating solvers, in order to use and extend it properly. The runtime creation of solver objects relies on the Factory Method pattern [GHJV94][Ale01], implemented through the generic Factory class.
PCMSolver¶
-
class
PCMSolver
¶ Abstract Base Class for solvers inheritance hierarchy.
We use the Non-Virtual Interface idiom.
- Author
- Luca Frediani, Roberto Di Remigio
- Date
- 2011, 2015
Subclassed by CPCMSolver, IEFSolver
Public Functions
-
void
buildSystemMatrix
(const Cavity &cavity, const IGreensFunction &gf_i, const IGreensFunction &gf_o)¶ Calculation of the PCM matrix.
- Parameters
cavity
-the cavity to be used
gf_i
-Green’s function inside the cavity
gf_o
-Green’s function outside the cavity
-
Eigen::VectorXd
computeCharge
(const Eigen::VectorXd &potential, int irrep = 0) const¶ Returns the ASC given the MEP and the desired irreducible representation.
- Parameters
potential
-the vector containing the MEP at cavity points
irrep
-the irreducible representation of the MEP and ASC
Protected Functions
-
virtual void
buildSystemMatrix_impl
(const Cavity &cavity, const IGreensFunction &gf_i, const IGreensFunction &gf_o) = 0¶ Calculation of the PCM matrix.
- Parameters
cavity
-the cavity to be used
gf_i
-Green’s function inside the cavity
gf_o
-Green’s function outside the cavity
-
virtual Eigen::VectorXd
computeCharge_impl
(const Eigen::VectorXd &potential, int irrep = 0) const = 0¶ Returns the ASC given the MEP and the desired irreducible representation.
- Parameters
potential
-the vector containing the MEP at cavity points
irrep
-the irreducible representation of the MEP and ASC
IEFSolver¶
-
class
IEFSolver
¶ IEFPCM, collocation-based solver.
- Author
- Luca Frediani, Roberto Di Remigio
- Date
- 2011, 2015, 2016
- Note
- We store the unsymmetrized T^-1R matrix.
Inherits from PCMSolver
Public Functions
-
IEFSolver
(bool symm)¶ Construct solver.
- Parameters
symm
-whether the system matrix has to be symmetrized
-
void
buildAnisotropicMatrix
(const Cavity &cavity, const IGreensFunction &gf_i, const IGreensFunction &gf_o)¶ Builds PCM matrix for an anisotropic environment.
- Parameters
cavity
-the cavity to be used.
gf_i
-Green’s function inside the cavity
gf_o
-Green’s function outside the cavity
-
void
buildIsotropicMatrix
(const Cavity &cavity, const IGreensFunction &gf_i, const IGreensFunction &gf_o)¶ Builds PCM matrix for an isotropic environment.
- Parameters
cavity
-the cavity to be used.
gf_i
-Green’s function inside the cavity
gf_o
-Green’s function outside the cavity
Private Functions
-
virtual void
buildSystemMatrix_impl
(const Cavity &cavity, const IGreensFunction &gf_i, const IGreensFunction &gf_o)¶ Calculation of the PCM matrix.
- Parameters
cavity
-the cavity to be used
gf_i
-Green’s function inside the cavity
gf_o
-Green’s function outside the cavity
-
virtual Eigen::VectorXd
computeCharge_impl
(const Eigen::VectorXd &potential, int irrep = 0) const¶ Returns the ASC given the MEP and the desired irreducible representation.
- Parameters
potential
-the vector containing the MEP at cavity points
irrep
-the irreducible representation of the MEP and ASC
CPCMSolver¶
-
class
CPCMSolver
¶ Solver for conductor-like approximation: C-PCM (COSMO)
- Author
- Roberto Di Remigio
- Date
- 2013, 2016
- Note
- We store the unsymmetrized S matrix and use a robust Cholesky decomposition to solve for the ASC. The ASC is then symmetrized. This avoids computing and storing the inverse explicitly. The S matrix is already scaled by the dielectric factor entering the definition of the conductor model!
Inherits from PCMSolver
Public Functions
-
CPCMSolver
(bool symm, double corr)¶ Construct solver.
- Parameters
symm
-whether the system matrix has to be symmetrized
corr
-factor to correct the conductor results
Private Functions
-
virtual void
buildSystemMatrix_impl
(const Cavity &cavity, const IGreensFunction &gf_i, const IGreensFunction &gf_o)¶ Calculation of the PCM matrix.
- Parameters
cavity
-the cavity to be used
gf_i
-Green’s function inside the cavity
gf_o
-Green’s function outside the cavity
-
virtual Eigen::VectorXd
computeCharge_impl
(const Eigen::VectorXd &potential, int irrep = 0) const¶ Returns the ASC given the MEP and the desired irreducible representation.
- Parameters
potential
-the vector containing the MEP at cavity points
irrep
-the irreducible representation of the MEP and ASC