45 |
|
|
46 |
|
!! @author Charles F. Vardeman II |
47 |
|
!! @author Matthew Meineke |
48 |
< |
!! @version $Id: doForces.F90,v 1.30 2005-08-17 15:26:37 gezelter Exp $, $Date: 2005-08-17 15:26:37 $, $Name: not supported by cvs2svn $, $Revision: 1.30 $ |
48 |
> |
!! @version $Id: doForces.F90,v 1.32 2005-08-26 21:30:30 chrisfen Exp $, $Date: 2005-08-26 21:30:30 $, $Name: not supported by cvs2svn $, $Revision: 1.32 $ |
49 |
|
|
50 |
|
|
51 |
|
module doForces |
104 |
|
public :: do_force_loop |
105 |
|
public :: createInteractionHash |
106 |
|
public :: createGtypeCutoffMap |
107 |
+ |
public :: getStickyCut |
108 |
+ |
public :: getStickyPowerCut |
109 |
+ |
public :: getGayBerneCut |
110 |
+ |
public :: getEAMCut |
111 |
+ |
public :: getShapeCut |
112 |
|
|
113 |
|
#ifdef PROFILE |
114 |
|
public :: getforcetime |
157 |
|
logical :: j_is_GB |
158 |
|
logical :: j_is_EAM |
159 |
|
logical :: j_is_Shape |
160 |
< |
|
160 |
> |
real(kind=dp) :: myRcut |
161 |
> |
|
162 |
|
status = 0 |
163 |
|
|
164 |
|
if (.not. associated(atypes)) then |
243 |
|
haveInteractionHash = .true. |
244 |
|
end subroutine createInteractionHash |
245 |
|
|
246 |
< |
subroutine createGtypeCutoffMap() |
246 |
> |
subroutine createGtypeCutoffMap(stat) |
247 |
|
|
248 |
+ |
integer, intent(out), optional :: stat |
249 |
|
logical :: i_is_LJ |
250 |
|
logical :: i_is_Elect |
251 |
|
logical :: i_is_Sticky |
254 |
|
logical :: i_is_EAM |
255 |
|
logical :: i_is_Shape |
256 |
|
|
257 |
< |
integer :: myStatus, nAtypes |
258 |
< |
real(kind=dp):: thisSigma, bigSigma |
257 |
> |
integer :: myStatus, nAtypes, i, j, istart, iend, jstart, jend |
258 |
> |
integer :: n_in_i |
259 |
> |
real(kind=dp):: thisSigma, bigSigma, thisRcut |
260 |
> |
real(kind=dp) :: biggestAtypeCutoff |
261 |
|
|
262 |
|
stat = 0 |
263 |
|
if (.not. haveInteractionHash) then |
293 |
|
thisRcut = getStickyCut(i) |
294 |
|
if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut |
295 |
|
endif |
296 |
< |
if (i_is_StickyPower) then |
296 |
> |
if (i_is_StickyP) then |
297 |
|
thisRcut = getStickyPowerCut(i) |
298 |
|
if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut |
299 |
|
endif |
300 |
< |
if (i_is_GayBerne) then |
300 |
> |
if (i_is_GB) then |
301 |
|
thisRcut = getGayBerneCut(i) |
302 |
|
if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut |
303 |
|
endif |
323 |
|
iend = nGroups |
324 |
|
#endif |
325 |
|
outer: do i = istart, iend |
326 |
< |
|
326 |
> |
|
327 |
|
n_in_i = groupStartRow(i+1) - groupStartRow(i) |
328 |
< |
|
328 |
> |
|
329 |
|
#ifdef IS_MPI |
330 |
< |
jstart = 1 |
331 |
< |
jend = nGroupsInCol |
330 |
> |
jstart = 1 |
331 |
> |
jend = nGroupsInCol |
332 |
|
#else |
333 |
< |
jstart = i+1 |
334 |
< |
jend = nGroups |
333 |
> |
jstart = i+1 |
334 |
> |
jend = nGroups |
335 |
|
#endif |
336 |
< |
|
337 |
< |
|
338 |
< |
|
339 |
< |
|
340 |
< |
|
341 |
< |
|
342 |
< |
|
336 |
> |
|
337 |
> |
|
338 |
> |
|
339 |
> |
|
340 |
> |
|
341 |
> |
|
342 |
> |
enddo outer |
343 |
> |
|
344 |
|
haveGtypeCutoffMap = .true. |
345 |
|
end subroutine createGtypeCutoffMap |
346 |
< |
|
346 |
> |
|
347 |
|
subroutine setDefaultCutoffs(defRcut, defRsw, defRlist, cutPolicy) |
348 |
|
real(kind=dp),intent(in) :: defRcut, defRsw, defRlist |
349 |
|
integer, intent(in) :: cutPolicy |
360 |
|
cutoffPolicy = cutPolicy |
361 |
|
call createGtypeCutoffMap() |
362 |
|
|
363 |
< |
end subroutine setDefaultCutoffs |
363 |
> |
end subroutine setCutoffPolicy |
364 |
|
|
365 |
|
|
366 |
|
subroutine setSimVariables() |