mod_electrostatics Module

TODO Check the signs in electrostatic elemental functions TODO [OPT] Use Laplace equation to simplify the calculations: TODO 1. Egrd(zz) = -(Egrd(xx) + Egrd(yy)) TODO 2. EHes(zzz) = -(EHes(xxz) + EHes(yyz)) TODO 3. EHes(zzx) = -(EHes(xxx) + EHes(yyx)) TODO 4. EHes(zzy) = -(EHes(xxy) + EHes(yyy)) TODO [OPT] Fundamental electrostatic functions should be pure/elemental TODO [BUG] Handling of flags gg


Uses

  • module~~mod_electrostatics~~UsesGraph module~mod_electrostatics mod_electrostatics module~mod_memory mod_memory module~mod_electrostatics->module~mod_memory module~mod_profiling mod_profiling module~mod_electrostatics->module~mod_profiling module~mod_constants mod_constants module~mod_electrostatics->module~mod_constants module~mod_io mod_io module~mod_electrostatics->module~mod_io module~mod_topology mod_topology module~mod_electrostatics->module~mod_topology module~mod_adjacency_mat mod_adjacency_mat module~mod_electrostatics->module~mod_adjacency_mat 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_profiling->module~mod_memory module~mod_profiling->module~mod_constants module~mod_profiling->module~mod_io module~mod_constants->iso_c_binding module~mod_io->module~mod_constants module~mod_topology->module~mod_memory module~mod_topology->module~mod_adjacency_mat module~mod_adjacency_mat->module~mod_memory

Used by

  • module~~mod_electrostatics~~UsedByGraph module~mod_electrostatics mod_electrostatics module~mod_prm mod_prm module~mod_prm->module~mod_electrostatics proc~ommp_set_external_field ommp_set_external_field proc~ommp_set_external_field->module~mod_electrostatics module~mod_polarization mod_polarization proc~ommp_set_external_field->module~mod_polarization proc~ommp_potential_mmpol2ext ommp_potential_mmpol2ext proc~ommp_potential_mmpol2ext->module~mod_electrostatics proc~mmpol_prepare mmpol_prepare proc~mmpol_prepare->module~mod_electrostatics proc~ommp_get_fixedelec_energy ommp_get_fixedelec_energy proc~ommp_get_fixedelec_energy->module~mod_electrostatics proc~dipole_t dipole_T proc~dipole_t->module~mod_electrostatics proc~ommp_set_default_solver ommp_set_default_solver proc~ommp_set_default_solver->module~mod_electrostatics proc~init_eel_for_link_atom init_eel_for_link_atom proc~init_eel_for_link_atom->module~mod_electrostatics proc~init_eel_for_link_atom->module~mod_prm proc~assign_mpoles assign_mpoles proc~assign_mpoles->module~mod_electrostatics proc~electrostatic_for_ene electrostatic_for_ene proc~electrostatic_for_ene->module~mod_electrostatics proc~ommp_set_default_matv ommp_set_default_matv proc~ommp_set_default_matv->module~mod_electrostatics proc~polelec_geomgrad polelec_geomgrad proc~polelec_geomgrad->module~mod_electrostatics proc~polelec_geomgrad->module~mod_polarization proc~ommp_field_mmpol2ext ommp_field_mmpol2ext proc~ommp_field_mmpol2ext->module~mod_electrostatics proc~ommp_get_polelec_energy ommp_get_polelec_energy proc~ommp_get_polelec_energy->module~mod_electrostatics proc~ommp_get_polelec_energy->module~mod_polarization proc~mmpol_terminate mmpol_terminate proc~mmpol_terminate->module~mod_electrostatics proc~ommp_potential_mm2ext ommp_potential_mm2ext proc~ommp_potential_mm2ext->module~mod_electrostatics proc~electrostatic_for_grad electrostatic_for_grad proc~electrostatic_for_grad->module~mod_electrostatics proc~mmpol_init mmpol_init proc~mmpol_init->module~mod_electrostatics proc~rotate_multipoles rotate_multipoles proc~rotate_multipoles->module~mod_electrostatics proc~mmpol_init_from_xyz mmpol_init_from_xyz proc~mmpol_init_from_xyz->module~mod_electrostatics proc~mmpol_init_from_xyz->module~mod_prm module~mod_mmpol mod_mmpol proc~mmpol_init_from_xyz->module~mod_mmpol proc~c_ommp_field_mm2ext C_ommp_field_mm2ext proc~c_ommp_field_mm2ext->module~mod_electrostatics proc~ommp_turn_pol_off ommp_turn_pol_off proc~ommp_turn_pol_off->module~mod_electrostatics proc~ommp_field_mm2ext ommp_field_mm2ext proc~ommp_field_mm2ext->module~mod_electrostatics proc~tmatvec_otf TMatVec_otf proc~tmatvec_otf->module~mod_electrostatics proc~ommp_potential_pol2ext ommp_potential_pol2ext proc~ommp_potential_pol2ext->module~mod_electrostatics proc~ommp_field_pol2ext ommp_field_pol2ext proc~ommp_field_pol2ext->module~mod_electrostatics proc~fixedelec_geomgrad fixedelec_geomgrad proc~fixedelec_geomgrad->module~mod_electrostatics module~mod_solvers mod_solvers module~mod_solvers->module~mod_electrostatics proc~rotation_geomgrad rotation_geomgrad proc~rotation_geomgrad->module~mod_electrostatics module~mod_polarization->module~mod_electrostatics module~mod_polarization->module~mod_mmpol proc~c_ommp_field_pol2ext C_ommp_field_pol2ext proc~c_ommp_field_pol2ext->module~mod_electrostatics module~ommp_interface ommp_interface module~ommp_interface->module~mod_electrostatics module~ommp_interface->module~mod_mmpol module~mod_qm_helper mod_qm_helper module~ommp_interface->module~mod_qm_helper proc~assign_pol assign_pol proc~assign_pol->module~mod_electrostatics module~mod_mmpol->module~mod_electrostatics proc~mmpol_init_from_mmp mmpol_init_from_mmp proc~mmpol_init_from_mmp->module~mod_electrostatics proc~mmpol_init_from_mmp->module~mod_mmpol program~test_si_potential test_SI_potential program~test_si_potential->module~ommp_interface proc~ommp_create_link_atom ommp_create_link_atom proc~ommp_create_link_atom->module~mod_mmpol proc~ommp_create_link_atom->module~mod_qm_helper module~mod_inputloader mod_inputloader module~mod_inputloader->module~mod_mmpol proc~init_bonded_for_link_atom init_bonded_for_link_atom proc~init_bonded_for_link_atom->module~mod_prm proc~qm_helper_init_vdw_prm qm_helper_init_vdw_prm proc~qm_helper_init_vdw_prm->module~mod_prm proc~polarization polarization proc~polarization->module~mod_solvers proc~ommp_system_from_qm_helper ommp_system_from_qm_helper proc~ommp_system_from_qm_helper->module~mod_prm proc~ommp_system_from_qm_helper->module~mod_mmpol proc~c_ommp_full_geomgrad C_ommp_full_geomgrad proc~c_ommp_full_geomgrad->module~ommp_interface module~test_geomgrad~2 test_geomgrad module~test_geomgrad~2->module~ommp_interface module~mod_ommp_c_interface mod_ommp_C_interface module~mod_ommp_c_interface->module~ommp_interface proc~c_ommp_update_coordinates C_ommp_update_coordinates proc~c_ommp_update_coordinates->module~mod_mmpol program~test_si_init test_SI_init program~test_si_init->module~ommp_interface proc~numerical_geomgrad numerical_geomgrad proc~numerical_geomgrad->module~mod_mmpol proc~qm_helper_vdw_geomgrad qm_helper_vdw_geomgrad proc~qm_helper_vdw_geomgrad->module~mod_mmpol proc~qm_helper_link_atom_geomgrad qm_helper_link_atom_geomgrad proc~qm_helper_link_atom_geomgrad->module~mod_mmpol module~mod_qm_helper->module~mod_mmpol module~mod_geomgrad mod_geomgrad module~mod_geomgrad->module~mod_mmpol program~test_si_geomgrad_num test_SI_geomgrad_num program~test_si_geomgrad_num->module~ommp_interface module~test_geomgrad test_geomgrad program~test_si_geomgrad_num->module~test_geomgrad module~test_geomgrad->module~ommp_interface program~test_si_geomgrad test_SI_geomgrad program~test_si_geomgrad->module~ommp_interface program~test_si_geomgrad->module~test_geomgrad proc~qm_helper_vdw_energy qm_helper_vdw_energy proc~qm_helper_vdw_energy->module~mod_mmpol proc~ommp_terminate ommp_terminate proc~ommp_terminate->module~mod_mmpol proc~ommp_full_geomgrad ommp_full_geomgrad proc~ommp_full_geomgrad->module~mod_geomgrad proc~ommp_qm_helper_vdw_geomgrad ommp_qm_helper_vdw_geomgrad proc~ommp_qm_helper_vdw_geomgrad->module~mod_qm_helper proc~ommp_init_qm_helper ommp_init_qm_helper proc~ommp_init_qm_helper->module~mod_qm_helper proc~c_ommp_qm_helper_get_nmm C_ommp_qm_helper_get_nmm proc~c_ommp_qm_helper_get_nmm->module~mod_qm_helper proc~c_ommp_qm_helper_use_nonbonded C_ommp_qm_helper_use_nonbonded proc~c_ommp_qm_helper_use_nonbonded->module~mod_qm_helper proc~ommp_init_mmp ommp_init_mmp proc~ommp_init_mmp->module~mod_inputloader proc~ommp_update_link_atoms_position ommp_update_link_atoms_position proc~ommp_update_link_atoms_position->module~mod_qm_helper proc~c_ommp_qm_helper_get_g_n2m C_ommp_qm_helper_get_G_n2m proc~c_ommp_qm_helper_get_g_n2m->module~mod_qm_helper proc~ommp_init_xyz ommp_init_xyz proc~ommp_init_xyz->module~mod_inputloader proc~c_ommp_qm_helper_get_e_p2n C_ommp_qm_helper_get_E_p2n proc~c_ommp_qm_helper_get_e_p2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_g_n2p C_ommp_qm_helper_get_G_n2p proc~c_ommp_qm_helper_get_g_n2p->module~mod_qm_helper proc~c_ommp_qm_helper_get_v_m2n C_ommp_qm_helper_get_V_m2n proc~c_ommp_qm_helper_get_v_m2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_npol C_ommp_qm_helper_get_npol proc~c_ommp_qm_helper_get_npol->module~mod_qm_helper proc~ommp_fixedelec_geomgrad ommp_fixedelec_geomgrad proc~ommp_fixedelec_geomgrad->module~mod_geomgrad proc~ommp_qm_helper_vdw_energy ommp_qm_helper_vdw_energy proc~ommp_qm_helper_vdw_energy->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_n2p C_ommp_qm_helper_get_E_n2p proc~c_ommp_qm_helper_get_e_n2p->module~mod_qm_helper proc~c_ommp_qm_helper_get_cqm C_ommp_qm_helper_get_cqm proc~c_ommp_qm_helper_get_cqm->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_m2n C_ommp_qm_helper_get_E_m2n proc~c_ommp_qm_helper_get_e_m2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_h_n2m C_ommp_qm_helper_get_H_n2m proc~c_ommp_qm_helper_get_h_n2m->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_n2m C_ommp_qm_helper_get_E_n2m proc~c_ommp_qm_helper_get_e_n2m->module~mod_qm_helper proc~ommp_qm_helper_update_coord ommp_qm_helper_update_coord proc~ommp_qm_helper_update_coord->module~mod_qm_helper proc~c_ommp_qm_helper_get_v_p2n C_ommp_qm_helper_get_V_p2n proc~c_ommp_qm_helper_get_v_p2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_qm_atoms C_ommp_qm_helper_get_qm_atoms proc~c_ommp_qm_helper_get_qm_atoms->module~mod_qm_helper proc~c_ommp_qm_helper_use_frozen C_ommp_qm_helper_use_frozen proc~c_ommp_qm_helper_use_frozen->module~mod_qm_helper proc~c_ommp_qm_helper_get_frozen C_ommp_qm_helper_get_frozen proc~c_ommp_qm_helper_get_frozen->module~mod_qm_helper proc~c_ommp_terminate_qm_helper C_ommp_terminate_qm_helper proc~c_ommp_terminate_qm_helper->module~mod_qm_helper proc~ommp_polelec_geomgrad ommp_polelec_geomgrad proc~ommp_polelec_geomgrad->module~mod_geomgrad proc~ommp_terminate_qm_helper ommp_terminate_qm_helper proc~ommp_terminate_qm_helper->module~mod_qm_helper proc~ommp_qm_helper_link_atom_geomgrad ommp_qm_helper_link_atom_geomgrad proc~ommp_qm_helper_link_atom_geomgrad->module~mod_qm_helper

Contents


Derived Types

type, public ::  ommp_electrostatics_type

Components

Type Visibility Attributes Name Initial
integer(kind=ip), public :: def_solver

Solver to be used by default for this eel object.

integer(kind=ip), public :: def_matv

Matrix-vector method to be used by default for this eel object.

type(ommp_topology_type), public, pointer :: top

Data structure containing all the topological informations

integer(kind=ip), public :: pol_atoms

number of polarizable atoms

logical(kind=lp), public :: amoeba

True if AMOEBA FF is used

integer(kind=ip), public :: ld_cart

size of the cartesian multipolar distribution (i.e., (l+1)(l+2)(l+3)/6) this is 1 for AMBER (charges only), 10 for AMOEBA (up to quadrupoles). this is also the size of the array that contains the electrostatic properties of the sources at the sources. ld_cder is the leading size of the derivative of such a distribution, which is 3 for AMBER and 19 for AMOEBA.

integer(kind=ip), public :: ld_cder

size of the cartesian multipolar distribution (i.e., (l+1)(l+2)(l+3)/6) this is 1 for AMBER (charges only), 10 for AMOEBA (up to quadrupoles). this is also the size of the array that contains the electrostatic properties of the sources at the sources. ld_cder is the leading size of the derivative of such a distribution, which is 3 for AMBER and 19 for AMOEBA.

integer(kind=ip), public :: n_ipd

number of induced point dipoles distributions this is 1 for AMBER and 2 for AMOEBA

real(kind=rp), public :: mscale(4)

factors for charge-charge (or multipole-multipole) interactions

real(kind=rp), public :: pscale(4)

factors for chrage-ipd (or multipole-ipd) interactions. in AMOEBA, this is used to define the polarization field, i.e., the right-hand side to the polarization equations, and depends on the connectivity.

real(kind=rp), public :: pscale_intra(4)

Only used for AMOEBA, same as pscale but for atoms that belong to the same polarization group

real(kind=rp), public :: dscale(4)

factors for multipoles-ipd interactions used to compute the direct field, which is used to define the polarization energy. these factors depend on the polarization group "connectivity" (AMOEBA only)

real(kind=rp), public :: uscale(4)

factor for ipd-ipd interactions. these depend on the connectivity (AMBER) or on the polarization group " connectivity (AMOEBA)

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

array to store the thole factors for computing damping functions

real(kind=rp), public :: thole_scale

Scale factor for thole damping (only used by non-AMOEBA FF); all the element of thole(:) are multiplied by thole_scale ** 0.5

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

Coordinates of polarizable atoms (3:pol_atoms)

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

Mutlipolar distribution (ld_cart:mm_atoms) For AMOEBA this is the rotated distribution. The order for the stored multipoles is q, px, py, pz, Qxx, Qxy, Qyy, Qxz, Qyx, Qzz.

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

Unrotated utlipolar distribution (ld_cart:mm_atoms) (AMOEBA only)

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

Polarizabilities for each polarizable atom

integer(kind=ip), public, allocatable :: mm_polar(:)

for each mm atom: 0 if is not polarizable, index in polarizable atom list otherwise

integer(kind=ip), public, allocatable :: polar_mm(:)

positions of a polarizable atom in the mm atoms list

integer(kind=ip), public, allocatable :: C_polar_mm(:)

polar_mm with 0-based C-indexing, only allocated at need.

integer(kind=ip), public, allocatable :: mmat_polgrp(:)

Polarizability group index for each MM site

type(yale_sparse), public :: polgrp_mmat

For each polarization group index, list all the MM atoms included. It basically is a sparse boolean matrix of dimension N_polgroups x N_mmatoms

type(yale_sparse), public, allocatable :: pg_conn(:)

Adjacency and connectivity matytrices between polarizability groups. Two groups are said to be adjacent if they are connected by a chemical bond. The 1st element is the identity matrix for code simplicity.

integer(kind=ip), public, allocatable :: mol_frame(:)

definition of the molecular frame convention: 0 ... do not rotate 1 ... z-then-x 2 ... bisector 3 ... z-only 4 ... z-bisector 5 ... 3-fold

integer(kind=ip), public, allocatable :: ix(:)

neighboring atoms used to define the axes of the molecular frame

integer(kind=ip), public, allocatable :: iy(:)

neighboring atoms used to define the axes of the molecular frame

integer(kind=ip), public, allocatable :: iz(:)

neighboring atoms used to define the axes of the molecular frame

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

flag to set when M2M electrostatic quantities are computed.

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

flag to set when M2M electrostatic quantities for geometrical gradients are computed.

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

potential of MM permanent multipoles at MM sites;

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

electric_field of MM permanent multipoles at MM sites;

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

electric_field gradient of MM permanent multipoles at MM sites;

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

electric field Hessian of MM permanent multipoles at MM sites;

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

Flag to set when M2D electrostatics have been computed.

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

Flag to set when M2D electrostatics for geometrical gradients have been computed.

real(kind=rp), public, allocatable :: V_M2D(:,:)
real(kind=rp), public, allocatable :: E_M2D(:,:,:)

electric field of MM permanent multipoles at POL sites;

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

electric field of MM permanent multipoles at POL sites;

real(kind=rp), public, allocatable :: EHes_M2D(:,:,:)
logical(kind=lp), public :: D2Mgg_done = .false.
real(kind=rp), public, allocatable :: V_D2M(:)
real(kind=rp), public, allocatable :: E_D2M(:,:)
real(kind=rp), public, allocatable :: Egrd_D2M(:,:)
real(kind=rp), public, allocatable :: EHes_D2M(:,:)
logical(kind=lp), public :: D2Dgg_done = .false.
real(kind=rp), public, allocatable :: V_D2D(:,:)
real(kind=rp), public, allocatable :: E_D2D(:,:,:)
real(kind=rp), public, allocatable :: Egrd_D2D(:,:,:)
real(kind=rp), public, allocatable :: EHes_D2D(:,:,:)
logical(kind=lp), public :: ipd_done = .false.

Flag to set when IPD have been computed.

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

Flag to set when current value of IPD can be used as guess for next solution of LS.

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

induced point dipoles (3:pol_atoms:ipd)

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

Interaction tensor, only allocated for the methods that explicitly requires it.

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

Flag to check if screening list have already been prepared

type(yale_sparse), public, allocatable :: list_S_S

Sparse matrix containg the scale factors for the scaled elements of electrostatic interactions (all the element that are not present in the sparse matrix have a scaling factor 1.0).

type(yale_sparse), public, allocatable :: list_P_P

Sparse matrix containg the scale factors for the scaled elements of electrostatic interactions (all the element that are not present in the sparse matrix have a scaling factor 1.0).

type(yale_sparse), public, allocatable :: list_S_P_P

Sparse matrix containg the scale factors for the scaled elements of electrostatic interactions (all the element that are not present in the sparse matrix have a scaling factor 1.0).

type(yale_sparse), public, allocatable :: list_S_P_D

Sparse matrix containg the scale factors for the scaled elements of electrostatic interactions (all the element that are not present in the sparse matrix have a scaling factor 1.0).

logical(kind=lp), public, dimension(:), allocatable :: todo_S_S

Logical array of the same dimension of column-index vector; true if the scaling factor is zero, false otherwise

logical(kind=lp), public, dimension(:), allocatable :: todo_P_P

Logical array of the same dimension of column-index vector; true if the scaling factor is zero, false otherwise

logical(kind=lp), public, dimension(:), allocatable :: todo_S_P_P

Logical array of the same dimension of column-index vector; true if the scaling factor is zero, false otherwise

logical(kind=lp), public, dimension(:), allocatable :: todo_S_P_D

Logical array of the same dimension of column-index vector; true if the scaling factor is zero, false otherwise

real(kind=rp), public, dimension(:), allocatable :: scalef_S_S

Array of the same dimension of column-index vector; contains the value of the scaling factors different from 1.0

real(kind=rp), public, dimension(:), allocatable :: scalef_P_P

Array of the same dimension of column-index vector; contains the value of the scaling factors different from 1.0

real(kind=rp), public, dimension(:), allocatable :: scalef_S_P_P

Array of the same dimension of column-index vector; contains the value of the scaling factors different from 1.0

real(kind=rp), public, dimension(:), allocatable :: scalef_S_P_D

Array of the same dimension of column-index vector; contains the value of the scaling factors different from 1.0


Functions

public function screening_rules(eel, i, kind_i, j, kind_j, in_field) result(scalf)

Utility function used to decide if an interaction between sites i and j should be computed and eventually scaled by a factor. This function is intended to be used in code, for linear scaling code lists should be built. This is written to minimize code repetitions, all the screening rules are handled in two possible cases: 1. rules based on adjacency matrix 2. rules based on AMOEBA polarization groups

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Electrostatics object

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

Index of source site (MM index is used for static sites, while Pol index is used for polarizable sites)

character, intent(in) :: kind_i

Type of sites i and j in the interaction for which the screening rules are required; possible choices are 'P' (polarizable site) or 'S' (static site). Any other option will cause a fatal error.

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

Index of target site (MM index is used for static sites, while Pol index is used for polarizable sites)

character, intent(in) :: kind_j

Type of sites i and j in the interaction for which the screening rules are required; possible choices are 'P' (polarizable site) or 'S' (static site). Any other option will cause a fatal error.

character, intent(in) :: in_field

Which screening rules have to be applied? 'D' = screening rules for direct field; 'P' = screening rules for polarization field

Return Value real(kind=rp)

Scale factor for the interaction


Subroutines

public subroutine electrostatics_init(eel_obj, amoeba, pol_atoms, top_obj)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel_obj
logical(kind=lp), intent(in) :: amoeba
integer(kind=ip), intent(in) :: pol_atoms
type(ommp_topology_type), intent(in), target :: top_obj

public subroutine electrostatics_terminate(eel_obj)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel_obj

public subroutine set_def_solver(eel_obj, solver)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel_obj
integer(kind=ip), intent(in) :: solver

public subroutine set_def_matv(eel_obj, matv)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel_obj
integer(kind=ip), intent(in) :: matv

public subroutine set_screening_parameters(eel_obj, m, p, d, u, i)

Subroutine to initialize the screening parameters

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel_obj
real(kind=rp), intent(in) :: m(4)
real(kind=rp), intent(in) :: p(4)
real(kind=rp), intent(in) :: d(4)
real(kind=rp), intent(in) :: u(4)
real(kind=rp), intent(in), optional :: i(4)

public subroutine remove_null_pol(eel)

Check which polarizabilities are close enough to 0 to be just excluded from the calculation, and remove them.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

public subroutine make_screening_lists(eel)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

public subroutine thole_init(eel)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

public subroutine energy_MM_MM(eel, ene)

This function computes the interaction energy of static electric multipoles

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

Electrostatics data structure

real(kind=rp), intent(inout) :: ene

Energy (results will be added)

public subroutine energy_MM_pol(eel, ene)

This function computes the interaction energy of static electric multipoles

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

Electrostatics data structure

real(kind=rp), intent(inout) :: ene

Energy (results will be added)

public subroutine coulomb_kernel(dr, maxder, res)

This function compute the coulomb kernel for the distance vector dr and its derivative up to the value required by maxder.

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: dr(3)

Distance vector from atom i to atom j

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

Maximum derivative to be computed

real(kind=rp), intent(out), dimension(maxder+1) :: res

Results vector

public subroutine damped_coulomb_kernel(eel, i, j, maxder, res, dr)

This subroutine computes the damped coulomb kernel between two atoms. Note that this only makes sense between two MM atoms, as it is only used to compute the field that induces the point dipoles!

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Electrostatics data structure

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

Index of atoms (in MM atom list) for which the kernel should be computed

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

Index of atoms (in MM atom list) for which the kernel should be computed

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

Maximum derivative to be computed

real(kind=rp), intent(out), dimension(maxder+1) :: res

Results vector

real(kind=rp), intent(out), dimension(3) :: dr

Distance vector between i and j

public subroutine q_elec_prop(q, dr, kernel, do_V, V, do_E, E, do_grdE, grdE, do_HE, HE)

TODO Computes the electric potential of a charge at position from the charge itself. Pre-computed kernel should be provided as input. The result is added to .

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: q

Charge

real(kind=rp), intent(in) :: dr(3)

Distance vector

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

Array of coulomb kernel (either damped or undamped)

logical, intent(in) :: do_V

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: V

Electric potential

logical, intent(in) :: do_E

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: E(3)

Electric potential

logical, intent(in) :: do_grdE

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: grdE(6)

Electric potential

logical, intent(in) :: do_HE

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: HE(10)

Electric potential

private subroutine mu_elec_prop(mu, dr, kernel, do_V, V, do_E, E, do_grdE, grdE, do_HE, HE)

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: mu(3)

point dipole

real(kind=rp), intent(in) :: dr(3)

Distance vector

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

Array of coulomb kernel (either damped or undamped)

logical, intent(in) :: do_V

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: V

Electric potential

logical, intent(in) :: do_E

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: E(3)

Electric potential

logical, intent(in) :: do_grdE

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: grdE(6)

Electric potential

logical, intent(in) :: do_HE

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: HE(10)

Electric potential

private subroutine quad_elec_prop(quad, dr, kernel, do_V, V, do_E, E, do_grdE, grdE, do_HE, HE)

Arguments

Type IntentOptional Attributes Name
real(kind=rp), intent(in) :: quad(6)

point quadrupole stored as (xx, xy, yy, xz, yz, zz)

real(kind=rp), intent(in) :: dr(3)

Distance vector

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

Array of coulomb kernel (either damped or undamped)

logical, intent(in) :: do_V

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: V

Electric potential

logical, intent(in) :: do_E

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: E(3)

Electric potential

logical, intent(in) :: do_grdE

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: grdE(6)

Electric potential

logical, intent(in) :: do_HE

Flags to enable/disable calculation of different electrostatic properties

real(kind=rp), intent(inout) :: HE(10)

Electric potential

public subroutine prepare_fixedelec(eel, arg_dogg)

This function allocate and populate array of electrostatic properties of static multipoles at static multipoles sites. It should be called blindly before any calculation that requires V_M2M etc.

Read more…

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel
logical, intent(in), optional :: arg_dogg

public subroutine prepare_polelec(eel, arg_dogg)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel
logical, intent(in), optional :: arg_dogg

private subroutine elec_prop_M2M(eel, do_V, do_E, do_Egrd, do_EHes)

Computes the electric potential, field and field gradients of static multipoles at all sites (polarizable sites are a subset of static ones)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

Electrostatics data structure

logical, intent(in) :: do_V

Flags to enable/disable the calculation of different components

logical, intent(in) :: do_E

Flags to enable/disable the calculation of different components

logical, intent(in) :: do_Egrd

Flags to enable/disable the calculation of different components

logical, intent(in) :: do_EHes

Flags to enable/disable the calculation of different components

public subroutine field_extD2D(eel, ext_ipd, E)

Computes the electric field of a trial set of induced point dipoles at polarizable sites. This is intended to be used as matrix-vector routine in the solution of the linear system.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Data structure for electrostatic part of the system

real(kind=rp), intent(in) :: ext_ipd(3,eel%pol_atoms)

External induced point dipoles at polarizable sites

real(kind=rp), intent(inout) :: E(3,eel%pol_atoms)

Electric field (results will be added)

private subroutine elec_prop_D2D(eel, in_kind, do_V, do_E, do_Egrd, do_EHes)

Computes the electric field of a trial set of induced point dipoles at polarizable sites. This is intended to be used as matrix-vector routine in the solution of the linear system.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

Data structure for electrostatic part of the system

character, intent(in) :: in_kind
logical, intent(in) :: do_V

Flag to control which properties have to be computed.

logical, intent(in) :: do_E

Flag to control which properties have to be computed.

logical, intent(in) :: do_Egrd

Flag to control which properties have to be computed.

logical, intent(in) :: do_EHes

Flag to control which properties have to be computed.

private subroutine elec_prop_M2D(eel, do_V, do_E, do_Egrd, do_EHes)

Computes the electric field of static multipoles at induced dipoles sites. This is only intended to be used to build the RHS of the linear system. This field is modified by the indroduction of the damped kernels and by the connectivity-based screening rules.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

Electrostatics data structure

logical, intent(in) :: do_V

Flag to control which properties have to be computed.

logical, intent(in) :: do_E

Flag to control which properties have to be computed.

logical, intent(in) :: do_Egrd

Flag to control which properties have to be computed.

logical, intent(in) :: do_EHes

Flag to control which properties have to be computed.

private subroutine elec_prop_D2M(eel, in_kind, do_V, do_E, do_Egrd, do_EHes)

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(inout) :: eel

Electrostatics data structure

character, intent(in) :: in_kind
logical, intent(in) :: do_V

Flag to control which properties have to be computed.

logical, intent(in) :: do_E

Flag to control which properties have to be computed.

logical, intent(in) :: do_Egrd

Flag to control which properties have to be computed.

logical, intent(in) :: do_EHes

Flag to control which properties have to be computed.

public subroutine potential_D2E(eel, cpt, V, amoeba_P_insted_of_D_)

This subroutine computes the potential generated by the induced point dipoles to a set of arbitrary coordinates, without applying any screening rules. Note: for AMOEBA D dipoles should be used.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Electrostatics data structure

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

Coordinates at which the electric field is requested

real(kind=rp), intent(inout) :: V(:)

Electric field (results will be added)

logical, intent(in), optional :: amoeba_P_insted_of_D_

For AMOEBA FF, if true the potential of P dipoles is computed, otherwise potential of D dipoles is computed

public subroutine potential_M2E(eel, cpt, V)

This subroutine computes the potential generated by the static multipoles to a set of arbitrary coordinates, without applying any screening rules.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Electrostatics data structure

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

Coordinates at which the electric field is requested

real(kind=rp), intent(inout) :: V(:)

Electric field (results will be added)

public subroutine field_D2E(eel, cpt, E)

This subroutine computes the potential generated by the static multipoles to a set of arbitrary coordinates, without applying any screening rules.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Electrostatics data structure

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

Coordinates at which the electric field is requested

real(kind=rp), intent(inout) :: E(:,:)

Electric field (results will be added)

public subroutine field_M2E(eel, cpt, E)

This subroutine computes the potential generated by the static multipoles to a set of arbitrary coordinates, without applying any screening rules.

Arguments

Type IntentOptional Attributes Name
type(ommp_electrostatics_type), intent(in) :: eel

Electrostatics data structure

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

Coordinates at which the electric field is requested

real(kind=rp), intent(inout) :: E(:,:)

Electric field (results will be added)