mod_bonded Module

Module to handle the bonded part of the FF, it closely follows the AMOEBA functional form.


Uses

  • module~~mod_bonded~~UsesGraph module~mod_bonded mod_bonded module~mod_io mod_io module~mod_bonded->module~mod_io module~mod_memory mod_memory module~mod_bonded->module~mod_memory module~mod_topology mod_topology module~mod_bonded->module~mod_topology module~mod_constants mod_constants module~mod_io->module~mod_constants module~mod_memory->module~mod_io module~mod_memory->module~mod_constants iso_c_binding iso_c_binding module~mod_memory->iso_c_binding module~mod_topology->module~mod_memory module~mod_adjacency_mat mod_adjacency_mat module~mod_topology->module~mod_adjacency_mat module~mod_constants->iso_c_binding module~mod_adjacency_mat->module~mod_memory

Used by


Contents


Variables

Type Visibility Attributes Name Initial
integer(kind=ip), public, parameter :: OMMP_ANG_SIMPLE = 0

Simple angle with no difference for hydrogen environments

integer(kind=ip), public, parameter :: OMMP_ANG_H0 = 1

Simple angle with two different hydrogen environments

integer(kind=ip), public, parameter :: OMMP_ANG_H1 = 2

Simple angle with three different hydrogen environments

integer(kind=ip), public, parameter :: OMMP_ANG_H2 = 3

Simple angle with four different hydrogen environments

integer(kind=ip), public, parameter :: OMMP_ANG_INPLANE = 4

In-plane angle with no difference for hydrogen environments

integer(kind=ip), public, parameter :: OMMP_ANG_INPLANE_H0 = 5

In-plane angle with two different hydrogen environments

integer(kind=ip), public, parameter :: OMMP_ANG_INPLANE_H1 = 6

In-plane angle with three different hydrogen environments


Derived Types

type, public ::  ommp_bonded_type

Components

Type Visibility Attributes Name Initial
type(ommp_topology_type), public, pointer :: top

Data structure for topology

integer(kind=ip), public :: nbond

Number of bond terms in the potential energy function

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

Atoms involved in the ith bond term

real(kind=rp), public :: bond_cubic

3rd and 4th order terms coefficients, corresponding to and

real(kind=rp), public :: bond_quartic

3rd and 4th order terms coefficients, corresponding to and

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

Force constants for bond terms

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

Equilibrium lengths for bonds

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

Flag to enable the calculation of bond terms in potential energy function

integer(kind=ip), public :: nangle

Number of angle terms in the potential energy function

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

Atoms involved in the ith angle term

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

Type of function to be used for ith angle term

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

Auxiliary atom to be used in calculaton of ith angle term

real(kind=rp), public :: angle_cubic

Coefficients for 3rd to 6th order terms corresponding to ... .

real(kind=rp), public :: angle_quartic

Coefficients for 3rd to 6th order terms corresponding to ... .

real(kind=rp), public :: angle_pentic

Coefficients for 3rd to 6th order terms corresponding to ... .

real(kind=rp), public :: angle_sextic

Coefficients for 3rd to 6th order terms corresponding to ... .

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

Force constants for the ith angle term

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

Equilibrium angle for the ith angle term

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

Flag to enable the calculation of angle terms in potential energy function

integer(kind=ip), public :: nstrbnd

Number of stretching-bending coupling terms in potential energy function

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

Atoms involved in the ith stretching-bending term

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

Force constants for the ith stretching-bending term ( and )

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

Force constants for the ith stretching-bending term ( and )

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

Equilibrium angle for the ith stretching-bending term

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

Equilibrium distances for the ith stretching-bending term

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

Equilibrium distances for the ith stretching-bending term

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

Flag to enable calculation of stretching-bending coupling terms in potential energy function

integer(kind=ip), public :: nangtor
integer(kind=ip), public, allocatable :: angtorat(:,:)
integer(kind=ip), public, allocatable :: angtor_t(:)
integer(kind=ip), public, allocatable :: angtor_a(:,:)
real(kind=rp), public, allocatable :: angtork(:,:)
logical(kind=lp), public :: use_angtor = .false.
integer(kind=ip), public :: nstrtor
integer(kind=ip), public, allocatable :: strtorat(:,:)
integer(kind=ip), public, allocatable :: strtor_t(:)
integer(kind=ip), public, allocatable :: strtor_b(:,:)
real(kind=rp), public, allocatable :: strtork(:,:)
logical(kind=lp), public :: use_strtor = .false.
integer(kind=ip), public :: nurey

Number of Urey-Bradley terms in potential energy function

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

Atoms involved in ith Urey-Bradley term

real(kind=rp), public :: urey_cubic

3rd and 4th order constants for U-B potential ( and )

real(kind=rp), public :: urey_quartic

3rd and 4th order constants for U-B potential ( and )

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

Force constants for U-B terms

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

Equilibrium distance for U-B potentials

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

Flag to enable calculation of U-B terms in the potential energy function

integer(kind=ip), public :: nopb

Number of out-of-plane bending function in potential energy func.

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

Atoms involved in ith oop bending function

real(kind=rp), public :: opb_cubic = 0.0

Coefficients for 3rd to 6th order terms corresponding to ... for out-of-plane bending.

real(kind=rp), public :: opb_quartic = 0.0

Coefficients for 3rd to 6th order terms corresponding to ... for out-of-plane bending.

real(kind=rp), public :: opb_pentic = 0.0

Coefficients for 3rd to 6th order terms corresponding to ... for out-of-plane bending.

real(kind=rp), public :: opb_sextic = 0.0

Coefficients for 3rd to 6th order terms corresponding to ... for out-of-plane bending.

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

Force constants for ith out-of plane bending

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

Flag to enable out-of-plane bending calculation

integer(kind=ip), public :: npitors
integer(kind=ip), public, allocatable :: pitorsat(:,:)
real(kind=rp), public, allocatable :: kpitors(:)
logical(kind=lp), public :: use_pitors = .false.
integer(kind=ip), public :: ntorsion
integer(kind=ip), public, allocatable :: torsionat(:,:)
integer(kind=ip), public, allocatable :: torsn(:,:)
real(kind=rp), public, allocatable :: torsamp(:,:)
real(kind=rp), public, allocatable :: torsphase(:,:)
logical(kind=lp), public :: use_torsion = .false.
integer(kind=ip), public :: nimptorsion
integer(kind=ip), public, allocatable :: imptorsionat(:,:)
integer(kind=ip), public, allocatable :: imptorsn(:,:)
real(kind=rp), public, allocatable :: imptorsamp(:,:)
real(kind=rp), public, allocatable :: imptorsphase(:,:)
logical(kind=lp), public :: use_imptorsion = .false.
integer(kind=ip), public :: ntortor
integer(kind=ip), public, allocatable :: tortorat(:,:)
integer(kind=ip), public, allocatable :: tortorprm(:)
integer(kind=ip), public, allocatable :: ttmap_shape(:,:)
real(kind=rp), public, allocatable :: ttmap_ang1(:)
real(kind=rp), public, allocatable :: ttmap_ang2(:)
real(kind=rp), public, allocatable :: ttmap_v(:)
real(kind=rp), public, allocatable :: ttmap_vx(:)
real(kind=rp), public, allocatable :: ttmap_vy(:)
real(kind=rp), public, allocatable :: ttmap_vxy(:)
logical(kind=lp), public :: use_tortor = .false.

Functions

private pure function cos_torsion(top, idx)

Compute the cosine of torsional angle between four atoms specified with indices idx

Arguments

Type IntentOptional Attributes Name
type(ommp_topology_type), intent(in) :: top
integer(kind=ip), intent(in) :: idx(4)

Return Value real(kind=rp)

private pure function ang_torsion(top, idx)

Compute the torsional angle between four atoms specified with indices idx; results are in range [-pi;pi]

Arguments

Type IntentOptional Attributes Name
type(ommp_topology_type), intent(in) :: top
integer(kind=ip), intent(in) :: idx(4)

Return Value real(kind=rp)


Subroutines

public subroutine bond_init(bds, n)

Initialize array used in calculation of bond stratching terms of potential energy

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type) :: bds
integer(kind=ip) :: n

Number of bond stretching functions in the potential energy of the system

public subroutine bond_potential(bds, V)

Compute the bond-stretching terms of the potential energy.
They are computed according to the general formula adopted in AMOEBA Force Field:

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

Bond potential, result will be added to V

public subroutine bond_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds

Bonded potential data structure

real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

Gradients of bond stretching terms of potential energy

public subroutine angle_init(bds, n)

Initialize arrays used in calculation of angle bending functions

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of angle bending functions in the potential energy of the system

public subroutine angle_potential(bds, V)

Compute angle-bending terms of the potential energy function.
Simple angle terms are computed according to the formula:
Out-of plane angle are more complex. First, central atom has to be a trigonal center, the other two atoms together with the auxliary atom (that is the remaining one connected to the trigonal center) define the projection plane. During the first run the auxiliary atom is found and saved. Then, the trigonal center is projected on the plane defined by the other three atoms, and the angle is the one defined by the projection (which is the vertex, and the other two atoms -- the auxiliary is excluded). Then the same formula used for simple angle terms is used. Trigonal center Normal vector of the projection plane

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

Bond potential, result will be added to V

public subroutine angle_geomgrad(bds, grad)

Trigonal center

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds

Bonded potential data structure

real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

Gradients of bond stretching terms of potential energy

public subroutine strbnd_init(bds, n)

Initialize arrays for calculation of stretch-bend cross term potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of stretch-bend functions in the potential energy of the system

public subroutine strbnd_potential(bds, V)

Compute the stretch-bend cross term potential.
Those terms are computed according the following formula: where is the angle delimited by the bond and .
The force constants and are explicitely defined in the FF, while the equilibrium values are the same as for stretching and bending terms.

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

Stretch-bend cross term potential, result will be added to V

public subroutine strbnd_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

Gradients of bond stretching terms of potential energy

public subroutine urey_init(bds, n)

Initialize Urey-Bradley potential arrays

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of Urey-Bradley functions in the potential energy of the system

public subroutine urey_potential(bds, V)

Compute the Urey-Bradley potential.
This is basically a virtual bond, with its stretching harminic potential that connect two otherwise un-connected bonds. The same potential formula used for normal stretching is used.

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

Urey-Bradley potential, result will be added to V

public subroutine urey_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds

Bonded potential data structure

real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

Gradients of bond stretching terms of potential energy

public subroutine opb_init(bds, n, opbtype)

Initialize arrays for out-of-plane bending potential calculation.

Read more…

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of out of plane Bending functions in the potential energy of the system

character(len=*) :: opbtype

public subroutine opb_potential(bds, V)

Computes the out-of-plane bending potential.
With Allinger formula: similarly to in plane angles, here we are considering a trigonal center, where D is the central atom and A, B, C are connected to D. Allinger formula consider the angle between vector and the normal vector of plane ABC, using as implicit equilibrium value. The formula for this potential term is:

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

out-of-plane potential, result will be added to V

public subroutine opb_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

Gradients of bond stretching terms of potential energy

public subroutine pitors_init(bds, n)

Initialize arrays needed to compute pi-torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of out of plane pi-torsion functions in the potential enerpgy of the system

public subroutine pitors_potential(bds, V)

Compute pi-torsion terms of the potential.
This potential is defined on a -system, and uses the coordinates of six atoms A...F the central "double" bond is A-B, then C and D are connected to A while E and F are connected to B. So two plane ACD and BEF are defined. The potential is computed using the dihedral angle of the normal vector of those two planes, connected by segment A-B ().
The formula used is:

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

pi-torsion potential, result will be added to V

public subroutine pitors_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

improper torsion potential, result will be added to V

public subroutine torsion_init(bds, n)

Initialize torsion potential arrays

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of torsion functions in the potential energy of the system

public subroutine torsion_potential(bds, V)

Compute torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

torsion potential, result will be added to V

public subroutine torsion_geomgrad(bds, grad)

Compute torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

Gradients of bond stretching terms of potential energy

public subroutine imptorsion_potential(bds, V)

Compute torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

improper torsion potential, result will be added to V

public subroutine imptorsion_geomgrad(bds, grad)

Compute torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

improper torsion potential, result will be added to V

public subroutine imptorsion_init(bds, n)

Initialize improper torsion potential arrays

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of improper torsion functions in the potential energy of the system

public subroutine angtor_init(bds, n)

Initialize angle-torsion coupling potential arrays

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of angle torsion coupling functions in the potential energy of the system

public subroutine strtor_init(bds, n)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

public subroutine angtor_potential(bds, V)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

public subroutine angtor_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

improper torsion potential, result will be added to V

public subroutine strtor_potential(bds, V)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

public subroutine strtor_geomgrad(bds, grad)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

improper torsion potential, result will be added to V

public subroutine tortor_init(bds, n)

Initialize torsion-torsion correction potential arrays

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of torsion-torsion 'map' functions in the potential energy of the system

public subroutine tortor_newmap(bds, d1, d2, ang1, ang2, v)

Store in module memory the data describing a new torsion-torsion map

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip), intent(in) :: d1

Dimensions of the new map to be saved

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

Dimensions of the new map to be saved

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

Value of torsion1 for the new map

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

Value of torsion2 for the new map

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

Value of potential for the new map

public subroutine tortor_potential(bds, V)

Compute torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: V

torsion potential, result will be added to V

public subroutine tortor_geomgrad(bds, grad)

Compute torsion potential

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(in) :: bds
real(kind=rp), intent(inout) :: grad(3,bds%top%mm_atoms)

improper torsion potential, result will be added to V

public subroutine bonded_terminate(bds)

Just terminate every "submodule" in bonded, deallocating arrays and disabling the potential terms

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine bond_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine angle_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine strbnd_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine urey_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine opb_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine pitors_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine torsion_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine imptorsion_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine tortor_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine angtor_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds

public subroutine strtor_terminate(bds)

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds