mod_qm_helper Module

This is an utility module, that is not actually used my openMMpol itself, but can be initialized and used by a QM program interfaced with openMMPol to simplify certain steps of the interface using already well tested code.


Uses

  • module~~mod_qm_helper~~UsesGraph module~mod_qm_helper mod_qm_helper module~mod_topology mod_topology module~mod_qm_helper->module~mod_topology module~mod_mmpol mod_mmpol module~mod_qm_helper->module~mod_mmpol module~mod_memory mod_memory module~mod_qm_helper->module~mod_memory module~mod_nonbonded mod_nonbonded module~mod_qm_helper->module~mod_nonbonded module~mod_topology->module~mod_memory module~mod_adjacency_mat mod_adjacency_mat module~mod_topology->module~mod_adjacency_mat module~mod_mmpol->module~mod_topology module~mod_mmpol->module~mod_memory module~mod_mmpol->module~mod_nonbonded module~mod_mmpol->module~mod_adjacency_mat module~mod_constants mod_constants module~mod_mmpol->module~mod_constants module~mod_io mod_io module~mod_mmpol->module~mod_io module~mod_link_atom mod_link_atom module~mod_mmpol->module~mod_link_atom module~mod_bonded mod_bonded module~mod_mmpol->module~mod_bonded module~mod_electrostatics mod_electrostatics module~mod_mmpol->module~mod_electrostatics module~mod_memory->module~mod_constants module~mod_memory->module~mod_io iso_c_binding iso_c_binding module~mod_memory->iso_c_binding module~mod_nonbonded->module~mod_topology module~mod_nonbonded->module~mod_memory module~mod_nonbonded->module~mod_adjacency_mat module~mod_nonbonded->module~mod_constants module~mod_neighbor_list mod_neighbor_list module~mod_nonbonded->module~mod_neighbor_list module~mod_adjacency_mat->module~mod_memory module~mod_constants->iso_c_binding module~mod_io->module~mod_constants module~mod_link_atom->module~mod_topology module~mod_link_atom->module~mod_memory module~mod_link_atom->module~mod_nonbonded module~mod_link_atom->module~mod_constants module~mod_link_atom->module~mod_io module~mod_link_atom->module~mod_bonded module~mod_utils mod_utils module~mod_link_atom->module~mod_utils module~mod_bonded->module~mod_topology module~mod_bonded->module~mod_memory module~mod_bonded->module~mod_io module~mod_electrostatics->module~mod_topology module~mod_electrostatics->module~mod_memory module~mod_electrostatics->module~mod_adjacency_mat module~mod_electrostatics->module~mod_constants module~mod_electrostatics->module~mod_io module~fmmlib_interface fmmlib_interface module~mod_electrostatics->module~fmmlib_interface module~mod_profiling mod_profiling module~mod_electrostatics->module~mod_profiling module~mod_neighbor_list->module~mod_memory module~mod_neighbor_list->module~mod_adjacency_mat module~mod_neighbor_list->module~mod_io module~mod_utils->module~mod_memory module~mod_utils->module~mod_constants module~fmmlib_interface->module~mod_constants module~mod_tree mod_tree module~fmmlib_interface->module~mod_tree module~mod_ribtree mod_ribtree module~fmmlib_interface->module~mod_ribtree module~mod_harmonics mod_harmonics module~fmmlib_interface->module~mod_harmonics module~mod_fmm_utils mod_fmm_utils module~fmmlib_interface->module~mod_fmm_utils module~mod_fmm mod_fmm module~fmmlib_interface->module~mod_fmm module~mod_octatree mod_octatree module~fmmlib_interface->module~mod_octatree module~mod_profiling->module~mod_memory module~mod_profiling->module~mod_constants module~mod_profiling->module~mod_io module~mod_tree->module~mod_adjacency_mat module~mod_tree->module~mod_constants module~mod_tree->module~mod_fmm_utils module~mod_ribtree->module~mod_constants module~mod_ribtree->module~mod_profiling module~mod_ribtree->module~mod_tree module~mod_ribtree->module~mod_fmm_utils module~mod_harmonics->module~mod_constants module~mod_harmonics->module~mod_fmm_utils module~mod_fmm_utils->module~mod_constants module~mod_fmm->module~mod_constants module~mod_fmm->module~mod_tree module~mod_fmm->module~mod_harmonics module~mod_fmm->module~mod_fmm_utils module~mod_octatree->module~mod_constants module~mod_octatree->module~mod_profiling module~mod_octatree->module~mod_tree module~mod_octatree->module~mod_fmm_utils

Used by


Contents


Derived Types

type, public ::  ommp_qm_helper

Components

Type Visibility Attributes Name Initial
type(ommp_topology_type), public, allocatable :: qm_top

Topology of the QM system

logical(kind=lp), public :: reconnect = .false.

Flag to decide if the topology should be rebuily at each change of geometry.

real(kind=rp), public, allocatable :: qqm(:)

Charges of QM nuclei

logical(kind=lp), public :: E_n2p_done = .false.

Flag for E_n2p

real(kind=rp), public, allocatable :: E_n2p(:,:)

Electric field of nuclei at polarizable sites

logical(kind=lp), public :: G_n2p_done = .false.

Flag for G_n2p

real(kind=rp), public, allocatable :: G_n2p(:,:)

Electric field gradients of nuclei at polarizable sites

logical(kind=lp), public :: E_n2m_done = .false.

Flag for E_n2m

real(kind=rp), public, allocatable :: E_n2m(:,:)

Electric field of nuclei at static sites

logical(kind=lp), public :: G_n2m_done = .false.

Flag for G_n2m

real(kind=rp), public, allocatable :: G_n2m(:,:)

Electric field gradients of nuclei at static sites

logical(kind=lp), public :: H_n2m_done = .false.

Flag for H_n2m

real(kind=rp), public, allocatable :: H_n2m(:,:)

Electric field Hessian of nuclei at static sites

logical(kind=lp), public :: V_m2n_done = .false.

Flag for V_m2n

real(kind=rp), public, allocatable :: V_m2n(:)

Electrostatic potential of MMPol atoms (static) at QM nuclei

logical(kind=lp), public :: E_m2n_done = .false.

Flag for E_m2n

real(kind=rp), public, allocatable :: E_m2n(:,:)

Electrostatic potential of MMPol atoms (static) at QM nuclei

logical(kind=lp), public :: V_p2n_done = .false.

Flag for V_p2n

real(kind=rp), public, allocatable :: V_p2n(:)

Electrostatic potential of MMPol atoms (polarizable) at QM nuclei

logical(kind=lp), public :: V_pp2n_done = .false.

Flag for V_pp2n

logical(kind=lp), public :: V_pp2n_req = .false.

Flag to enable the computation of V_pp2n, this is only needed in some wired cases like when using qm_helper as driver for DFTB

real(kind=rp), public, allocatable :: V_pp2n(:)

Electrostatic potential of MMPol atoms (polarizable, AMOEBA P dipoles) at QM nuclei

logical(kind=lp), public :: E_p2n_done = .false.

Flag for E_p2n

real(kind=rp), public, allocatable :: E_p2n(:,:)

Electrostatic potential of MMPol atoms (polarizable) at QM nuclei

logical(kind=lp), public :: use_nonbonded = .false.

Flag for using QM nonbonded terms

type(ommp_nonbonded_type), public, allocatable :: qm_vdw

Structure to store VdW parameter for QM atoms


Subroutines

public subroutine qm_helper_init(qm, qmat, cqm, qqm, zqm)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm

ommp_qm_helper object to be initialized

integer(kind=ip), intent(in) :: qmat

Number of QM atoms

real(kind=rp), intent(in) :: cqm(:,:)

Coordinates of QM atoms

real(kind=rp), intent(in) :: qqm(:)

Nuclear charges of QM atoms

integer(kind=ip), intent(in) :: zqm(:)

Atomic number of QM atoms

public subroutine qm_helper_set_attype(qm, attype)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm
integer(kind=ip), intent(in) :: attype(qm%qm_top%mm_atoms)

public subroutine qm_helper_update_coord(qm, cnew, reconnect_in, linkatoms)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm

ommp_qm_helper object to be initialized

real(kind=rp), intent(in) :: cnew(3,qm%qm_top%mm_atoms)

Coordinates of QM atoms

logical(kind=lp), intent(in), optional :: reconnect_in

Flag to rebuil connectivity

integer(kind=ip), intent(in), optional :: linkatoms(:)

Atoms that should be considered link atoms

public subroutine qm_helper_init_vdw(qm, eps, rad, fac, vdw_type, radius_rule, radius_size, radius_type, epsrule)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm
real(kind=rp), intent(in) :: eps(qm%qm_top%mm_atoms)
real(kind=rp), intent(in) :: rad(qm%qm_top%mm_atoms)
real(kind=rp), intent(in) :: fac(qm%qm_top%mm_atoms)
character(len=*) :: vdw_type
character(len=*) :: radius_rule
character(len=*) :: radius_size
character(len=*) :: radius_type
character(len=*) :: epsrule

public subroutine qm_helper_init_vdw_prm(qm, prmfile)

Assign vdw parameters of the QM part from attype and prm file

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm
character(len=*), intent(in) :: prmfile

public subroutine qm_helper_vdw_energy(qm, mm, V)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qm
type(ommp_system), intent(inout) :: mm
real(kind=rp), intent(inout) :: V

public subroutine qm_helper_vdw_geomgrad(qm, mm, qmg, mmg)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qm
type(ommp_system), intent(inout) :: mm
real(kind=rp), intent(inout) :: qmg(3,qm%qm_top%mm_atoms)
real(kind=rp), intent(inout) :: mmg(3,mm%top%mm_atoms)

public subroutine qm_helper_link_atom_geomgrad(qm, mm, qmg, mmg, original_qmg)

Computes the missing gradients for QM/MM linkatoms that is bonded terms on QM atoms, LA forces projection on QM and MM atoms. To obtain the correct forces in output, qmg should already contain the QM forces, so that LA forces could be projected on QM and MM force vectors

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qm
type(ommp_system), intent(inout) :: mm
real(kind=rp), intent(inout) :: qmg(3,qm%qm_top%mm_atoms)
real(kind=rp), intent(inout) :: mmg(3,mm%top%mm_atoms)
real(kind=rp), intent(in) :: original_qmg(3,qm%qm_top%mm_atoms)

public subroutine qm_helper_terminate(qm)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm

public subroutine electrostatic_for_ene(system, qm)

Computes the electrostatic quantities (that means nuclear-MM
interaction terms) needed to perform an energy calculation. Computes: (1) EF of nuclei at polarizable sites (2) V of the whole MM system at QM sites

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(in) :: system
type(ommp_qm_helper), intent(inout) :: qm

public subroutine electrostatic_for_grad(system, qm)

Computes the electrostatic quantities (that means nuclear-MM
interaction terms) needed to perform a gradient calculation. Computes: (1) GEF on nuclei at polarizable sites (2) EF, GEF, HEF of nuclei at static sites (3) EF of whole MM system at QM sites

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(in) :: system
type(ommp_qm_helper), intent(inout) :: qm