1 |
module notifyCutoffs |
2 |
|
3 |
use definitions |
4 |
use do_Forces, only: setRlistDF |
5 |
use dipole_dipole, only: setCutoffsDipole |
6 |
use reaction_field, only: setCutoffsRF |
7 |
use lj, only: setCutoffLJ |
8 |
use eam, only: setCutoffEAM |
9 |
implicit none |
10 |
|
11 |
PRIVATE |
12 |
|
13 |
public::cutoffNotify |
14 |
|
15 |
contains |
16 |
|
17 |
subroutine cutoffNotify( this_rcut, this_rlist, this_ecr, this_est ) |
18 |
|
19 |
real(kind=dp), intent(in) :: this_rcut, this_rlist, this_ecr, this_est |
20 |
|
21 |
real(kind=dp) :: rtaper, rcut, rlist, ecr |
22 |
integer :: localError |
23 |
|
24 |
rcut = this_rcut |
25 |
rlist = this_rlist |
26 |
ecr = this_ecr |
27 |
rtaper = this_ecr - this_est |
28 |
|
29 |
if ((rlist .lt. rcut) .or. (rlist .lt. ecr)) then |
30 |
write(*,*) 'warning, rlist = ', rlist, ' but rcut, ecr = ', rcut, ecr |
31 |
endif |
32 |
|
33 |
call setRlistDF( rlist ) |
34 |
call setCutoffsDipole( ecr, rtaper ) |
35 |
call setCutoffsRF( ecr, rtaper ) |
36 |
call setCutoffLJ( rcut, localError ) |
37 |
call setCutoffEAM(rcut,localError) |
38 |
|
39 |
end subroutine cutoffNotify |
40 |
|
41 |
end module notifyCutoffs |