Initialize arrays for out-of-plane bending potential calculation.
Currently only Allinger functional form is supported
Type | Intent | Optional | 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 |
subroutine opb_init(bds, n, opbtype)
!! Initialize arrays for out-of-plane bending potential calculation.
!! @todo Currently only Allinger functional form is supported
use mod_io, only: ommp_message
use mod_constants, only: OMMP_VERBOSE_LOW
use mod_memory, only: mallocate
implicit none
type(ommp_bonded_type), intent(inout) :: bds
! Bonded potential data structure
integer(ip) :: n
!! Number of out of plane Bending functions in the potential
!! energy of the system
character(len=*) :: opbtype
select case(opbtype)
case('allinger')
continue
case('w-d-c')
call fatal_error('Out-of-plane bend W-D-C is not implemented')
case default
call ommp_message("Found OPB type: '"//opbtype//"'", OMMP_VERBOSE_LOW)
call fatal_error('Out-of-plane type specified is not understood')
end select
if( n < 1 ) return
bds%use_opb = .true.
call mallocate('opb_init [opbat]', 4, n, bds%opbat)
call mallocate('opb_init [kopb]', n, bds%kopb)
bds%nopb = n
end subroutine opb_init