43 |
|
!! Calculates Long Range forces Lennard-Jones interactions. |
44 |
|
!! @author Charles F. Vardeman II |
45 |
|
!! @author Matthew Meineke |
46 |
< |
!! @version $Id: LJ.F90,v 1.13 2005-08-09 22:33:48 gezelter Exp $, $Date: 2005-08-09 22:33:48 $, $Name: not supported by cvs2svn $, $Revision: 1.13 $ |
46 |
> |
!! @version $Id: LJ.F90,v 1.15 2005-09-21 17:20:14 chrisfen Exp $, $Date: 2005-09-21 17:20:14 $, $Name: not supported by cvs2svn $, $Revision: 1.15 $ |
47 |
|
|
48 |
|
|
49 |
|
module lj |
157 |
|
defaultCutoff = thisRcut |
158 |
|
defaultShift = shiftedPot |
159 |
|
haveDefaultCutoff = .true. |
160 |
+ |
call createMixingMap() |
161 |
|
end subroutine setLJDefaultCutoff |
162 |
|
|
163 |
|
subroutine setLJUniformCutoff(thisRcut, shiftedPot) |
254 |
|
integer :: nLJtypes, i, j |
255 |
|
real ( kind = dp ) :: s1, s2, e1, e2 |
256 |
|
real ( kind = dp ) :: rcut6, tp6, tp12 |
257 |
< |
logical :: isSoftCore1, isSoftCore2 |
257 |
> |
logical :: isSoftCore1, isSoftCore2, doShift |
258 |
|
|
259 |
|
if (LJMap%currentLJtype == 0) then |
260 |
|
call handleError("LJ", "No members in LJMap") |
297 |
|
else |
298 |
|
if (haveDefaultCutoff) then |
299 |
|
rcut6 = defaultCutoff**6 |
300 |
+ |
doShift = defaultShift |
301 |
|
else |
302 |
|
call handleError("LJ", "No specified or default cutoff value!") |
303 |
|
endif |
305 |
|
|
306 |
|
tp6 = MixingMap(i,j)%sigma6/rcut6 |
307 |
|
tp12 = tp6**2 |
306 |
– |
|
308 |
|
MixingMap(i,j)%delta =-4.0_DP*MixingMap(i,j)%epsilon*(tp12 - tp6) |
309 |
+ |
MixingMap(i,j)%shiftedPot = doShift |
310 |
+ |
|
311 |
+ |
if (i.ne.j) then |
312 |
+ |
MixingMap(j,i)%sigma = MixingMap(i,j)%sigma |
313 |
+ |
MixingMap(j,i)%epsilon = MixingMap(i,j)%epsilon |
314 |
+ |
MixingMap(j,i)%sigma6 = MixingMap(i,j)%sigma6 |
315 |
+ |
MixingMap(j,i)%rCut = MixingMap(i,j)%rCut |
316 |
+ |
MixingMap(j,i)%delta = MixingMap(i,j)%delta |
317 |
+ |
MixingMap(j,i)%rCutWasSet = MixingMap(i,j)%rCutWasSet |
318 |
+ |
MixingMap(j,i)%shiftedPot = MixingMap(i,j)%shiftedPot |
319 |
+ |
MixingMap(j,i)%isSoftCore = MixingMap(i,j)%isSoftCore |
320 |
+ |
endif |
321 |
+ |
|
322 |
|
enddo |
323 |
|
enddo |
324 |
|
|
408 |
|
fy = dudr * drdy |
409 |
|
fz = dudr * drdz |
410 |
|
|
397 |
– |
|
411 |
|
#ifdef IS_MPI |
412 |
|
if (do_pot) then |
413 |
|
pot_Row(atom1) = pot_Row(atom1) + sw*pot_temp*0.5 |