--- trunk/OOPSE/libmdtools/notifyCutoffs.F90 2004/05/07 21:35:05 1150 +++ trunk/OOPSE/libmdtools/notifyCutoffs.F90 2004/05/11 16:00:22 1154 @@ -19,35 +19,33 @@ module notifyCutoffs contains - subroutine cutoffNotify( this_rcut, this_rlist, this_ecr, this_est ) + subroutine cutoffNotify( this_rcut, this_rsw, this_rlist ) - real(kind=dp), intent(in) :: this_rcut, this_rlist, this_ecr, this_est + real(kind=dp), intent(in) :: this_rcut, this_rsw, this_rlist - real(kind=dp) :: rtaper, rcut, rlist, ecr + real(kind=dp) :: rsw, rcut, rlist integer :: localError rcut = this_rcut + rsw = this_rsw rlist = this_rlist - ecr = this_ecr - rtaper = this_ecr - this_est - if ((rlist .lt. rcut) .or. (rlist .lt. ecr)) then - write(*,*) 'warning, rlist = ', rlist, ' but rcut, ecr = ', rcut, ecr + if (rcut .lt. rsw) then + write(*,*) 'warning, rcut = ', rcut, ' but rsw = ', rsw endif + if (rlist .lt. rcut) then + write(*,*) 'warning, rlist = ', rlist, ' but rcut = ', rcut + endif + call setRlistDF( rlist ) - call setCutoffsCharge( ecr, rtaper ) - call setCutoffsDipole( ecr, rtaper ) - call setCutoffsRF( ecr, rtaper ) + call setCutoffsCharge( rcut, rsw ) + call setCutoffsDipole( rcut, rsw ) + call setCutoffsRF( rcut, rsw ) call setCutoffLJ( rcut, localError ) - call setCutoffEAM(rcut, localError) + call setCutoffEAM( rcut, localError) + call set_switch(GROUP_SWITCH, rsw, rcut) - if (ecr.gt.rcut) then - call set_switch(GROUP_SWITCH, rtaper, ecr) - else - call set_switch(GROUP_SWITCH, rcut, rcut) - endif - end subroutine cutoffNotify end module notifyCutoffs