ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/calc_LJ_FF.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/calc_LJ_FF.F90 (file contents):
Revision 626 by mmeineke, Wed Jul 16 21:30:56 2003 UTC vs.
Revision 999 by chrisfen, Fri Jan 30 15:01:09 2004 UTC

# Line 2 | Line 2
2   !! Corresponds to the force field defined in lj_FF.cpp
3   !! @author Charles F. Vardeman II
4   !! @author Matthew Meineke
5 < !! @version $Id: calc_LJ_FF.F90,v 1.10 2003-07-16 21:30:54 mmeineke Exp $, $Date: 2003-07-16 21:30:54 $, $Name: not supported by cvs2svn $, $Revision: 1.10 $
5 > !! @version $Id: calc_LJ_FF.F90,v 1.16 2004-01-30 15:01:09 chrisfen Exp $, $Date: 2004-01-30 15:01:09 $, $Name: not supported by cvs2svn $, $Revision: 1.16 $
6  
7   module lj
8    use definitions
# Line 92 | Line 92 | contains
92      
93      status = 0
94  
95 <    LJ_rcut = rcut
95 > !    LJ_rcut = rcut
96 >    ! ATTENTION! This is a hardwiring of rcut!
97 >    LJ_rcut = 9.0d0
98      haveCut = .true.
99  
100      if (havePolicy) then
# Line 131 | Line 133 | contains
133  
134      rcut6 = LJ_rcut**6
135  
136 + ! This loops through all atypes, even those that don't support LJ forces.
137      do i = 1, nAtypes
138  
139         call getElementProperty(atypes, i, "lj_epsilon", myEpsilon_i)
# Line 138 | Line 141 | contains
141         ! do self mixing rule
142         ljMixed(i,i)%sigma   = mySigma_i
143        
144 <       ljMixed(i,i)%sigma6  = (ljMixed(i,i)%sigma) ** 6                                                                                                  
142 <       ljMixed(i,i)%tp6     = ljMixed(i,i)%sigma6/rcut6
144 >       ljMixed(i,i)%sigma6  = (ljMixed(i,i)%sigma) ** 6
145  
146 +       ljMixed(i,i)%tp6     = (ljMixed(i,i)%sigma6)/rcut6
147 +
148         ljMixed(i,i)%tp12    = (ljMixed(i,i)%tp6) ** 2
149  
150 +
151         ljMixed(i,i)%epsilon = myEpsilon_i
152  
153         ljMixed(i,i)%delta = -4.0_DP * ljMixed(i,i)%epsilon * &
# Line 190 | Line 195 | contains
195      integer, intent(in) ::  atom1, atom2
196      real( kind = dp ), intent(in) :: rij, r2
197      real( kind = dp ) :: pot
198 <    real( kind = dp ), dimension(3,getNlocal()) :: f    
198 >    real( kind = dp ), dimension(3,nLocal) :: f    
199      real( kind = dp ), intent(in), dimension(3) :: d
200      logical, intent(in) :: do_pot, do_stress
201  
# Line 206 | Line 211 | contains
211      real( kind = dp ) :: delta
212      integer :: id1, id2
213  
209
214      if (rij.lt.LJ_rcut)  then
215  
216         ! Look up the correct parameters in the mixing matrix
# Line 315 | Line 319 | contains
319      
320      if (present(status)) status = 0
321      select case (LJ_Mixing_Policy)
322 <    case (LB_MIXING_RULE)
322 >    case (1)
323         select case (thisParam)
324         case ("sigma")
325            myMixParam = 0.5_dp * (param1 + param2)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines