--- trunk/OOPSE/libmdtools/notifyCutoffs.F90 2003/10/30 18:59:20 845 +++ trunk/OOPSE/libmdtools/notifyCutoffs.F90 2004/05/11 16:00:22 1154 @@ -2,39 +2,49 @@ module notifyCutoffs use definitions use do_Forces, only: setRlistDF + use charge_charge, only: setCutoffsCharge use dipole_dipole, only: setCutoffsDipole use reaction_field, only: setCutoffsRF use lj, only: setCutoffLJ use eam, only: setCutoffEAM + use switcheroo, only: set_switch implicit none PRIVATE + +#define __FORTRAN90 +#include "fSwitchingFunction.h" public::cutoffNotify 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 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) end subroutine cutoffNotify