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

Comparing trunk/OOPSE/libmdtools/atype_module.F90 (file contents):
Revision 462 by gezelter, Sat Apr 5 02:56:27 2003 UTC vs.
Revision 894 by chuckv, Mon Jan 5 21:00:05 2004 UTC

# Line 11 | Line 11 | contains
11    
12    public :: new_atype
13    
14 +  integer, public, parameter :: LJ_PROPERTY_MASK = 1
15 +  integer, public, parameter :: DP_PROPERTY_MASK = 2
16 +  integer, public, parameter :: STICKY_PROPERTY_MASK = 4
17 +  integer, public, parameter :: GB_PROPERTY_MASK = 8
18 +  integer, public, parameter :: EAM_PROPERTY_MASK = 16
19 +
20   contains
21    
22 <  subroutine new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, &
22 >  subroutine new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, is_EAM,&
23         lj_epsilon, lj_sigma, dipole_moment, status)
24      
25      real( kind = dp ), intent(in) :: lj_epsilon
# Line 25 | Line 31 | contains
31      integer, intent(in)  :: is_Sticky
32      integer, intent(in)  :: is_DP
33      integer, intent(in)  :: is_GB
34 +    integer, intent(in)  :: is_EAM
35      integer, intent(in)  :: is_LJ
36      integer :: me
37      logical :: l_is_LJ, l_is_DP, l_is_Sticky, l_is_GB
38 +    logical :: l_is_EAM
39 +    integer :: propertyPack
40      integer :: FFcheckStatus
41      status = 0
42  
43      if (.not. associated(atypes)) then
44         !! There are 16 properties to worry about for now.  
45         !! Fix this if needed for more atomic properties
46 <       atypes => initialize(16)
46 >       atypes => initialize(17)
47         if (.not.associated(atypes)) then
48            status = -1
49            return
# Line 48 | Line 57 | contains
57      l_is_DP = (is_DP .ne. 0)
58      l_is_Sticky = (is_Sticky .ne. 0)
59      l_is_GB = (is_GB .ne. 0)
60 +    l_is_EAM = (is_EAM .ne. 0)
61  
62      call setElementProperty(atypes, me, "is_LJ", l_is_LJ)
63      call setElementProperty(atypes, me, "is_DP", l_is_DP)
64      call setElementProperty(atypes, me, "is_Sticky", l_is_Sticky)
65      call setElementProperty(atypes, me, "is_GB", l_is_GB)
66 +    call setElementProperty(atypes, me, "is_EAM", l_is_EAM)
67  
68 +    propertyPack = 0
69 +    if (l_is_LJ)     propertyPack = propertyPack + LJ_PROPERTY_MASK
70 +    if (l_is_DP)     propertyPack = propertyPack + DP_PROPERTY_MASK
71 +    if (l_is_Sticky) propertyPack = propertyPack + STICKY_PROPERTY_MASK
72 +    if (l_is_GB)     propertyPack = propertyPack + GB_PROPERTY_MASK
73 +    if (l_is_EAM)    propertyPack = propertyPack + EAM_PROPERTY_MASK
74 +
75 +    call setElementProperty(atypes, me, "propertyPack", propertyPack)
76 +
77      if (l_is_LJ) then
78         call setElementProperty(atypes, me, "lj_sigma", lj_sigma)
79         call setElementProperty(atypes, me, "lj_epsilon", lj_epsilon)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines