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

Comparing trunk/OOPSE-2.0/src/UseTheForce/doForces.F90 (file contents):
Revision 1610 by gezelter, Wed Oct 20 04:19:55 2004 UTC vs.
Revision 1628 by gezelter, Thu Oct 21 20:15:31 2004 UTC

# Line 4 | Line 4
4  
5   !! @author Charles F. Vardeman II
6   !! @author Matthew Meineke
7 < !! @version $Id: doForces.F90,v 1.1 2004-10-20 04:19:55 gezelter Exp $, $Date: 2004-10-20 04:19:55 $, $Name: not supported by cvs2svn $, $Revision: 1.1 $
7 > !! @version $Id: doForces.F90,v 1.2 2004-10-21 20:15:22 gezelter Exp $, $Date: 2004-10-21 20:15:22 $, $Name: not supported by cvs2svn $, $Revision: 1.2 $
8  
9   module doForces
10    use force_globals
# Line 30 | Line 30 | module doForces
30    PRIVATE
31  
32   #define __FORTRAN90
33 #include "UseTheForce/fForceField.h"
33   #include "UseTheForce/fSwitchingFunction.h"
34  
35    INTEGER, PARAMETER:: PREPAIR_LOOP = 1
# Line 38 | Line 37 | module doForces
37  
38    logical, save :: haveRlist = .false.
39    logical, save :: haveNeighborList = .false.
41  logical, save :: havePolicies = .false.
40    logical, save :: haveSIMvariables = .false.
41    logical, save :: havePropertyMap = .false.
42    logical, save :: haveSaneForceField = .false.
# Line 202 | Line 200 | contains
200         return
201      endif
202  
205    if (SIM_uses_LJ .and. FF_uses_LJ) then
206       if (.not. havePolicies) then
207          write(default_error, *) 'LJ mixing Policies have not been set in doForces!'
208          error = -1
209          return
210       endif
211    endif
212
203      if (.not. haveNeighborList) then
204         write(default_error, *) 'neighbor list has not been initialized in doForces!'
205         error = -1
# Line 233 | Line 223 | contains
223    end subroutine doReadyCheck
224      
225  
226 <  subroutine init_FF(LJMIXPOLICY, use_RF_c, thisStat)
226 >  subroutine init_FF(use_RF_c, thisStat)
227  
238    integer, intent(in) :: LJMIXPOLICY
228      logical, intent(in) :: use_RF_c
229  
230      integer, intent(out) :: thisStat  
# Line 264 | Line 253 | contains
253      
254      call getMatchingElementList(atypes, "is_LJ", .true., nMatches, MatchList)
255      if (nMatches .gt. 0) FF_uses_LJ = .true.
256 <
256 >    
257      call getMatchingElementList(atypes, "is_Charge", .true., nMatches, MatchList)
258      if (nMatches .gt. 0) FF_uses_charges = .true.  
259 <
259 >    
260      call getMatchingElementList(atypes, "is_DP", .true., nMatches, MatchList)
261      if (nMatches .gt. 0) FF_uses_dipoles = .true.
262      
# Line 283 | Line 272 | contains
272      
273      !! Assume sanity (for the sake of argument)
274      haveSaneForceField = .true.
275 <
275 >    
276      !! check to make sure the FF_uses_RF setting makes sense
277      
278      if (FF_uses_dipoles) then
# Line 300 | Line 289 | contains
289         endif
290      endif
291  
303    if (FF_uses_LJ) then
304      
305       select case (LJMIXPOLICY)
306       case (LB_MIXING_RULE)
307          call init_lj_FF(LB_MIXING_RULE, my_status)            
308       case (EXPLICIT_MIXING_RULE)
309          call init_lj_FF(EXPLICIT_MIXING_RULE, my_status)
310       case default
311          write(default_error,*) 'unknown LJ Mixing Policy!'
312          thisStat = -1
313          haveSaneForceField = .false.
314          return            
315       end select
316       if (my_status /= 0) then
317          thisStat = -1
318          haveSaneForceField = .false.
319          return
320       end if
321       havePolicies = .true.
322    endif
323
292      if (FF_uses_sticky) then
293         call check_sticky_FF(my_status)
294         if (my_status /= 0) then
# Line 330 | Line 298 | contains
298         end if
299      endif
300  
333
301      if (FF_uses_EAM) then
302           call init_EAM_FF(my_status)
303         if (my_status /= 0) then
# Line 352 | Line 319 | contains
319  
320      if (FF_uses_GB .and. FF_uses_LJ) then
321      endif
322 +
323      if (.not. haveNeighborList) then
324         !! Create neighbor lists
325         call expandNeighborList(nLocal, my_status)
# Line 361 | Line 329 | contains
329            return
330         endif
331         haveNeighborList = .true.
332 <    endif
365 <
366 <    
332 >    endif    
333      
334    end subroutine init_FF
335    
# Line 1185 | Line 1151 | end module doForces
1151  
1152   !! Interfaces for C programs to module....
1153  
1154 < subroutine initFortranFF(LJMIXPOLICY, use_RF_c, thisStat)
1154 > subroutine initFortranFF(use_RF_c, thisStat)
1155      use doForces, ONLY: init_FF
1190    integer, intent(in) :: LJMIXPOLICY
1156      logical, intent(in) :: use_RF_c
1157  
1158      integer, intent(out) :: thisStat  
1159 <    call init_FF(LJMIXPOLICY, use_RF_c, thisStat)
1159 >    call init_FF(use_RF_c, thisStat)
1160  
1161   end subroutine initFortranFF
1162  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines