ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
ddx_legacy Module Reference

Routines which are only used by the tests and should not be used by external software. More...

Functions/Subroutines

subroutine mkrhs (params, constants, workspace, phi_flag, phi_cav, grad_flag, gradphi_cav, hessian_flag, hessianphi_cav, psi, charges)
 Compute potential, its gradient and hessian in cavity points. More...
 
subroutine ddsolve_legacy (ddx_data, state, phi_cav, e_cav, hessianphi_cav, psi, tol, esolv, force, ddx_error)
 Main solver routine. More...
 
subroutine ddcosmo (params, constants, workspace, state, phi_cav, psi, e_cav, tol, esolv, force, ddx_error)
 ddCOSMO solver More...
 
subroutine ddpcm (params, constants, workspace, state, phi_cav, psi, e_cav, tol, esolv, force, ddx_error)
 ddPCM solver More...
 
subroutine ddlpb (params, constants, workspace, state, phi_cav, e_cav, psi, tol, esolv, hessianphi_cav, force, ddx_error)
 ddLPB solver More...
 

Detailed Description

Routines which are only used by the tests and should not be used by external software.

Function/Subroutine Documentation

◆ mkrhs()

subroutine ddx_legacy::mkrhs ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
integer, intent(in)  phi_flag,
real(dp), dimension(constants % ncav), intent(out)  phi_cav,
integer, intent(in)  grad_flag,
real(dp), dimension(3, constants % ncav), intent(out)  gradphi_cav,
integer, intent(in)  hessian_flag,
real(dp), dimension(3, 3, constants % ncav), intent(out)  hessianphi_cav,
real(dp), dimension(constants % nbasis, params % nsph), intent(out)  psi,
real(dp), dimension(params % nsph), intent(in)  charges 
)

Compute potential, its gradient and hessian in cavity points.

If ddx_data is FMM-ready then approximate output is computed by the FMM.

Parameters
[in]paramsparameters data structure
[in]constantsconstants data structure
[in]worskpacetemporary arrays data structure
[in]phi_flag1 if need to produce output potential
[out]phi_cavPotential at cavity points. Referenced only if phi_flag=1
[in]grad_flag1 if need to produce gradient of potential
[out]gradphi_cavPotential at cavity points. Referenced only if grad_flag=1
[in]hessian_flag1 if need to produce hessian of potential
[out]hessianphi_cavPotential at cavity points. Referenced only if hessian_flag=1

Definition at line 25 of file ddx_legacy.f90.

◆ ddsolve_legacy()

subroutine ddx_legacy::ddsolve_legacy ( type(ddx_type), intent(inout)  ddx_data,
type(ddx_state_type), intent(inout)  state,
real(dp), dimension(ddx_data % constants % ncav), intent(in)  phi_cav,
real(dp), dimension(3, ddx_data % constants % ncav), intent(in)  e_cav,
real(dp), dimension(3, ddx_data % constants % ncav), intent(in)  hessianphi_cav,
real(dp), dimension(ddx_data % constants % nbasis, ddx_data % params % nsph), intent(in)  psi,
real(dp), intent(in)  tol,
real(dp), intent(out)  esolv,
real(dp), dimension(3, ddx_data % params % nsph), intent(out)  force,
type(ddx_error_type), intent(inout)  ddx_error 
)

Main solver routine.

Solves the problem within COSMO model using a domain decomposition approach.

Parameters
[in]ddx_dataddX object with all input information
[in]phi_cavPotential at cavity points
[in]e_cavGradient of the eletric potential at cavity points
[in]hessianphi_cavHessian of the eletric potential at cavity points
[in,out]stateddx state (contains RHSs and solutions)
[in]psiRHS of the adjoint problem
[in]tol
[out]esolvSolvation energy
[out]forceAnalytical forces
[in,out]ddx_errorddX error

Definition at line 285 of file ddx_legacy.f90.

◆ ddlpb()

subroutine ddx_legacy::ddlpb ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(inout)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
real(dp), dimension(constants % ncav), intent(in)  phi_cav,
real(dp), dimension(3, constants % ncav), intent(in)  e_cav,
real(dp), dimension( constants % nbasis, params % nsph), intent(in)  psi,
real(dp), intent(in)  tol,
real(dp), intent(out)  esolv,
real(dp), dimension(3, 3, constants % ncav), intent(in), optional  hessianphi_cav,
real(dp), dimension(3, params % nsph), intent(out), optional  force,
type(ddx_error_type), intent(inout)  ddx_error 
)

ddLPB solver

Solves the LPB problem using a domain decomposition approach.

Parameters
[in]paramsUser specified parameters
[in]constantsPrecomputed constants
[in,out]workspacePreallocated workspaces
[in,out]stateddx state (contains solutions and RHSs)
[in]phi_cavPotential at cavity points, size (ncav) @params[in] e_cav: Electric field at cavity points, size (3, ncav)
[in]psiRepresentation of the solute potential in spherical harmonics, size (nbasis, nsph)
[in]tolTolerance for the linear system solver
[out]esolvSolvation energy
[out]forceSolvation contribution to the forces
[in,out]ddx_errorddX error

Definition at line 499 of file ddx_legacy.f90.