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 2231 by chrisfen, Wed May 18 18:31:40 2005 UTC vs.
Revision 2251 by chrisfen, Sun May 29 21:16:25 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, ebalance)
310 >       vpair, fpair, pot, eFrame, f, t, do_pot)
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
321  
322      real( kind = dp ) :: pot
323      real( kind = dp ), dimension(9,nLocal) :: eFrame
# Line 485 | Line 484 | contains
484         cy_j = uy_j(1)*xhat + uy_j(2)*yhat + uy_j(3)*zhat
485         cz_j = uz_j(1)*xhat + uz_j(2)*yhat + uz_j(3)*zhat
486      endif
487 <    
488 <    switcher = 1.0d0
489 <    dswitcher = 0.0d0
490 <    ebalance = 0.0d0
491 <    ! weaken the dipole interaction at close range for TAP water
492 < !    if (j_is_Tap .and. i_is_Tap) then
493 < !      call calc_switch(rij, mu_i, switcher, dswitcher)
494 < !    endif
487 >  
488 > !!$    switcher = 1.0d0
489 > !!$    dswitcher = 0.0d0
490 > !!$    ebalance = 0.0d0
491 > !!$    ! weaken the dipole interaction at close range for TAP water
492 > !!$    if (j_is_Tap .and. i_is_Tap) then
493 > !!$      call calc_switch(rij, mu_i, switcher, dswitcher)
494 > !!$    endif
495  
496      epot = 0.0_dp
497      dudx = 0.0_dp
# Line 662 | Line 661 | contains
661  
662            pref = pre22 * mu_i * mu_j
663            vterm = pref * ri3 * (ct_ij - 3.0d0 * ct_i * ct_j * sc2)
664 <          ebalance = vterm * (1.0d0 - switcher)
665 <          vpair = vpair + switcher * vterm
667 <          epot = epot + sw * switcher * vterm
664 >          vpair = vpair + vterm
665 >          epot = epot + sw * vterm
666  
667            a1 = 5.0d0 * ct_i * ct_j * sc2 - ct_ij
668  
669 <          dudx = dudx + switcher*pref*sw*3.0d0*ri4*scale &
670 <                         *(a1*xhat-ct_i*uz_j(1)-ct_j*uz_i(1)) + vterm*dswitcher
671 <          dudy = dudy + switcher*pref*sw*3.0d0*ri4*scale &
672 <                         *(a1*yhat-ct_i*uz_j(2)-ct_j*uz_i(2)) + vterm*dswitcher
673 <          dudz = dudz + switcher*pref*sw*3.0d0*ri4*scale &
674 <                         *(a1*zhat-ct_i*uz_j(3)-ct_j*uz_i(3)) + vterm*dswitcher
669 >          dudx = dudx + pref*sw*3.0d0*ri4*scale &
670 >                         *(a1*xhat-ct_i*uz_j(1)-ct_j*uz_i(1))
671 >          dudy = dudy + pref*sw*3.0d0*ri4*scale &
672 >                         *(a1*yhat-ct_i*uz_j(2)-ct_j*uz_i(2))
673 >          dudz = dudz + pref*sw*3.0d0*ri4*scale &
674 >                         *(a1*zhat-ct_i*uz_j(3)-ct_j*uz_i(3))
675  
676 <          duduz_i(1) = duduz_i(1) + switcher*pref*sw*ri3 &
676 >          duduz_i(1) = duduz_i(1) + pref*sw*ri3 &
677                                       *(uz_j(1) - 3.0d0*ct_j*xhat*sc2)
678 <          duduz_i(2) = duduz_i(2) + switcher*pref*sw*ri3 &
678 >          duduz_i(2) = duduz_i(2) + pref*sw*ri3 &
679                                       *(uz_j(2) - 3.0d0*ct_j*yhat*sc2)
680 <          duduz_i(3) = duduz_i(3) + switcher*pref*sw*ri3 &
680 >          duduz_i(3) = duduz_i(3) + pref*sw*ri3 &
681                                       *(uz_j(3) - 3.0d0*ct_j*zhat*sc2)
682  
683 <          duduz_j(1) = duduz_j(1) + switcher*pref*sw*ri3 &
683 >          duduz_j(1) = duduz_j(1) + pref*sw*ri3 &
684                                       *(uz_i(1) - 3.0d0*ct_i*xhat*sc2)
685 <          duduz_j(2) = duduz_j(2) + switcher*pref*sw*ri3 &
685 >          duduz_j(2) = duduz_j(2) + pref*sw*ri3 &
686                                       *(uz_i(2) - 3.0d0*ct_i*yhat*sc2)
687 <          duduz_j(3) = duduz_j(3) + switcher*pref*sw*ri3 &
687 >          duduz_j(3) = duduz_j(3) + pref*sw*ri3 &
688                                       *(uz_i(3) - 3.0d0*ct_i*zhat*sc2)
689         endif
690  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines