ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/UseTheForce/DarkSide/electrostatic.F90
(Generate patch)

Comparing trunk/OOPSE-3.0/src/UseTheForce/DarkSide/electrostatic.F90 (file contents):
Revision 2229 by chrisfen, Tue May 17 22:35:01 2005 UTC vs.
Revision 2231 by chrisfen, Wed May 18 18:31:40 2005 UTC

# Line 307 | Line 307 | contains
307    end function getDipoleMoment
308  
309    subroutine doElectrostaticPair(atom1, atom2, d, rij, r2, sw, &
310 <       vpair, fpair, pot, eFrame, f, t, do_pot)
310 >       vpair, fpair, pot, eFrame, f, t, do_pot, ebalance)
311  
312      logical, intent(in) :: do_pot
313  
# Line 318 | Line 318 | contains
318      real(kind=dp), intent(in), dimension(3) :: d
319      real(kind=dp), intent(inout) :: vpair
320      real(kind=dp), intent(inout), dimension(3) :: fpair
321 +    real(kind=dp), intent(inout) :: ebalance
322  
323      real( kind = dp ) :: pot
324      real( kind = dp ), dimension(9,nLocal) :: eFrame
# Line 487 | Line 488 | contains
488      
489      switcher = 1.0d0
490      dswitcher = 0.0d0
491 +    ebalance = 0.0d0
492 +    ! weaken the dipole interaction at close range for TAP water
493   !    if (j_is_Tap .and. i_is_Tap) then
494   !      call calc_switch(rij, mu_i, switcher, dswitcher)
495   !    endif
# Line 659 | Line 662 | contains
662  
663            pref = pre22 * mu_i * mu_j
664            vterm = pref * ri3 * (ct_ij - 3.0d0 * ct_i * ct_j * sc2)
665 <          vpair = vpair + vterm
666 <          epot = epot + sw * vterm
665 >          ebalance = vterm * (1.0d0 - switcher)
666 >          vpair = vpair + switcher * vterm
667 >          epot = epot + sw * switcher * vterm
668  
669            a1 = 5.0d0 * ct_i * ct_j * sc2 - ct_ij
670  
# Line 850 | Line 854 | contains
854  
855      ! distances must be in angstroms
856      rl = 2.75d0
857 <    ru = 2.85d0
858 <    mulow = 3.3856d0 ! 1.84 * 1.84
857 >    ru = 3.75d0
858 >    mulow = 0.0d0 !3.3856d0 ! 1.84 * 1.84
859      minRatio = mulow / (mu*mu)
860      scaleVal = 1.0d0 - minRatio
861      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines