--- trunk/OOPSE/libmdtools/do_Forces.F90 2003/04/07 20:50:46 470 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2003/04/08 22:38:43 482 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.11 2003-04-07 20:50:46 chuckv Exp $, $Date: 2003-04-07 20:50:46 $, $Name: not supported by cvs2svn $, $Revision: 1.11 $ +!! @version $Id: do_Forces.F90,v 1.13 2003-04-08 22:38:43 chuckv Exp $, $Date: 2003-04-08 22:38:43 $, $Name: not supported by cvs2svn $, $Revision: 1.13 $ module do_Forces use force_globals @@ -140,7 +140,15 @@ contains if (FF_uses_GB .and. FF_uses_LJ) then endif - + if (.not. do_forces_initialized) then + !! Create neighbor lists + call expandNeighborList(getNlocal(), my_status) + if (my_Status /= 0) then + write(default_error,*) "SimSetup: ExpandNeighborList returned error." + thisStat = -1 + return + endif + endif do_forces_initialized = .true. @@ -587,7 +595,7 @@ contains real ( kind = dp ), intent(out) :: r_sq real( kind = dp ) :: d(3) real( kind = dp ) :: d_old(3) - d(1:3) = q_i(1:3) - q_j(1:3) + d(1:3) = q_j(1:3) - q_i(1:3) d_old = d ! Wrap back into periodic box if necessary if ( SimUsesPBC() ) then