ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/atype_module.F90
Revision: 633
Committed: Thu Jul 17 19:32:13 2003 UTC (20 years, 11 months ago) by chuckv
File size: 2068 byte(s)
Log Message:
fixed spelling issue

File Contents

# Content
1 !! module defines atypes available to simulation
2
3 module atype_module
4 use definitions, only: dp
5 use vector_class
6 implicit none
7 private
8
9 type (Vector), pointer, public :: atypes => null()
10
11
12 public :: new_atype
13
14 contains
15
16 subroutine new_atype(c_ident, is_LJ, is_Sticky, is_DP, is_GB, is_EAM,&
17 lj_epsilon, lj_sigma, dipole_moment, status)
18
19 real( kind = dp ), intent(in) :: lj_epsilon
20 real( kind = dp ), intent(in) :: lj_sigma
21 real( kind = dp ), intent(in) :: dipole_moment
22
23 integer, intent(in) :: c_ident
24 integer, intent(out) :: status
25 integer, intent(in) :: is_Sticky
26 integer, intent(in) :: is_DP
27 integer, intent(in) :: is_GB
28 integer, intent(in) :: is_EAM
29 integer, intent(in) :: is_LJ
30 integer :: me
31 logical :: l_is_LJ, l_is_DP, l_is_Sticky, l_is_GB
32 logical :: l_is_EAM
33 integer :: FFcheckStatus
34 status = 0
35
36 if (.not. associated(atypes)) then
37 !! There are 16 properties to worry about for now.
38 !! Fix this if needed for more atomic properties
39 atypes => initialize(16)
40 if (.not.associated(atypes)) then
41 status = -1
42 return
43 endif
44 endif
45
46 me = addElement(atypes)
47 call setElementProperty(atypes, me, "c_ident", c_ident)
48
49 l_is_LJ = (is_LJ .ne. 0)
50 l_is_DP = (is_DP .ne. 0)
51 l_is_Sticky = (is_Sticky .ne. 0)
52 l_is_GB = (is_GB .ne. 0)
53 l_is_EAM = (is_EAM .ne. 0)
54
55 call setElementProperty(atypes, me, "is_LJ", l_is_LJ)
56 call setElementProperty(atypes, me, "is_DP", l_is_DP)
57 call setElementProperty(atypes, me, "is_Sticky", l_is_Sticky)
58 call setElementProperty(atypes, me, "is_GB", l_is_GB)
59 call setElementProperty(atypes, me, "is_EAM", l_is_EAM)
60
61 if (l_is_LJ) then
62 call setElementProperty(atypes, me, "lj_sigma", lj_sigma)
63 call setElementProperty(atypes, me, "lj_epsilon", lj_epsilon)
64 endif
65 if (l_is_DP) then
66 call setElementProperty(atypes, me, "dipole_moment", dipole_moment)
67 endif
68
69 end subroutine new_atype
70
71 end module atype_module