ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/calc_reaction_field.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/calc_reaction_field.F90 (file contents):
Revision 621 by gezelter, Wed Jul 16 02:11:02 2003 UTC vs.
Revision 626 by mmeineke, Wed Jul 16 21:30:56 2003 UTC

# Line 9 | Line 9 | module reaction_field
9   #endif
10    implicit none
11  
12 <  real(kind=dp), save :: rrf
12 >  PRIVATE
13 >  
14 >  real(kind=dp), save :: rrf = 1.0_dp
15    real(kind=dp), save :: rt
16 <  real(kind=dp), save :: dielect
17 <  real(kind=dp), save :: rrfsq
16 >  real(kind=dp), save :: dielect = 1.0_dp
17 >  real(kind=dp), save :: rrfsq = 1.0_dp
18    real(kind=dp), save :: pre
19 <  logical, save :: rf_initialized = .false.
19 >  logical, save :: rf_initialized = .false., haveCuts = .false.
20 >  logical, save :: haveDie = .false.
21  
22 +  PUBLIC::initialize_rf
23 +  PUBLIC::setCutoffsRF
24 +  PUBLIC::accumulate_rf
25 +  PUBLIC::accumulate_self_rf
26 +  PUBLIC::reaction_field_final
27 +  PUBLIC::rf_correct_forces
28 +
29   contains
30    
31 <  subroutine initialize_rf(this_rrf, this_rt, this_dielect)
32 <    real(kind=dp), intent(in) :: this_rrf, this_rt, this_dielect
33 <
24 <    rrf = this_rrf
25 <    rt = this_rt
31 >  subroutine initialize_rf(this_dielect)
32 >    real(kind=dp), intent(in) :: this_dielect
33 >    
34      dielect = this_dielect
35 +
36 +    pre = 14.38362d0*2.0d0*(dielect-1.0d0)/((2.0d0*dielect+1.0d0)*rrfsq*rrf)
37      
38 +    haveDie = .true.
39 +    if (haveCuts) rf_initialized = .true.
40 +
41 +    return
42 +  end subroutine initialize_rf
43 +
44 +  subroutine setCutoffsRF( this_rrf, this_rt )
45 +
46 +    real(kind=dp), intent(in) :: this_rrf, this_rt
47 +
48 +    rrf = this_rrf
49 +    rt  = this_rt
50 +
51      rrfsq = rrf * rrf
52      pre = 14.38362d0*2.0d0*(dielect-1.0d0)/((2.0d0*dielect+1.0d0)*rrfsq*rrf)
53      
54 +    haveCuts = .true.
55 +    if (haveDie) rf_initialized = .true.
56  
57 <    write(*,*) 'rrf = ', rrf
58 <    write(*,*) 'rt = ', rt
34 <    write(*,*) 'dielect = ', dielect
35 <    write(*,*) 'pre = ', pre
36 <    rf_initialized = .true.
37 <    
38 <    return
39 <  end subroutine initialize_rf
57 >  end subroutine setCutoffsRF
58 >
59    
60    subroutine accumulate_rf(atom1, atom2, rij, u_l)
61  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines