42 |
|
module notifyCutoffs |
43 |
|
|
44 |
|
use definitions |
45 |
< |
use doForces, only: setRlistDF |
45 |
> |
use doForces, only: setDefaultCutoffs |
46 |
|
use reaction_field, only: setCutoffsRF |
47 |
< |
use lj, only: setCutoffLJ |
47 |
> |
use lj, only: setLJDefaultCutoff |
48 |
|
use eam, only: setCutoffEAM |
49 |
|
use switcheroo, only: set_switch |
50 |
|
use status |
56 |
|
|
57 |
|
#define __FORTRAN90 |
58 |
|
#include "UseTheForce/fSwitchingFunction.h" |
59 |
+ |
#include "UseTheForce/fCutoffPolicy.h" |
60 |
|
|
61 |
|
public::cutoffNotify |
62 |
|
|
63 |
|
contains |
64 |
|
|
65 |
< |
subroutine cutoffNotify( this_rcut, this_rsw, this_rlist ) |
65 |
> |
subroutine cutoffNotify( this_rcut, this_rsw, this_rlist, cutPolicy) |
66 |
|
|
67 |
|
real(kind=dp), intent(in) :: this_rcut, this_rsw, this_rlist |
68 |
< |
|
68 |
> |
integer, intent(in) :: cutPolicy |
69 |
|
real(kind=dp) :: rsw, rcut, rlist |
70 |
|
integer :: localError |
71 |
|
logical :: do_shift |
108 |
|
|
109 |
|
endif |
110 |
|
|
111 |
< |
call setRlistDF( rlist ) |
111 |
> |
call setDefaultCutoffs(rcut, rsw, rlist, cutPolicy) |
112 |
|
call setCutoffsRF( rcut, rsw ) |
113 |
< |
call setCutoffLJ( rcut, do_shift, localError ) |
113 |
> |
call setLJDefaultCutoff( rcut, do_shift ) |
114 |
|
call setCutoffEAM( rcut, localError) |
115 |
|
call set_switch(GROUP_SWITCH, rsw, rcut) |
116 |
|
|
117 |
+ |
if (localError /= 0) then |
118 |
+ |
write(errMsg, *) 'An error has occured in setting the default cutoff' |
119 |
+ |
call handleError("cutoffNotify", errMsg) |
120 |
+ |
end if |
121 |
+ |
|
122 |
+ |
|
123 |
|
end subroutine cutoffNotify |
124 |
|
|
125 |
|
end module notifyCutoffs |