17 #include "../base/base_uses.f90"
23 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'force_field_kind_types'
45 TYPE legendre_data_type
47 REAL(kind=
dp),
DIMENSION(:),
POINTER :: coeffs => null()
48 END TYPE legendre_data_type
53 REAL(kind=
dp) :: k(3) = 0.0_dp, r0 = 0.0_dp, cs = 0.0_dp
54 INTEGER :: kind_number = 0
55 END TYPE bond_kind_type
60 REAL(kind=
dp) :: k = 0.0_dp, theta0 = 0.0_dp, cb = 0.0_dp
61 REAL(kind=
dp) :: r012 = 0.0_dp, r032 = 0.0_dp, kbs12 = 0.0_dp, kbs32 = 0.0_dp, kss = 0.0_dp
62 TYPE(legendre_data_type) :: legendre = legendre_data_type()
63 INTEGER :: kind_number = 0
64 END TYPE bend_kind_type
69 REAL(kind=
dp) :: k(3) = 0.0_dp, r0 = 0.0_dp
70 INTEGER :: kind_number = 0
74 TYPE torsion_kind_type
77 INTEGER,
POINTER :: m(:) => null()
78 REAL(kind=
dp),
POINTER :: k(:) => null(), phi0(:) => null()
79 INTEGER :: kind_number = 0
80 END TYPE torsion_kind_type
85 REAL(kind=
dp) :: k = 0.0_dp, phi0 = 0.0_dp
86 INTEGER :: kind_number = 0
87 END TYPE impr_kind_type
92 REAL(kind=
dp) :: k = 0.0_dp, phi0 = 0.0_dp
93 INTEGER :: kind_number = 0
94 END TYPE opbend_kind_type
111 PUBLIC :: bend_kind_type, &
128 TYPE(bend_kind_type),
DIMENSION(:),
POINTER :: bend_kind_set
129 INTEGER,
INTENT(IN) :: nkind
133 NULLIFY (bend_kind_set)
134 ALLOCATE (bend_kind_set(nkind))
136 bend_kind_set(ikind)%kind_number = ikind
147 TYPE(bond_kind_type),
DIMENSION(:),
POINTER :: bond_kind_set
148 INTEGER,
INTENT(IN) :: nkind
152 NULLIFY (bond_kind_set)
153 ALLOCATE (bond_kind_set(nkind))
155 bond_kind_set(ikind)%kind_number = ikind
166 TYPE(torsion_kind_type),
DIMENSION(:),
POINTER :: torsion_kind_set
167 INTEGER,
INTENT(IN) :: nkind
171 NULLIFY (torsion_kind_set)
172 ALLOCATE (torsion_kind_set(nkind))
174 torsion_kind_set(ikind)%kind_number = ikind
185 TYPE(ub_kind_type),
DIMENSION(:),
POINTER :: ub_kind_set
186 INTEGER,
INTENT(IN) :: nkind
190 NULLIFY (ub_kind_set)
191 ALLOCATE (ub_kind_set(nkind))
193 ub_kind_set(ikind)%kind_number = ikind
204 TYPE(impr_kind_type),
DIMENSION(:),
POINTER :: impr_kind_set
205 INTEGER,
INTENT(IN) :: nkind
209 NULLIFY (impr_kind_set)
210 ALLOCATE (impr_kind_set(nkind))
212 impr_kind_set(ikind)%kind_number = ikind
223 TYPE(opbend_kind_type),
DIMENSION(:),
POINTER :: opbend_kind_set
224 INTEGER,
INTENT(IN) :: nkind
228 NULLIFY (opbend_kind_set)
229 ALLOCATE (opbend_kind_set(nkind))
231 opbend_kind_set(ikind)%kind_number = ikind
241 TYPE(bend_kind_type),
DIMENSION(:),
POINTER :: bend_kind_set
245 IF (.NOT.
ASSOCIATED(bend_kind_set))
RETURN
246 DO i = 1,
SIZE(bend_kind_set)
247 IF (
ASSOCIATED(bend_kind_set(i)%legendre%coeffs))
THEN
248 DEALLOCATE (bend_kind_set(i)%legendre%coeffs)
251 DEALLOCATE (bend_kind_set)
260 TYPE(bond_kind_type),
DIMENSION(:),
POINTER :: bond_kind_set
262 DEALLOCATE (bond_kind_set)
272 TYPE(torsion_kind_type),
INTENT(INOUT) :: torsion_kind
274 IF (
ASSOCIATED(torsion_kind%k))
THEN
275 DEALLOCATE (torsion_kind%k)
277 IF (
ASSOCIATED(torsion_kind%m))
THEN
278 DEALLOCATE (torsion_kind%m)
280 IF (
ASSOCIATED(torsion_kind%phi0))
THEN
281 DEALLOCATE (torsion_kind%phi0)
291 TYPE(ub_kind_type),
DIMENSION(:),
POINTER :: ub_kind_set
293 DEALLOCATE (ub_kind_set)
Define all structure types related to force field kinds.
integer, parameter, public do_ff_legendre
pure subroutine, public deallocate_bend_kind_set(bend_kind_set)
Deallocate a bend kind set.
integer, parameter, public do_ff_undef
integer, parameter, public do_ff_mm4
pure subroutine, public allocate_impr_kind_set(impr_kind_set, nkind)
Allocate and initialize a impr kind set.
pure subroutine, public torsion_kind_dealloc_ref(torsion_kind)
Deallocate a torsion kind element.
pure subroutine, public allocate_torsion_kind_set(torsion_kind_set, nkind)
Allocate and initialize a torsion kind set.
pure subroutine, public allocate_bond_kind_set(bond_kind_set, nkind)
Allocate and initialize a bond kind set.
integer, parameter, public do_ff_charmm
pure subroutine, public allocate_opbend_kind_set(opbend_kind_set, nkind)
Allocate and initialize a opbend kind set.
integer, parameter, public do_ff_mm3
integer, parameter, public do_ff_g87
integer, parameter, public do_ff_g96
pure subroutine, public ub_kind_dealloc_ref(ub_kind_set)
Deallocate a ub kind set.
integer, parameter, public do_ff_morse
integer, parameter, public do_ff_mm2
integer, parameter, public do_ff_harmonic
pure subroutine, public allocate_bend_kind_set(bend_kind_set, nkind)
Allocate and initialize a bend kind set.
integer, parameter, public do_ff_amber
pure subroutine, public deallocate_bond_kind_set(bond_kind_set)
Deallocate a bond kind set.
integer, parameter, public do_ff_mixed_bend_stretch
integer, parameter, public do_ff_cubic
integer, parameter, public do_ff_quartic
pure subroutine, public allocate_ub_kind_set(ub_kind_set, nkind)
Allocate and initialize a ub kind set.
pure subroutine, public impr_kind_dealloc_ref()
Deallocate a impr kind element.
integer, parameter, public do_ff_fues
integer, parameter, public do_ff_opls
Defines the basic variable types.
integer, parameter, public dp