Initialize Urey-Bradley potential arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ommp_bonded_type), | intent(inout) | :: | bds | |||
integer(kind=ip) | :: | n |
Number of Urey-Bradley functions in the potential energy of the system |
subroutine urey_init(bds, n)
!! Initialize Urey-Bradley 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 Urey-Bradley functions in the potential
!! energy of the system
if( n < 1 ) return
bds%use_urey = .true.
call mallocate('urey_init [ureya]', 2, n, bds%ureyat)
call mallocate('urey_init [kurey]', n, bds%kurey)
call mallocate('urey_init [l0urey]', n, bds%l0urey)
bds%nurey = n
bds%urey_cubic = 0.0_rp
bds%urey_quartic = 0.0_rp
end subroutine urey_init