63 |
|
public :: check_gb_pair_FF |
64 |
|
public :: set_gb_pair_params |
65 |
|
public :: do_gb_pair |
66 |
+ |
public :: getGayBerneCut |
67 |
|
|
68 |
|
contains |
69 |
|
|
89 |
|
return |
90 |
|
end subroutine set_gb_pair_params |
91 |
|
|
92 |
+ |
function getGayBerneCut(atomID) result(cutValue) |
93 |
+ |
integer, intent(in) :: atomID !! nah... we don't need to use this... |
94 |
+ |
real(kind=dp) :: cutValue |
95 |
|
|
96 |
+ |
cutValue = gb_sigma*2.5_dp |
97 |
+ |
end function getGayBerneCut |
98 |
+ |
|
99 |
|
subroutine do_gb_pair(atom1, atom2, d, r, r2, sw, vpair, fpair, & |
100 |
|
pot, A, f, t, do_pot) |
101 |
|
|
227 |
|
dgdy = term1y + line3y |
228 |
|
dgdz = term1z + line3z |
229 |
|
|
230 |
< |
term1u1x = 2.0d0*(line1a+line2a)*d(1) |
231 |
< |
term1u1y = 2.0d0*(line1a+line2a)*d(2) |
232 |
< |
term1u1z = 2.0d0*(line1a+line2a)*d(3) |
233 |
< |
term1u2x = 2.0d0*(line1a-line2a)*d(1) |
234 |
< |
term1u2y = 2.0d0*(line1a-line2a)*d(2) |
235 |
< |
term1u2z = 2.0d0*(line1a-line2a)*d(3) |
230 |
> |
term1u1x = (line1a+line2a)*dru1dx |
231 |
> |
term1u1y = (line1a+line2a)*dru1dy |
232 |
> |
term1u1z = (line1a+line2a)*dru1dz |
233 |
> |
term1u2x = (line1a-line2a)*dru2dx |
234 |
> |
term1u2y = (line1a-line2a)*dru2dy |
235 |
> |
term1u2z = (line1a-line2a)*dru2dz |
236 |
|
|
237 |
|
term2a = -line3a/opXdot |
238 |
|
term2b = line3b/omXdot |
268 |
|
dBigRdx = drdx/gb_sigma + dgdx*gfact |
269 |
|
dBigRdy = drdy/gb_sigma + dgdy*gfact |
270 |
|
dBigRdz = drdz/gb_sigma + dgdz*gfact |
271 |
+ |
|
272 |
|
dBigRdu1x = dgdu1x*gfact |
273 |
|
dBigRdu1y = dgdu1y*gfact |
274 |
|
dBigRdu1z = dgdu1z*gfact |
275 |
|
dBigRdu2x = dgdu2x*gfact |
276 |
|
dBigRdu2y = dgdu2y*gfact |
277 |
|
dBigRdu2z = dgdu2z*gfact |
278 |
< |
|
278 |
> |
|
279 |
|
! Now, we must do it again for g(ChiPrime) and dgpdx |
280 |
|
|
281 |
|
line1a = dotsum/opXpdot |
294 |
|
dgpdy = term1y + line3y |
295 |
|
dgpdz = term1z + line3z |
296 |
|
|
297 |
< |
term1u1x = 2.0d0*(line1a+line2a)*d(1) |
298 |
< |
term1u1y = 2.0d0*(line1a+line2a)*d(2) |
299 |
< |
term1u1z = 2.0d0*(line1a+line2a)*d(3) |
300 |
< |
term1u2x = 2.0d0*(line1a-line2a)*d(1) |
301 |
< |
term1u2y = 2.0d0*(line1a-line2a)*d(2) |
302 |
< |
term1u2z = 2.0d0*(line1a-line2a)*d(3) |
303 |
< |
|
297 |
> |
term1u1x = (line1a+line2a)*dru1dx |
298 |
> |
term1u1y = (line1a+line2a)*dru1dy |
299 |
> |
term1u1z = (line1a+line2a)*dru1dz |
300 |
> |
term1u2x = (line1a-line2a)*dru2dx |
301 |
> |
term1u2y = (line1a-line2a)*dru2dy |
302 |
> |
term1u2z = (line1a-line2a)*dru2dz |
303 |
> |
|
304 |
|
term2a = -line3a/opXpdot |
305 |
|
term2b = line3b/omXpdot |
306 |
|
|
324 |
|
gmu = gp**gb_mu |
325 |
|
gpi = 1.0d0 / gp |
326 |
|
gmum = gmu*gpi |
327 |
< |
|
320 |
< |
! write(*,*) atom1, atom2, Chi, u1dotu2 |
327 |
> |
|
328 |
|
curlyE = 1.0d0/dsqrt(1.0d0 - Chi*Chi*u1dotu2*u1dotu2) |
329 |
|
|
330 |
|
dcE = (curlyE**3)*Chi*Chi*u1dotu2 |
432 |
|
end subroutine do_gb_pair |
433 |
|
|
434 |
|
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 |