--- trunk/OOPSE/libmdtools/do_Forces.F90 2003/12/19 20:36:35 891 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2004/01/05 21:00:05 894 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.40 2003-12-19 20:36:35 mmeineke Exp $, $Date: 2003-12-19 20:36:35 $, $Name: not supported by cvs2svn $, $Revision: 1.40 $ +!! @version $Id: do_Forces.F90,v 1.41 2004-01-05 21:00:05 chuckv Exp $, $Date: 2004-01-05 21:00:05 $, $Name: not supported by cvs2svn $, $Revision: 1.41 $ module do_Forces use force_globals @@ -721,7 +721,8 @@ contains logical :: is_EAM_i,is_EAM_j logical :: is_Sticky_i, is_Sticky_j integer :: me_i, me_j - + integer :: propPack_i + integer :: propPack_j r = sqrt(rijsq) #ifdef IS_MPI @@ -738,18 +739,33 @@ contains me_j = atid(j) #endif + + call getElementProperty(atypes, me_i, "propertyPack", propPack_i) + call getElementProperty(atypes, me_j, "propertyPack", propPack_j) + + ! unpack the properties + + if (iand(propPack_i, LJ_PROPERTY_MASK) .eq. LJ_PROPERTY_MASK) is_LJ_i = .true. + if (iand(propPack_i, DP_PROPERTY_MASK) .eq. DP_PROPERTY_MASK) is_DP_i = .true. + if (iand(propPack_i, STICKY_PROPERTY_MASK) .eq. STICKY_PROPERTY_MASK) is_Sticky_i = .true. + if (iand(propPack_i, GB_PROPERTY_MASK) .eq. GB_PROPERTY_MASK) is_GB_i = .true. + if (iand(propPack_i, EAM_PROPERTY_MASK) .eq. EAM_PROPERTY_MASK) is_EAM_i = .true. + + if (iand(propPack_j, LJ_PROPERTY_MASK) .eq. LJ_PROPERTY_MASK) is_LJ_j = .true. + if (iand(propPack_j, DP_PROPERTY_MASK) .eq. DP_PROPERTY_MASK) is_DP_j = .true. + if (iand(propPack_j, STICKY_PROPERTY_MASK) .eq. STICKY_PROPERTY_MASK) is_Sticky_j = .true. + if (iand(propPack_j, GB_PROPERTY_MASK) .eq. GB_PROPERTY_MASK) is_GB_j = .true. + if (iand(propPack_j, EAM_PROPERTY_MASK) .eq. EAM_PROPERTY_MASK) is_EAM_j = .true. + if (FF_uses_LJ .and. SimUsesLJ()) then - call getElementProperty(atypes, me_i, "is_LJ", is_LJ_i) - call getElementProperty(atypes, me_j, "is_LJ", is_LJ_j) if ( is_LJ_i .and. is_LJ_j ) & call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) + endif if (FF_uses_dipoles .and. SimUsesDipoles()) then - call getElementProperty(atypes, me_i, "is_DP", is_DP_i) - call getElementProperty(atypes, me_j, "is_DP", is_DP_j) if ( is_DP_i .and. is_DP_j ) then call do_dipole_pair(i, j, d, r, rijsq, pot, u_l, f, t, & @@ -764,9 +780,6 @@ contains if (FF_uses_Sticky .and. SimUsesSticky()) then - call getElementProperty(atypes, me_i, "is_Sticky", is_Sticky_i) - call getElementProperty(atypes, me_j, "is_Sticky", is_Sticky_j) - if ( is_Sticky_i .and. is_Sticky_j ) then call do_sticky_pair(i, j, d, r, rijsq, A, pot, f, t, & do_pot, do_stress) @@ -775,29 +788,22 @@ contains if (FF_uses_GB .and. SimUsesGB()) then - - - call getElementProperty(atypes, me_i, "is_GB", is_GB_i) - call getElementProperty(atypes, me_j, "is_GB", is_GB_j) if ( is_GB_i .and. is_GB_j ) then call do_gb_pair(i, j, d, r, rijsq, u_l, pot, f, t, & do_pot, do_stress) endif + endif if (FF_uses_EAM .and. SimUsesEAM()) then - call getElementProperty(atypes, me_i, "is_EAM", is_EAM_i) - call getElementProperty(atypes, me_j, "is_EAM", is_EAM_j) if ( is_EAM_i .and. is_EAM_j ) & call do_eam_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) - endif - - + endif end subroutine do_pair