Initialize torsion potential arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ommp_bonded_type), | intent(inout) | :: | bds | |||
integer(kind=ip) | :: | n |
Number of torsion functions in the potential energy of the system |
subroutine torsion_init(bds, n)
!! Initialize 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 torsion functions in the potential
!! energy of the system
if( n < 1 ) return
bds%use_torsion = .true.
call mallocate('torsion_init [torsionat]', 4, n, bds%torsionat)
call mallocate('torsion_init [torsamp]', 6, n, bds%torsamp)
call mallocate('torsion_init [torsphase]', 6, n, bds%torsphase)
call mallocate('torsion_init [torsn]', 6, n, bds%torsn)
bds%ntorsion = n
end subroutine torsion_init