--- trunk/OOPSE/libmdtools/calc_LJ_FF.F90 2003/04/10 20:08:56 489 +++ trunk/OOPSE/libmdtools/calc_LJ_FF.F90 2003/04/11 15:16:59 490 @@ -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.4 2003-04-09 04:06:43 gezelter Exp $, $Date: 2003-04-09 04:06:43 $, $Name: not supported by cvs2svn $, $Revision: 1.4 $ +!! @version $Id: calc_LJ_FF.F90,v 1.5 2003-04-11 15:16:59 gezelter Exp $, $Date: 2003-04-11 15:16:59 $, $Name: not supported by cvs2svn $, $Revision: 1.5 $ module lj use definitions @@ -195,6 +195,7 @@ contains real( kind = dp ) :: t6 real( kind = dp ) :: t12 real( kind = dp ) :: delta + integer :: id1, id2 if (rij.lt.LJ_rcut) then @@ -255,7 +256,15 @@ contains if (do_stress) then - if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then +#ifdef IS_MPI + id1 = tagRow(atom1) + id2 = tagColumn(atom2) +#else + id1 = atom1 + id2 = atom2 +#endif + + if (molMembershipList(id1) .ne. molMembershipList(id2)) then tau_Temp(1) = tau_Temp(1) + fx * d(1) tau_Temp(2) = tau_Temp(2) + fx * d(2) tau_Temp(3) = tau_Temp(3) + fx * d(3) @@ -267,6 +276,8 @@ contains tau_Temp(9) = tau_Temp(9) + fz * d(3) virial_Temp = virial_Temp + & (tau_Temp(1) + tau_Temp(5) + tau_Temp(9)) + else + write(0,*) 'skipping ', id1, id2, molMembershipList(id1), molMembershipList(id2) endif endif