tblite
Light-weight tight-binding framework
Loading...
Searching...
No Matches
tblite_solvation_cpcm_dd Module Reference

A modular implementation of COSMO using a domain decomposition linear scaling strategy. More...

Data Types

type  domain_decomposition
 Cosmo calculator. More...
 
type  domain_decomposition_input
 Quantities contained in control file. More...
 

Functions/Subroutines

subroutine, public new_domain_decomposition (self, input, rvdw, wang, grid)
 Initialize data structure.
 
subroutine, public ddupdate (self, xyz)
 
subroutine, public prtsph (self, label, ncol, icol, x)
 Dump an array (nylm, ncol) or just a column.
 
subroutine, public intrhs (self, iat, x, xlm)
 Integrate against spherical harmonics.
 
subroutine, public wghpot (self, phi, g)
 Weigh potential at cavity points by characteristic function "ui".
 
pure subroutine, public hsnorm (self, u, unorm)
 Compute H-norm.
 
pure subroutine, public adjrhs (self, iat, xi, vlm, basloc, vplm, vcos, vsin)
 Compute.
 
pure subroutine, public fdoka (self, iat, sigma, xi, basloc, dbsloc, vplm, vcos, vsin, fx)
 Compute the first part of <S, L^(x)X>
 
pure subroutine, public fdokb (self, iat, sigma, xi, basloc, dbsloc, vplm, vcos, vsin, fx)
 Compute the the second part of <S, L^(x)X>
 
pure subroutine, public fdoga (self, iat, xi, phi, fx)
 Compute the U^(x)\Phi contribution to <S, g^(x)>
 
pure subroutine, public calcv (self, first, iat, pot, sigma, basloc, vplm, vcos, vsin)
 Auxiliary routine for COSMO action.
 
subroutine, public jacobi_diis (self, n, lprint, diis_max, norm, tol, rhs, x, n_iter, ok, matvec, dm1vec, u_norm)
 Jacobi/DIIS solver.
 
subroutine, public lx (self, n, x, y)
 Given a vector x, compute y = Lx, where L is the ddCOSMO matrix.
 
subroutine, public lstarx (self, n, x, y)
 Given a vector x, compute y = L*x, where L* is the adjoint ddCOSMO matrix.
 
pure subroutine, public ldm1x (self, n, x, y)
 Given a vector x, apply the inverse diagonal (block) of the L matrix:
 
real(wp) function, public hnorm (self, n, x)
 Compute the h^-1/2 norm of the increment on each sphere, then take the.
 
subroutine, public solve_cosmo_direct (self, cart, phi, glm, sigma, restart)
 Wrapper for the linear solvers for COSMO equation.
 
subroutine, public solve_cosmo_adjoint (self, psi, sigma, restart, accuracy)
 Wrapper for the linear solvers for adjoint COSMO equation L^* sigma = Psi This routine performs the following operations :
 
subroutine, public get_deriv (self, keps, phi, sigma, s, gradient)
 Sample driver for the calculation of the ddCOSMO gradient.
 
subroutine, public get_zeta (self, keps, s, zeta)
 Compute.
 

Detailed Description

A modular implementation of COSMO using a domain decomposition linear scaling strategy.

Function/Subroutine Documentation

◆ hsnorm()

pure subroutine, public tblite_solvation_cpcm_dd::hsnorm ( type(domain_decomposition), intent(in) self,
real(wp), dimension(:), intent(in) u,
real(wp), intent(inout) unorm )

Compute H-norm.

Parameters
[in]u[nylm]

◆ jacobi_diis()

subroutine, public tblite_solvation_cpcm_dd::jacobi_diis ( type(domain_decomposition), intent(in) self,
integer, intent(in) n,
integer, intent(in) lprint,
integer, intent(in) diis_max,
integer, intent(in) norm,
real(wp), intent(in) tol,
real(wp), dimension(:, :), intent(in) rhs,
real(wp), dimension(:, :), intent(inout), target, contiguous x,
integer, intent(inout) n_iter,
logical, intent(inout) ok,
procedure(lx) matvec,
procedure(ldm1x) dm1vec,
procedure(hnorm), optional u_norm )

Jacobi/DIIS solver.

Parameters
[in]selfInstance of the COSMO model
[in]nInteger, input, size of the matrix
[in]diis_maxInteger, input, number of points to be used for diis extrapolation
[in]normInteger, input, norm to be used to evaluate convergence
[in]lprintInteger, input, printing flag.
[in]tolReal, input, convergence criterion. if norm = 3, convergence is
[in]rhsReal, dimension(n), input, right-hand side of the linear system
[in,out]xReal, dimension(n). In input, a guess of the solution (can be zero).
[in,out]n_iterInteger, in input, the maximum number of iterations. In output,
[in,out]okLogical, output, T if the solver converged, false otherwise.
matvecExternal, subroutine to compute the required matrix-vector multiplication
dm1vecExternal, subroutine to apply the inverse diagonal matrix to a vector.
u_normExternal, optional function to compute the norm of a vector. Format: real(wp) function u_norm(n, x)

◆ solve_cosmo_adjoint()

subroutine, public tblite_solvation_cpcm_dd::solve_cosmo_adjoint ( type(domain_decomposition), intent(in) self,
real(wp), dimension(:, :), intent(in), contiguous psi,
real(wp), dimension(:, :), intent(inout), contiguous sigma,
logical, intent(in) restart,
real(wp), intent(in), optional accuracy )

Wrapper for the linear solvers for adjoint COSMO equation L^* sigma = Psi This routine performs the following operations :

  • allocates memory for the linear solvers
  • computes a guess for the solution (using the inverse diagonal);
  • calls the iterative solver;
    Parameters
    [in]psiThe psi vector. it is used as a right-hand side
    [in,out]sigmaThe solution to the COSMO (adjoint) equations
    [in]restartInitial guess is provided on sigma
    [in]accuracyOverwrite accuracy

◆ solve_cosmo_direct()

subroutine, public tblite_solvation_cpcm_dd::solve_cosmo_direct ( type(domain_decomposition), intent(in) self,
logical, intent(in) cart,
real(wp), dimension(:), intent(in), contiguous phi,
real(wp), dimension(:, :), intent(in), contiguous glm,
real(wp), dimension(:, :), intent(inout), contiguous sigma,
logical, intent(in) restart )

Wrapper for the linear solvers for COSMO equation.

Parameters
[in]carttrue: the right-hand side for the COSMO has to be assembled
[in]phiContains the potential at the external cavity points if cart is true.
[in]glmContains the right-hand side for the COSMO equations if cart is false.
[in,out]sigmaThe solution to the COSMO (adjoint) equations
[in]restartInitial guess is provided on sigma

◆ wghpot()

subroutine, public tblite_solvation_cpcm_dd::wghpot ( type(domain_decomposition), intent(in) self,
real(wp), dimension(:), intent(in) phi,
real(wp), dimension(:, :), intent(out) g )

Weigh potential at cavity points by characteristic function "ui".

Initialize