Initialize improper torsion potential arrays
Type | Intent | Optional | 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 |
subroutine imptorsion_init(bds, n)
!! Initialize improper torsion potential arrays
use mod_memory, only: mallocate
implicit none
type(ommp_bonded_type), intent(inout) :: bds
! Bonded potential data structure
integer(ip) :: n
!! Number of improper torsion functions in the potential
!! energy of the system
if( n < 1 ) return
bds%use_imptorsion = .true.
call mallocate('imptorsion_init [imptorsionat]', 4_ip, n, bds%imptorsionat)
call mallocate('imptorsion_init [imptorsamp]', 3_ip, n, bds%imptorsamp)
call mallocate('imptorsion_init [imptorsphase]', 3_ip, n, bds%imptorsphase)
call mallocate('imptorsion_init [imptorsn]', 3_ip, n, bds%imptorsn)
bds%nimptorsion = n
end subroutine imptorsion_init