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.14 2005-09-14 19:02:33 gezelter Exp $, $Date: 2005-09-14 19:02:33 $, $Name: not supported by cvs2svn $, $Revision: 1.14 $ |
47 |
|
|
48 |
|
|
49 |
|
module lj |
253 |
|
integer :: nLJtypes, i, j |
254 |
|
real ( kind = dp ) :: s1, s2, e1, e2 |
255 |
|
real ( kind = dp ) :: rcut6, tp6, tp12 |
256 |
< |
logical :: isSoftCore1, isSoftCore2 |
256 |
> |
logical :: isSoftCore1, isSoftCore2, doShift |
257 |
|
|
258 |
|
if (LJMap%currentLJtype == 0) then |
259 |
|
call handleError("LJ", "No members in LJMap") |
296 |
|
else |
297 |
|
if (haveDefaultCutoff) then |
298 |
|
rcut6 = defaultCutoff**6 |
299 |
+ |
doShift = defaultShift |
300 |
|
else |
301 |
|
call handleError("LJ", "No specified or default cutoff value!") |
302 |
|
endif |
304 |
|
|
305 |
|
tp6 = MixingMap(i,j)%sigma6/rcut6 |
306 |
|
tp12 = tp6**2 |
306 |
– |
|
307 |
|
MixingMap(i,j)%delta =-4.0_DP*MixingMap(i,j)%epsilon*(tp12 - tp6) |
308 |
+ |
MixingMap(i,j)%shiftedPot = doShift |
309 |
+ |
|
310 |
+ |
if (i.ne.j) then |
311 |
+ |
MixingMap(j,i)%sigma = MixingMap(i,j)%sigma |
312 |
+ |
MixingMap(j,i)%epsilon = MixingMap(i,j)%epsilon |
313 |
+ |
MixingMap(j,i)%sigma6 = MixingMap(i,j)%sigma6 |
314 |
+ |
MixingMap(j,i)%rCut = MixingMap(i,j)%rCut |
315 |
+ |
MixingMap(j,i)%delta = MixingMap(i,j)%delta |
316 |
+ |
MixingMap(j,i)%rCutWasSet = MixingMap(i,j)%rCutWasSet |
317 |
+ |
MixingMap(j,i)%shiftedPot = MixingMap(i,j)%shiftedPot |
318 |
+ |
MixingMap(j,i)%isSoftCore = MixingMap(i,j)%isSoftCore |
319 |
+ |
endif |
320 |
+ |
|
321 |
|
enddo |
322 |
|
enddo |
323 |
|
|
407 |
|
fy = dudr * drdy |
408 |
|
fz = dudr * drdz |
409 |
|
|
397 |
– |
|
410 |
|
#ifdef IS_MPI |
411 |
|
if (do_pot) then |
412 |
|
pot_Row(atom1) = pot_Row(atom1) + sw*pot_temp*0.5 |