--- trunk/OOPSE/libmdtools/calc_LJ_FF.F90 2003/07/15 17:10:50 611 +++ trunk/OOPSE/libmdtools/calc_LJ_FF.F90 2003/07/15 22:22:41 619 @@ -2,7 +2,7 @@ !! Corresponds to the force field defined in lj_FF.cpp !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: calc_LJ_FF.F90,v 1.7 2003-07-15 17:10:50 gezelter Exp $, $Date: 2003-07-15 17:10:50 $, $Name: not supported by cvs2svn $, $Revision: 1.7 $ +!! @version $Id: calc_LJ_FF.F90,v 1.8 2003-07-15 22:22:41 mmeineke Exp $, $Date: 2003-07-15 22:22:41 $, $Name: not supported by cvs2svn $, $Revision: 1.8 $ module lj use definitions @@ -21,7 +21,7 @@ module lj #include "fForceField.h" integer, save :: LJ_Mixing_Policy - integer, save :: LJ_rcut + real(kind=DP), save :: LJ_rcut !! Logical has lj force field module been initialized? @@ -85,15 +85,19 @@ contains subroutine LJ_new_rcut(rcut, status) integer :: status, myStatus real(kind=dp) :: rcut - - LJ_rcut = rcut - status = 0 - call createMixingList(myStatus) - if (myStatus /= 0) then - status = -1 - return - end if + + status = 0 + if ( rcut .ne. LJ_rcut ) then + LJ_rcut = rcut + call createMixingList(myStatus) + if (myStatus /= 0) then + status = -1 + return + end if + endif + + return end subroutine LJ_new_rcut