50 |
|
type (Vector), pointer, public :: atypes => null() |
51 |
|
|
52 |
|
public :: new_atype |
53 |
< |
|
53 |
> |
public :: delete_atypes |
54 |
> |
|
55 |
|
contains |
56 |
< |
|
56 |
> |
|
57 |
|
subroutine new_atype(ident, is_Directional, is_LennardJones, & |
58 |
|
is_Electrostatic, is_Charge, is_Dipole, is_Quadrupole, & |
59 |
|
is_Sticky, is_GayBerne, is_EAM, is_Shape, is_FLARB, status) |
60 |
< |
|
60 |
> |
integer :: myATID, c_ident |
61 |
|
integer,intent(in) :: ident |
62 |
|
logical,intent(in) :: is_Directional, is_LennardJones, is_Electrostatic |
63 |
|
logical,intent(in) :: is_Charge, is_Dipole, is_Quadrupole |
65 |
|
integer,intent(out) :: status |
66 |
|
|
67 |
|
integer :: me |
68 |
< |
|
68 |
> |
|
69 |
|
status = 0 |
70 |
< |
|
70 |
> |
|
71 |
|
if (.not. associated(atypes)) then |
72 |
|
!! There are 17 properties to worry about for now. |
73 |
|
!! Fix this if needed for more atomic properties |
77 |
|
return |
78 |
|
endif |
79 |
|
endif |
80 |
< |
|
80 |
> |
|
81 |
|
me = addElement(atypes) |
82 |
|
|
83 |
|
call setElementProperty(atypes, me, "c_ident", ident) |
83 |
– |
|
84 |
|
call setElementProperty(atypes, me, "is_Directional", is_Directional) |
85 |
|
call setElementProperty(atypes, me, "is_LennardJones", is_LennardJones) |
86 |
|
call setElementProperty(atypes, me, "is_Electrostatic", is_Electrostatic) |
92 |
|
call setElementProperty(atypes, me, "is_EAM", is_EAM) |
93 |
|
call setElementProperty(atypes, me, "is_Shape", is_Shape) |
94 |
|
call setElementProperty(atypes, me, "is_FLARB", is_FLARB) |
95 |
< |
|
95 |
> |
|
96 |
|
end subroutine new_atype |
97 |
< |
|
97 |
> |
|
98 |
> |
subroutine delete_atypes() |
99 |
> |
atypes => destroy(atypes) |
100 |
> |
end subroutine delete_atypes |
101 |
> |
|
102 |
|
end module atype_module |
103 |
|
|