ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/do_Forces.F90
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/do_Forces.F90 (file contents):
Revision 367 by mmeineke, Wed Mar 19 17:29:49 2003 UTC vs.
Revision 368 by chuckv, Thu Mar 20 00:02:39 2003 UTC

# Line 4 | Line 4
4  
5   !! @author Charles F. Vardeman II
6   !! @author Matthew Meineke
7 < !! @version $Id: do_Forces.F90,v 1.26 2003-03-19 17:29:49 mmeineke Exp $, $Date: 2003-03-19 17:29:49 $, $Name: not supported by cvs2svn $, $Revision: 1.26 $
7 > !! @version $Id: do_Forces.F90,v 1.27 2003-03-20 00:02:39 chuckv Exp $, $Date: 2003-03-20 00:02:39 $, $Name: not supported by cvs2svn $, $Revision: 1.27 $
8  
9   module do_Forces
10    use force_globals
# Line 47 | Line 47 | contains
47  
48      integer, intent(out) :: thisStat  
49      integer :: my_status, nMatches
50 <    integer, pointer :: MatchList(:)
50 >    integer, pointer :: MatchList(:) => null()
51      real(kind=dp) :: rcut, rrf, rt, dielect
52  
53      !! assume things are copacetic, unless they aren't
# Line 61 | Line 61 | contains
61      !!
62      !! this will scan through the known atypes and figure out what
63      !! interactions are used by the force field.    
64 <    
64 >  
65      FF_uses_LJ = .false.
66      FF_uses_sticky = .false.
67      FF_uses_dipoles = .false.
# Line 69 | Line 69 | contains
69      FF_uses_EAM = .false.
70      
71      call getMatchingElementList(atypes, "is_LJ", .true., nMatches, MatchList)
72    deallocate(MatchList)
72      if (nMatches .gt. 0) FF_uses_LJ = .true.
73      
74      call getMatchingElementList(atypes, "is_DP", .true., nMatches, MatchList)
76    deallocate(MatchList)
75      if (nMatches .gt. 0) FF_uses_dipoles = .true.
76      
77      call getMatchingElementList(atypes, "is_Sticky", .true., nMatches, &
78           MatchList)
81    deallocate(MatchList)
79      if (nMatches .gt. 0) FF_uses_Sticky = .true.
80      
81      call getMatchingElementList(atypes, "is_GB", .true., nMatches, MatchList)
85    deallocate(MatchList)
82      if (nMatches .gt. 0) FF_uses_GB = .true.
83      
84      call getMatchingElementList(atypes, "is_EAM", .true., nMatches, MatchList)
89    deallocate(MatchList)
85      if (nMatches .gt. 0) FF_uses_EAM = .true.
86      
87      !! check to make sure the FF_uses_RF setting makes sense
# Line 148 | Line 143 | contains
143  
144  
145      do_forces_initialized = .true.    
146 <    
146 >
147    end subroutine init_FF
148    
149  
# Line 281 | Line 276 | contains
276                                  
277                  if (rijsq <  rcutsq) then
278                     call do_pair(i, j, rijsq, d, do_pot, do_stress, &
279 <                        u_l, A, f, t)
279 >                        u_l, A, f, t,pot)
280                  endif
281               endif
282            enddo inner
# Line 303 | Line 298 | contains
298  
299                  call get_interatomic_vector(q_Row(:,i), q_Col(:,j), d, rijsq)
300                  call do_pair(i, j, rijsq, d, do_pot, do_stress, &
301 <                     u_l, A, f, t)
301 >                     u_l, A, f, t,pot)
302  
303               enddo
304            endif
# Line 347 | Line 342 | contains
342                  
343                  if (rijsq <  rcutsq) then
344                     call do_pair(i, j, rijsq, d, do_pot, do_stress, &
345 <                        u_l, A, f, t)
345 >                        u_l, A, f, t,pot)
346                  endif
347               endif
348            enddo inner
# Line 369 | Line 364 | contains
364  
365                  call get_interatomic_vector(q(:,i), q(:,j), d, rijsq)
366                  call do_pair(i, j, rijsq, d, do_pot, do_stress, &
367 <                     u_l, A, f, t)
367 >                     u_l, A, f, t,pot)
368  
369               enddo
370            endif
# Line 484 | Line 479 | contains
479      
480    end subroutine do_force_loop
481  
482 <  subroutine do_pair(i, j, rijsq, d, do_pot, do_stress, u_l, A, f, t)
482 >  subroutine do_pair(i, j, rijsq, d, do_pot, do_stress, u_l, A, f, t,pot)
483  
484      real( kind = dp ) :: pot
485      real( kind = dp ), dimension(:,:) :: u_l
# Line 504 | Line 499 | contains
499      integer :: me_i, me_j
500  
501      r = sqrt(rijsq)
502 <    
502 >
503   #ifdef IS_MPI
504  
505      me_i = atid_row(i)
# Line 520 | Line 515 | contains
515      if (FF_uses_LJ .and. SimUsesLJ()) then
516         call getElementProperty(atypes, me_i, "is_LJ", is_LJ_i)
517         call getElementProperty(atypes, me_j, "is_LJ", is_LJ_j)
518 <      
519 <       if ( is_LJ_i .and. is_LJ_j ) &
525 <            call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress)
518 >          if ( is_LJ_i .and. is_LJ_j ) &
519 >               call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress)
520      endif
521        
522      if (FF_uses_dipoles .and. SimUsesDipoles()) then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines