--- trunk/OOPSE/libmdtools/calc_eam.F90 2004/01/05 22:49:14 898 +++ trunk/OOPSE/libmdtools/calc_eam.F90 2004/05/07 21:35:05 1150 @@ -651,11 +651,12 @@ contains !! Does EAM pairwise Force calculation. - subroutine do_eam_pair(atom1,atom2,d,rij,r2,pot,f,do_pot,do_stress) + subroutine do_eam_pair(atom1, atom2, d, rij, r2, sw, vpair, pot, f, & + do_pot, do_stress) !Arguments integer, intent(in) :: atom1, atom2 real( kind = dp ), intent(in) :: rij, r2 - real( kind = dp ) :: pot + real( kind = dp ) :: pot, sw, vpair real( kind = dp ), dimension(3,nLocal) :: f real( kind = dp ), intent(in), dimension(3) :: d logical, intent(in) :: do_pot, do_stress @@ -788,6 +789,7 @@ contains pot_Row(atom1) = pot_Row(atom1) + phab*0.5 pot_Col(atom2) = pot_Col(atom2) + phab*0.5 end if + vpair = vpair + phab f_Row(1,atom1) = f_Row(1,atom1) + fx f_Row(2,atom1) = f_Row(2,atom1) + fy @@ -801,6 +803,7 @@ contains if(do_pot) then pot = pot + phab end if + vpair = vpair + phab f(1,atom1) = f(1,atom1) + fx f(2,atom1) = f(2,atom1) + fy