ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
Fortran interface: ddcosmo

Exposed ddcosmo modules in the Fortran API. More...

Functions/Subroutines

subroutine ddx_cosmo::cosmo_energy (constants, state, esolv, ddx_error)
 Compute the ddCOSMO energy. More...
 
subroutine ddx_cosmo::cosmo_setup (params, constants, workspace, state, phi_cav, psi, ddx_error)
 Given the potential at the cavity points, assemble the RHS for ddCOSMO or for ddPCM. More...
 
subroutine ddx_cosmo::cosmo_guess (params, constants, workspace, state, ddx_error)
 Do a guess for the primal ddCOSMO linear system. More...
 
subroutine ddx_cosmo::cosmo_guess_adjoint (params, constants, workspace, state, ddx_error)
 Do a guess for the adjoint ddCOSMO linear system. More...
 
subroutine ddx_cosmo::cosmo_solve (params, constants, workspace, state, tol, ddx_error)
 Solve the primal ddCOSMO linear system. More...
 
subroutine ddx_cosmo::cosmo_solve_adjoint (params, constants, workspace, state, tol, ddx_error)
 Solve the adjoint ddCOSMO linear system. More...
 
subroutine ddx_cosmo::cosmo_solvation_force_terms (params, constants, workspace, state, e_cav, force, ddx_error)
 Compute the solvation term of the forces (solute aspecific). This must be summed to the solute specific term to get the full forces. More...
 
subroutine ddx_legacy::ddcosmo (params, constants, workspace, state, phi_cav, psi, e_cav, tol, esolv, force, ddx_error)
 ddCOSMO solver More...
 

Detailed Description

Exposed ddcosmo modules in the Fortran API.

Function/Subroutine Documentation

◆ cosmo_energy()

subroutine ddx_cosmo::cosmo_energy ( type(ddx_constants_type), intent(in)  constants,
type(ddx_state_type), intent(in)  state,
real(dp), intent(out)  esolv,
type(ddx_error_type), intent(inout)  ddx_error 
)

Compute the ddCOSMO energy.

Parameters
[in]constantsPrecomputed constants
[in]stateddx state (contains solutions and RHSs)
[out]esolvresulting energy
[in,out]ddx_errorddX error

Definition at line 32 of file ddx_cosmo.f90.

◆ cosmo_setup()

subroutine ddx_cosmo::cosmo_setup ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  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(constants % nbasis, params % nsph), intent(in)  psi,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given the potential at the cavity points, assemble the RHS for ddCOSMO or for ddPCM.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in,out]stateddx state
[in]phi_cavelectrostatic potential at the cavity points
[in]psirepresentation of the solute density
[in,out]ddx_errorddX error

Definition at line 58 of file ddx_cosmo.f90.

◆ cosmo_guess()

subroutine ddx_cosmo::cosmo_guess ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
type(ddx_error_type), intent(inout)  ddx_error 
)

Do a guess for the primal ddCOSMO linear system.

Parameters
[in]paramsUser specified parameters
[in]constantsPrecomputed constants
[in,out]workspacePreallocated workspaces
[in,out]stateddx state (contains solutions and RHSs)
[in,out]ddx_errorddX error

Definition at line 87 of file ddx_cosmo.f90.

◆ cosmo_guess_adjoint()

subroutine ddx_cosmo::cosmo_guess_adjoint ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
type(ddx_error_type), intent(inout)  ddx_error 
)

Do a guess for the adjoint ddCOSMO linear system.

Parameters
[in]paramsUser specified parameters
[in]constantsPrecomputed constants
[in,out]workspacePreallocated workspaces
[in,out]stateddx state (contains solutions and RHSs)
[in,out]ddx_errorddX error

Definition at line 109 of file ddx_cosmo.f90.

◆ cosmo_solve()

subroutine ddx_cosmo::cosmo_solve ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
real(dp), intent(in)  tol,
type(ddx_error_type), intent(inout)  ddx_error 
)

Solve the primal ddCOSMO linear system.

Parameters
[in]paramsUser specified parameters
[in]constantsPrecomputed constants
[in,out]workspacePreallocated workspaces
[in,out]stateddx state (contains solutions and RHSs)
[in]tolTolerance for the linear system solver
[in,out]ddx_errorddX error

Definition at line 132 of file ddx_cosmo.f90.

◆ cosmo_solve_adjoint()

subroutine ddx_cosmo::cosmo_solve_adjoint ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
real(dp), intent(in)  tol,
type(ddx_error_type), intent(inout)  ddx_error 
)

Solve the adjoint ddCOSMO linear system.

Parameters
[in]paramsUser specified parameters
[in]constantsPrecomputed constants
[in,out]workspacePreallocated workspaces
[in,out]stateddx state (contains solutions and RHSs)
[in]tolTolerance for the linear system solver
[in,out]ddx_errorddX error

Definition at line 163 of file ddx_cosmo.f90.

◆ cosmo_solvation_force_terms()

subroutine ddx_cosmo::cosmo_solvation_force_terms ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
real(dp), dimension(3, constants % ncav), intent(in)  e_cav,
real(dp), dimension(3, params % nsph), intent(inout)  force,
type(ddx_error_type), intent(inout)  ddx_error 
)

Compute the solvation term of the forces (solute aspecific). This must be summed to the solute specific term to get the full forces.

Parameters
[in]paramsUser specified parameters
[in]constantsPrecomputed constants
[in,out]workspacePreallocated workspaces
[in,out]stateddx state (contains solutions and RHSs)
[in]e_cavelectric field, size (3, ncav)
[in,out]forceforce term
[in,out]ddx_errorddX error

Definition at line 201 of file ddx_cosmo.f90.

◆ ddcosmo()

subroutine ddx_legacy::ddcosmo ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  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(constants % nbasis, params % nsph), intent(in)  psi,
real(dp), dimension(3, constants % ncav), intent(in)  e_cav,
real(dp), intent(in)  tol,
real(dp), intent(out)  esolv,
real(dp), dimension(3, params % nsph), intent(out), optional  force,
type(ddx_error_type), intent(inout)  ddx_error 
)

ddCOSMO solver

Solves the problem within COSMO model 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)
[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 342 of file ddx_legacy.f90.