--- trunk/OOPSE/libmdtools/do_Forces.F90 2003/08/07 00:47:33 669 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2003/08/08 21:22:37 673 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.27 2003-08-07 00:47:33 chuckv Exp $, $Date: 2003-08-07 00:47:33 $, $Name: not supported by cvs2svn $, $Revision: 1.27 $ +!! @version $Id: do_Forces.F90,v 1.28 2003-08-08 21:22:37 chuckv Exp $, $Date: 2003-08-08 21:22:37 $, $Name: not supported by cvs2svn $, $Revision: 1.28 $ module do_Forces use force_globals @@ -272,7 +272,7 @@ contains !! do_prepair_loop_if_needed !! if_mpi_scatter_stuff_from_prepair !! if_mpi_gather_stuff_from_prepair_to_main_loop - + !--------------------PREFORCE LOOP----------->>>>>>>>>>>>>>>>>>>>>>>>>>> #ifdef IS_MPI @@ -348,7 +348,7 @@ contains neighborListSize = size(list) nlist = 0 - + do i = 1, natoms-1 point(i) = nlist + 1 @@ -360,7 +360,8 @@ contains if (rijsq < rlistsq) then - + + nlist = nlist + 1 if (nlist > neighborListSize) then @@ -385,7 +386,7 @@ contains point(natoms) = nlist + 1 else !! (update) - + ! use the list to find the neighbors do i = 1, natoms-1 JBEG = POINT(i) @@ -406,7 +407,10 @@ contains endif #endif !! Do rest of preforce calculations - call do_preforce(nlocal,pot) + !! do necessary preforce calculations + call do_preforce(nlocal,pot) + ! we have already updated the neighbor list set it to false... + update_nlist = .false. else !! See if we need to update neighbor lists for non pre-pair call checkNeighborList(nlocal, q, listSkin, update_nlist) @@ -811,7 +815,7 @@ contains me_j = atid(j) #endif - + if (FF_uses_EAM .and. SimUsesEAM()) then call getElementProperty(atypes, me_i, "is_EAM", is_EAM_i) call getElementProperty(atypes, me_j, "is_EAM", is_EAM_j) @@ -819,11 +823,12 @@ contains if ( is_EAM_i .and. is_EAM_j ) & call calc_EAM_prepair_rho(i, j, d, r, rijsq ) endif - end subroutine do_prepair + end subroutine do_prepair + subroutine do_preforce(nlocal,pot) integer :: nlocal real( kind = dp ) :: pot @@ -941,6 +946,15 @@ contains #endif + + if (FF_uses_EAM .and. SimUsesEAM()) then + call clean_EAM() + endif + + + + + rf = 0.0_dp tau_Temp = 0.0_dp virial_Temp = 0.0_dp @@ -1053,4 +1067,6 @@ end module do_Forces doesit = FF_uses_RF end function FF_RequiresPostpairCalc +!! This cleans componets of force arrays belonging only to fortran + end module do_Forces