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 |
implicit none |
11 |
|
12 |
PRIVATE |
13 |
|
14 |
public::cutoffNotify |
15 |
|
16 |
contains |
17 |
|
18 |
subroutine cutoffNotify( this_rcut, this_rlist, this_ecr, this_est ) |
19 |
|
20 |
real(kind=dp), intent(in) :: this_rcut, this_rlist, this_ecr, this_est |
21 |
|
22 |
real(kind=dp) :: rtaper, rcut, rlist, ecr |
23 |
integer :: localError |
24 |
|
25 |
rcut = this_rcut |
26 |
rlist = this_rlist |
27 |
ecr = this_ecr |
28 |
rtaper = this_ecr - this_est |
29 |
|
30 |
if ((rlist .lt. rcut) .or. (rlist .lt. ecr)) then |
31 |
write(*,*) 'warning, rlist = ', rlist, ' but rcut, ecr = ', rcut, ecr |
32 |
endif |
33 |
|
34 |
call setRlistDF( rlist ) |
35 |
call setCutoffsCharge( ecr, rtaper ) |
36 |
call setCutoffsDipole( ecr, rtaper ) |
37 |
call setCutoffsRF( ecr, rtaper ) |
38 |
call setCutoffLJ( rcut, localError ) |
39 |
call setCutoffEAM(rcut,localError) |
40 |
|
41 |
end subroutine cutoffNotify |
42 |
|
43 |
end module notifyCutoffs |