ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/calc_eam.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/calc_eam.F90 (file contents):
Revision 1150 by gezelter, Fri May 7 21:35:05 2004 UTC vs.
Revision 1192 by gezelter, Mon May 24 21:03:30 2004 UTC

# Line 651 | Line 651 | contains
651  
652  
653    !! Does EAM pairwise Force calculation.  
654 <  subroutine do_eam_pair(atom1, atom2, d, rij, r2, sw, vpair, pot, f, &
655 <       do_pot, do_stress)
654 >  subroutine do_eam_pair(atom1, atom2, d, rij, r2, sw, vpair, fpair, &
655 >       pot, f, do_pot)
656      !Arguments    
657      integer, intent(in) ::  atom1, atom2
658      real( kind = dp ), intent(in) :: rij, r2
659      real( kind = dp ) :: pot, sw, vpair
660      real( kind = dp ), dimension(3,nLocal) :: f
661      real( kind = dp ), intent(in), dimension(3) :: d
662 <    logical, intent(in) :: do_pot, do_stress
662 >    real( kind = dp ), intent(inout), dimension(3) :: fpair
663 >
664 >    logical, intent(in) :: do_pot
665      
666      real( kind = dp ) :: drdx,drdy,drdz
667      real( kind = dp ) :: d2
# Line 789 | Line 791 | contains
791            pot_Row(atom1) = pot_Row(atom1) + phab*0.5
792            pot_Col(atom2) = pot_Col(atom2) + phab*0.5
793         end if
792       vpair = vpair + phab
794  
795         f_Row(1,atom1) = f_Row(1,atom1) + fx
796         f_Row(2,atom1) = f_Row(2,atom1) + fy
# Line 803 | Line 804 | contains
804         if(do_pot) then
805            pot = pot + phab
806         end if
806       vpair = vpair + phab
807  
808         f(1,atom1) = f(1,atom1) + fx
809         f(2,atom1) = f(2,atom1) + fy
# Line 814 | Line 814 | contains
814         f(3,atom2) = f(3,atom2) - fz
815   #endif
816        
817 +       vpair = vpair + phab
818 +       fpair(1) = fpair(1) + fx
819 +       fpair(2) = fpair(2) + fy
820 +       fpair(3) = fpair(3) + fz
821 +
822         if (nmflag) then
823  
824            drhoidr = drha
# Line 837 | Line 842 | contains
842                 drhojdr*drhojdr*d2frhodrhodrho(atom1)
843   #endif
844         end if
840
841
845        
846 <      
844 <       if (do_stress) then
845 <          
846 < #ifdef IS_MPI
847 <          id1 = tagRow(atom1)
848 <          id2 = tagColumn(atom2)
849 < #else
850 <          id1 = atom1
851 <          id2 = atom2
852 < #endif
853 <          
854 <          if (molMembershipList(id1) .ne. molMembershipList(id2)) then
855 <
856 <             tau_Temp(1) = tau_Temp(1) - d(1) * fx
857 <             tau_Temp(2) = tau_Temp(2) - d(1) * fy
858 <             tau_Temp(3) = tau_Temp(3) - d(1) * fz
859 <             tau_Temp(4) = tau_Temp(4) - d(2) * fx
860 <             tau_Temp(5) = tau_Temp(5) - d(2) * fy
861 <             tau_Temp(6) = tau_Temp(6) - d(2) * fz
862 <             tau_Temp(7) = tau_Temp(7) - d(3) * fx
863 <             tau_Temp(8) = tau_Temp(8) - d(3) * fy
864 <             tau_Temp(9) = tau_Temp(9) - d(3) * fz
865 <
866 <             virial_Temp = virial_Temp + &
867 <                  (tau_Temp(1) + tau_Temp(5) + tau_Temp(9))
868 <
869 <          endif
870 <       endif  
871 <    endif
872 <
873 <    
846 >    endif    
847    end subroutine do_eam_pair
848  
849  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines