Initialize arrays for calculation of stretch-bend cross term potential
Type | Intent | Optional | 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 |
subroutine strbnd_init(bds, n)
!! Initialize arrays for calculation of stretch-bend cross term
!! potential
use mod_memory, only: mallocate
implicit none
type(ommp_bonded_type), intent(inout) :: bds
! Bonded potential data structure
integer(ip) :: n
!! Number of stretch-bend functions in the potential
!! energy of the system
if( n < 1 ) return
bds%use_strbnd = .true.
call mallocate('strbnd_init [strbndat]', 3_ip, n, bds%strbndat)
call mallocate('strbnd_init [strbndl10]', n, bds%strbndl10)
call mallocate('strbnd_init [strbndl20]', n, bds%strbndl20)
call mallocate('strbnd_init [strbndthet0]', n, bds%strbndthet0)
call mallocate('strbnd_init [strbndk1]', n, bds%strbndk1)
call mallocate('strbnd_init [strbndk2]', n, bds%strbndk2)
bds%nstrbnd = n
end subroutine strbnd_init