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

Comparing trunk/OOPSE-4/src/UseTheForce/doForces.F90 (file contents):
Revision 2503 by gezelter, Thu Dec 8 22:04:40 2005 UTC vs.
Revision 2592 by gezelter, Thu Feb 16 21:40:20 2006 UTC

# Line 45 | Line 45
45  
46   !! @author Charles F. Vardeman II
47   !! @author Matthew Meineke
48 < !! @version $Id: doForces.F90,v 1.70 2005-12-08 22:04:40 gezelter Exp $, $Date: 2005-12-08 22:04:40 $, $Name: not supported by cvs2svn $, $Revision: 1.70 $
48 > !! @version $Id: doForces.F90,v 1.76 2006-02-16 21:40:20 gezelter Exp $, $Date: 2006-02-16 21:40:20 $, $Name: not supported by cvs2svn $, $Revision: 1.76 $
49  
50  
51   module doForces
# Line 281 | Line 281 | contains
281      logical :: i_is_GB
282      logical :: i_is_EAM
283      logical :: i_is_Shape
284 +    logical :: i_is_SC
285      logical :: GtypeFound
286  
287      integer :: myStatus, nAtypes,  i, j, istart, iend, jstart, jend
# Line 310 | Line 311 | contains
311            call getElementProperty(atypes, i, "is_GayBerne", i_is_GB)
312            call getElementProperty(atypes, i, "is_EAM", i_is_EAM)
313            call getElementProperty(atypes, i, "is_Shape", i_is_Shape)
314 <          
314 >          call getElementProperty(atypes, i, "is_SC", i_is_SC)
315  
316            if (haveDefaultCutoffs) then
317               atypeMaxCutoff(i) = defaultRcut
# Line 343 | Line 344 | contains
344                  thisRcut = getShapeCut(i)
345                  if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
346               endif
347 +             if (i_is_SC) then
348 +                thisRcut = getSCCut(i)
349 +                if (thisRCut .gt. atypeMaxCutoff(i)) atypeMaxCutoff(i) = thisRCut
350 +             endif
351            endif
352                      
353            if (atypeMaxCutoff(i).gt.biggestAtypeCutoff) then
# Line 394 | Line 399 | contains
399         allocate(groupToGtypeCol(jend))
400      end if
401  
402 <    if(.not.associated(groupToGtypeCol)) then
403 <       allocate(groupToGtypeCol(jend))
402 >    if(.not.associated(groupMaxCutoffCol)) then
403 >       allocate(groupMaxCutoffCol(jend))
404      else
405 <       deallocate(groupToGtypeCol)
406 <       allocate(groupToGtypeCol(jend))
405 >       deallocate(groupMaxCutoffCol)
406 >       allocate(groupMaxCutoffCol(jend))
407      end if
408      if(.not.associated(gtypeMaxCutoffCol)) then
409         allocate(gtypeMaxCutoffCol(jend))
# Line 421 | Line 426 | contains
426      
427      tol = 1.0d-6
428      nGroupTypesRow = 0
429 <
429 >    nGroupTypesCol = 0
430      do i = istart, iend      
431         n_in_i = groupStartRow(i+1) - groupStartRow(i)
432         groupMaxCutoffRow(i) = 0.0_dp
# Line 436 | Line 441 | contains
441               groupMaxCutoffRow(i)=atypeMaxCutoff(me_i)
442            endif          
443         enddo
439
444         if (nGroupTypesRow.eq.0) then
445            nGroupTypesRow = nGroupTypesRow + 1
446            gtypeMaxCutoffRow(nGroupTypesRow) = groupMaxCutoffRow(i)
# Line 579 | Line 583 | contains
583  
584       localError = 0
585       call setLJDefaultCutoff( defaultRcut, defaultDoShift )
586 +     call setElectrostaticCutoffRadius( defaultRcut, defaultRsw )
587       call setCutoffEAM( defaultRcut, localError)
588       if (localError /= 0) then
589         write(errMsg, *) 'An error has occured in setting the EAM cutoff'
590         call handleError("setCutoffs", errMsg)
591       end if
592       call set_switch(GROUP_SWITCH, defaultRsw, defaultRcut)
593 <    
593 >     call setHmatDangerousRcutValue(defaultRcut)
594 >
595       haveDefaultCutoffs = .true.
596 +     haveGtypeCutoffMap = .false.
597     end subroutine setCutoffs
598  
599     subroutine cWasLame()
# Line 602 | Line 609 | contains
609      
610       cutoffPolicy = cutPolicy
611       haveCutoffPolicy = .true.
612 <     write(*,*) 'have cutoffPolicy in F = ', cutPolicy
606 <
607 <     call createGtypeCutoffMap()
612 >     haveGtypeCutoffMap = .false.
613      
614     end subroutine setCutoffPolicy
615    
# Line 622 | Line 627 | contains
627       real(kind=dp), intent(in) :: thisSkin
628      
629       skinThickness = thisSkin
630 <     haveSkinThickness = .true.
631 <    
627 <     call createGtypeCutoffMap()
630 >     haveSkinThickness = .true.    
631 >     haveGtypeCutoffMap = .false.
632      
633     end subroutine setSkinThickness
634        
# Line 634 | Line 638 | contains
638       SIM_requires_postpair_calc = SimRequiresPostpairCalc()
639       SIM_requires_prepair_calc = SimRequiresPrepairCalc()
640       SIM_uses_PBC = SimUsesPBC()
641 +     SIM_uses_SC = SimUsesSC()
642      
643       haveSIMvariables = .true.
644      
# Line 658 | Line 663 | contains
663  
664      if (VisitCutoffsAfterComputing) then
665         call set_switch(GROUP_SWITCH, largestRcut, largestRcut)      
666 +       call setHmatDangerousRcutValue(largestRcut)
667      endif
668  
669  
# Line 713 | Line 719 | contains
719      FF_uses_Dipoles = .false.
720      FF_uses_GayBerne = .false.
721      FF_uses_EAM = .false.
722 +    FF_uses_SC = .false.
723  
724      call getMatchingElementList(atypes, "is_Directional", .true., &
725           nMatches, MatchList)
# Line 728 | Line 735 | contains
735  
736      call getMatchingElementList(atypes, "is_EAM", .true., nMatches, MatchList)
737      if (nMatches .gt. 0) FF_uses_EAM = .true.
738 +
739 +    call getMatchingElementList(atypes, "is_SC", .true., nMatches, MatchList)
740 +    if (nMatches .gt. 0) FF_uses_SC = .true.
741  
742  
743      haveSaneForceField = .true.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines