ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/notifyCutoffs.F90
Revision: 1150
Committed: Fri May 7 21:35:05 2004 UTC (20 years, 2 months ago) by gezelter
File size: 1411 byte(s)
Log Message:
Many changes to get group-based cutoffs to work

File Contents

# Content
1 module notifyCutoffs
2
3 use definitions
4 use do_Forces, only: setRlistDF
5 use charge_charge, only: setCutoffsCharge
6 use dipole_dipole, only: setCutoffsDipole
7 use reaction_field, only: setCutoffsRF
8 use lj, only: setCutoffLJ
9 use eam, only: setCutoffEAM
10 use switcheroo, only: set_switch
11 implicit none
12
13 PRIVATE
14
15 #define __FORTRAN90
16 #include "fSwitchingFunction.h"
17
18 public::cutoffNotify
19
20 contains
21
22 subroutine cutoffNotify( this_rcut, this_rlist, this_ecr, this_est )
23
24 real(kind=dp), intent(in) :: this_rcut, this_rlist, this_ecr, this_est
25
26 real(kind=dp) :: rtaper, rcut, rlist, ecr
27 integer :: localError
28
29 rcut = this_rcut
30 rlist = this_rlist
31 ecr = this_ecr
32 rtaper = this_ecr - this_est
33
34 if ((rlist .lt. rcut) .or. (rlist .lt. ecr)) then
35 write(*,*) 'warning, rlist = ', rlist, ' but rcut, ecr = ', rcut, ecr
36 endif
37
38 call setRlistDF( rlist )
39 call setCutoffsCharge( ecr, rtaper )
40 call setCutoffsDipole( ecr, rtaper )
41 call setCutoffsRF( ecr, rtaper )
42 call setCutoffLJ( rcut, localError )
43 call setCutoffEAM(rcut, localError)
44
45 if (ecr.gt.rcut) then
46 call set_switch(GROUP_SWITCH, rtaper, ecr)
47 else
48 call set_switch(GROUP_SWITCH, rcut, rcut)
49 endif
50
51 end subroutine cutoffNotify
52
53 end module notifyCutoffs