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

Comparing trunk/OOPSE-4/src/UseTheForce/DarkSide/LJ.F90 (file contents):
Revision 2271 by gezelter, Tue Aug 9 22:33:48 2005 UTC vs.
Revision 2355 by chuckv, Wed Oct 12 18:59:16 2005 UTC

# Line 43 | Line 43
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.17 2005-10-12 18:59:16 chuckv Exp $, $Date: 2005-10-12 18:59:16 $, $Name: not supported by cvs2svn $, $Revision: 1.17 $
47  
48  
49   module lj
# Line 58 | Line 58 | module lj
58  
59    implicit none
60    PRIVATE
61 + #define __FORTRAN90
62 + #include "UseTheForce/DarkSide/fInteractionMap.h"
63  
64    integer, parameter :: DP = selected_real_kind(15)
65  
# Line 77 | Line 79 | module lj
79    end type LJtype
80  
81    type, private :: LJList
82 <     integer               :: nLJtypes = 0
82 >     integer               :: Nljtypes = 0
83       integer               :: currentLJtype = 0
84       type(LJtype), pointer :: LJtypes(:)      => null()
85       integer, pointer      :: atidToLJtype(:) => null()
# Line 157 | Line 159 | contains
159      defaultCutoff = thisRcut
160      defaultShift = shiftedPot
161      haveDefaultCutoff = .true.
162 +    !we only want to build LJ Mixing map if LJ is being used.
163 +    if(LJMap%nLJTypes /= 0) then
164 +       call createMixingMap()
165 +    end if
166    end subroutine setLJDefaultCutoff
167  
168    subroutine setLJUniformCutoff(thisRcut, shiftedPot)
# Line 253 | Line 259 | contains
259      integer :: nLJtypes, i, j
260      real ( kind = dp ) :: s1, s2, e1, e2
261      real ( kind = dp ) :: rcut6, tp6, tp12
262 <    logical :: isSoftCore1, isSoftCore2
262 >    logical :: isSoftCore1, isSoftCore2, doShift
263  
264      if (LJMap%currentLJtype == 0) then
265         call handleError("LJ", "No members in LJMap")
# Line 296 | Line 302 | contains
302            else
303               if (haveDefaultCutoff) then
304                  rcut6 = defaultCutoff**6
305 +                doShift = defaultShift
306               else
307                  call handleError("LJ", "No specified or default cutoff value!")
308               endif
# Line 303 | Line 310 | contains
310            
311            tp6    = MixingMap(i,j)%sigma6/rcut6
312            tp12    = tp6**2          
306
313            MixingMap(i,j)%delta =-4.0_DP*MixingMap(i,j)%epsilon*(tp12 - tp6)
314 +          MixingMap(i,j)%shiftedPot = doShift
315 +
316 +          if (i.ne.j) then
317 +             MixingMap(j,i)%sigma      = MixingMap(i,j)%sigma
318 +             MixingMap(j,i)%epsilon    = MixingMap(i,j)%epsilon
319 +             MixingMap(j,i)%sigma6     = MixingMap(i,j)%sigma6
320 +             MixingMap(j,i)%rCut       = MixingMap(i,j)%rCut
321 +             MixingMap(j,i)%delta      = MixingMap(i,j)%delta
322 +             MixingMap(j,i)%rCutWasSet = MixingMap(i,j)%rCutWasSet
323 +             MixingMap(j,i)%shiftedPot = MixingMap(i,j)%shiftedPot
324 +             MixingMap(j,i)%isSoftCore = MixingMap(i,j)%isSoftCore
325 +          endif
326 +
327         enddo
328      enddo
329      
# Line 394 | Line 413 | contains
413      fy = dudr * drdy
414      fz = dudr * drdz
415  
397
416   #ifdef IS_MPI
417      if (do_pot) then
418 <       pot_Row(atom1) = pot_Row(atom1) + sw*pot_temp*0.5
419 <       pot_Col(atom2) = pot_Col(atom2) + sw*pot_temp*0.5
418 >       pot_Row(LJ_POT,atom1) = pot_Row(LJ_POT,atom1) + sw*pot_temp*0.5
419 >       pot_Col(LJ_POT,atom2) = pot_Col(LJ_POT,atom2) + sw*pot_temp*0.5
420      endif
421  
422      f_Row(1,atom1) = f_Row(1,atom1) + fx

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines