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

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/gb.F90 (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2355 by chuckv, Wed Oct 12 18:59:16 2005 UTC

# Line 63 | Line 63 | module gb_pair
63    public :: check_gb_pair_FF
64    public :: set_gb_pair_params
65    public :: do_gb_pair
66 +  public :: getGayBerneCut
67  
68   contains
69  
# Line 88 | Line 89 | contains
89      return
90    end subroutine set_gb_pair_params
91  
92 +  !! gay berne cutoff should be a parameter in globals, this is a temporary
93 +  !! work around - this should be fixed when gay berne is up and running
94 +  function getGayBerneCut(atomID) result(cutValue)
95 +    integer, intent(in) :: atomID !! nah... we don't need to use this...
96 +    real(kind=dp) :: cutValue
97  
98 +    cutValue = gb_l2b_ratio*gb_sigma*2.5_dp
99 +  end function getGayBerneCut
100 +
101    subroutine do_gb_pair(atom1, atom2, d, r, r2, sw, vpair, fpair, &
102         pot, A, f, t, do_pot)
103      
# Line 220 | Line 229 | contains
229      dgdy = term1y + line3y
230      dgdz = term1z + line3z
231  
232 <    term1u1x = 2.0d0*(line1a+line2a)*d(1)
233 <    term1u1y = 2.0d0*(line1a+line2a)*d(2)
234 <    term1u1z = 2.0d0*(line1a+line2a)*d(3)
235 <    term1u2x = 2.0d0*(line1a-line2a)*d(1)
236 <    term1u2y = 2.0d0*(line1a-line2a)*d(2)
237 <    term1u2z = 2.0d0*(line1a-line2a)*d(3)
232 >    term1u1x = (line1a+line2a)*dru1dx
233 >    term1u1y = (line1a+line2a)*dru1dy
234 >    term1u1z = (line1a+line2a)*dru1dz
235 >    term1u2x = (line1a-line2a)*dru2dx
236 >    term1u2y = (line1a-line2a)*dru2dy
237 >    term1u2z = (line1a-line2a)*dru2dz
238      
239      term2a = -line3a/opXdot
240      term2b =  line3b/omXdot
# Line 261 | Line 270 | contains
270      dBigRdx = drdx/gb_sigma + dgdx*gfact
271      dBigRdy = drdy/gb_sigma + dgdy*gfact
272      dBigRdz = drdz/gb_sigma + dgdz*gfact
273 +
274      dBigRdu1x = dgdu1x*gfact
275      dBigRdu1y = dgdu1y*gfact
276      dBigRdu1z = dgdu1z*gfact
277      dBigRdu2x = dgdu2x*gfact
278      dBigRdu2y = dgdu2y*gfact
279      dBigRdu2z = dgdu2z*gfact
280 <  
280 >
281      ! Now, we must do it again for g(ChiPrime) and dgpdx
282  
283      line1a = dotsum/opXpdot
# Line 286 | Line 296 | contains
296      dgpdy = term1y + line3y
297      dgpdz = term1z + line3z
298      
299 <    term1u1x = 2.0d0*(line1a+line2a)*d(1)
300 <    term1u1y = 2.0d0*(line1a+line2a)*d(2)
301 <    term1u1z = 2.0d0*(line1a+line2a)*d(3)
302 <    term1u2x = 2.0d0*(line1a-line2a)*d(1)
303 <    term1u2y = 2.0d0*(line1a-line2a)*d(2)
304 <    term1u2z = 2.0d0*(line1a-line2a)*d(3)
305 <    
299 >    term1u1x = (line1a+line2a)*dru1dx
300 >    term1u1y = (line1a+line2a)*dru1dy
301 >    term1u1z = (line1a+line2a)*dru1dz
302 >    term1u2x = (line1a-line2a)*dru2dx
303 >    term1u2y = (line1a-line2a)*dru2dy
304 >    term1u2z = (line1a-line2a)*dru2dz
305 >
306      term2a = -line3a/opXpdot
307      term2b =  line3b/omXpdot
308      
# Line 316 | Line 326 | contains
326      gmu = gp**gb_mu
327      gpi = 1.0d0 / gp
328      gmum = gmu*gpi
329 <  
320 <    ! write(*,*) atom1, atom2, Chi, u1dotu2
329 >
330      curlyE = 1.0d0/dsqrt(1.0d0 - Chi*Chi*u1dotu2*u1dotu2)
331  
332      dcE = (curlyE**3)*Chi*Chi*u1dotu2
# Line 397 | Line 406 | contains
406              
407      if (do_pot) then
408   #ifdef IS_MPI
409 <       pot_row(atom1) = pot_row(atom1) + 2.0d0*eps*R126*sw
410 <       pot_col(atom2) = pot_col(atom2) + 2.0d0*eps*R126*sw
409 >       pot_row(GAYBERNE_POT,atom1) = pot_row(GAYBERNE_POT,atom1) + 2.0d0*eps*R126*sw
410 >       pot_col(GAYBERNE_POT,atom2) = pot_col(GAYBERNE_POT,atom2) + 2.0d0*eps*R126*sw
411   #else
412         pot = pot + 4.0*eps*R126*sw
413   #endif
# Line 425 | Line 434 | end module gb_pair
434    end subroutine do_gb_pair
435  
436   end module gb_pair
428
429
430  subroutine set_gb_pair_params(sigma, l2b_ratio, eps, eps_ratio, mu, nu)
431    use definitions, ONLY : dp
432    use gb_pair, ONLY : module_set_gb_pair_params => set_gb_pair_params
433    real( kind = dp ), intent(inout) :: sigma, l2b_ratio, eps, eps_ratio
434    real( kind = dp ), intent(inout) :: mu, nu
435    call module_set_gb_pair_params(sigma, l2b_ratio, eps, eps_ratio, mu, nu)
436 end subroutine set_gb_pair_params

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines