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

Comparing:
branches/mmeineke/OOPSE/libmdtools/calc_dipole_dipole.F90 (file contents), Revision 377 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
trunk/OOPSE/libmdtools/calc_dipole_dipole.F90 (file contents), Revision 443 by mmeineke, Wed Apr 2 22:19:03 2003 UTC

# Line 23 | Line 23 | contains
23      rt = this_rt    
24      rrfsq = rrf * rrf
25      ! pre converts from mu in units of debye to kcal/mol
26 <    pre = 14.38362d0
27 <    
26 >    pre = 14.38362_dp
27 >
28      dipole_initialized = .true.
29      
30      return
# Line 79 | Line 79 | contains
79      ul2(3) = u_l(3,atom2)
80   #endif
81  
82 +    if( atom1 .eq. 2 )then
83 +       write (*,*) 'ul =', ul1(1), ul1(2), ul1(3)
84 +    endif
85 +
86 +    if( atom2 .eq. 2 )then
87 +       write (*,*) 'ul =', ul2(1), ul2(2), ul2(3)
88 +    endif
89 +
90 +
91      call getElementProperty(atypes, me1, "dipole_moment", mu1)
92      call getElementProperty(atypes, me2, "dipole_moment", mu2)
93 <    
93 >
94      if (rij.le.rrf) then
95        
96         if (rij.lt.rt) then
# Line 140 | Line 149 | contains
149        
150        
151   #ifdef IS_MPI
152 <       f_Row(1,atom1) = f_Row(1,atom1) + dudx
153 <       f_Row(2,atom1) = f_Row(2,atom1) + dudy
154 <       f_Row(3,atom1) = f_Row(3,atom1) + dudz
152 >       f_Row(1,atom1) = f_Row(1,atom1) - dudx
153 >       f_Row(2,atom1) = f_Row(2,atom1) - dudy
154 >       f_Row(3,atom1) = f_Row(3,atom1) - dudz
155  
156 <       f_Col(1,atom2) = f_Col(1,atom2) - dudx
157 <       f_Col(2,atom2) = f_Col(2,atom2) - dudy
158 <       f_Col(3,atom2) = f_Col(3,atom2) - dudz
156 >       f_Col(1,atom2) = f_Col(1,atom2) + dudx
157 >       f_Col(2,atom2) = f_Col(2,atom2) + dudy
158 >       f_Col(3,atom2) = f_Col(3,atom2) + dudz
159        
160         t_Row(1,atom1) = t_Row(1,atom1) - ul1(2)*dudu1z + ul1(3)*dudu1y
161         t_Row(2,atom1) = t_Row(2,atom1) - ul1(3)*dudu1x + ul1(1)*dudu1z
# Line 156 | Line 165 | contains
165         t_Col(2,atom2) = t_Col(2,atom2) - ul2(3)*dudu2x + ul2(1)*dudu2z
166         t_Col(3,atom2) = t_Col(3,atom2) - ul2(1)*dudu2y + ul2(2)*dudu2x
167   #else
168 <       f(1,atom1) = f(1,atom1) + dudx
169 <       f(2,atom1) = f(2,atom1) + dudy
170 <       f(3,atom1) = f(3,atom1) + dudz
168 >       f(1,atom1) = f(1,atom1) - dudx
169 >       f(2,atom1) = f(2,atom1) - dudy
170 >       f(3,atom1) = f(3,atom1) - dudz
171        
172 <       f(1,atom2) = f(1,atom2) - dudx
173 <       f(2,atom2) = f(2,atom2) - dudy
174 <       f(3,atom2) = f(3,atom2) - dudz
172 >       f(1,atom2) = f(1,atom2) + dudx
173 >       f(2,atom2) = f(2,atom2) + dudy
174 >       f(3,atom2) = f(3,atom2) + dudz
175        
176         t(1,atom1) = t(1,atom1) - ul1(2)*dudu1z + ul1(3)*dudu1y
177         t(2,atom1) = t(2,atom1) - ul1(3)*dudu1x + ul1(1)*dudu1z

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines