--- trunk/OOPSE/libmdtools/atype_module.F90 2004/01/05 21:00:05 894 +++ trunk/OOPSE/libmdtools/atype_module.F90 2004/01/13 23:01:43 941 @@ -11,20 +11,16 @@ module atype_module public :: new_atype - integer, public, parameter :: LJ_PROPERTY_MASK = 1 - integer, public, parameter :: DP_PROPERTY_MASK = 2 - integer, public, parameter :: STICKY_PROPERTY_MASK = 4 - integer, public, parameter :: GB_PROPERTY_MASK = 8 - integer, public, parameter :: EAM_PROPERTY_MASK = 16 - contains - subroutine new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, is_EAM,& - lj_epsilon, lj_sigma, dipole_moment, status) + subroutine new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, & + is_EAM, is_Charge, lj_epsilon, lj_sigma, charge, dipole_moment, & + status) real( kind = dp ), intent(in) :: lj_epsilon real( kind = dp ), intent(in) :: lj_sigma real( kind = dp ), intent(in) :: dipole_moment + real( kind = dp ), intent(in) :: charge integer, intent(in) :: c_ident integer, intent(out) :: status @@ -33,10 +29,10 @@ contains integer, intent(in) :: is_GB integer, intent(in) :: is_EAM integer, intent(in) :: is_LJ + integer, intent(in) :: is_Charge integer :: me logical :: l_is_LJ, l_is_DP, l_is_Sticky, l_is_GB - logical :: l_is_EAM - integer :: propertyPack + logical :: l_is_EAM, l_is_Charge integer :: FFcheckStatus status = 0 @@ -58,22 +54,15 @@ contains l_is_Sticky = (is_Sticky .ne. 0) l_is_GB = (is_GB .ne. 0) l_is_EAM = (is_EAM .ne. 0) + l_is_Charge = (is_Charge .ne. 0) call setElementProperty(atypes, me, "is_LJ", l_is_LJ) call setElementProperty(atypes, me, "is_DP", l_is_DP) call setElementProperty(atypes, me, "is_Sticky", l_is_Sticky) call setElementProperty(atypes, me, "is_GB", l_is_GB) call setElementProperty(atypes, me, "is_EAM", l_is_EAM) + call setElementProperty(atypes, me, "is_Charge", l_is_Charge) - propertyPack = 0 - if (l_is_LJ) propertyPack = propertyPack + LJ_PROPERTY_MASK - if (l_is_DP) propertyPack = propertyPack + DP_PROPERTY_MASK - if (l_is_Sticky) propertyPack = propertyPack + STICKY_PROPERTY_MASK - if (l_is_GB) propertyPack = propertyPack + GB_PROPERTY_MASK - if (l_is_EAM) propertyPack = propertyPack + EAM_PROPERTY_MASK - - call setElementProperty(atypes, me, "propertyPack", propertyPack) - if (l_is_LJ) then call setElementProperty(atypes, me, "lj_sigma", lj_sigma) call setElementProperty(atypes, me, "lj_epsilon", lj_epsilon) @@ -81,6 +70,9 @@ contains if (l_is_DP) then call setElementProperty(atypes, me, "dipole_moment", dipole_moment) endif + if (l_is_Charge) then + call setElementProperty(atypes, me, "charge", charge) + endif end subroutine new_atype