29 |
|
real( kind = dp ), intent(in) :: sigam |
30 |
|
integer, intent(out) :: status |
31 |
|
|
32 |
+ |
type (lj_atype), pointer :: this_lj_atype |
33 |
+ |
type (lj_atype), pointer :: lj_atype_ptr |
34 |
+ |
|
35 |
+ |
integer :: alloc_error |
36 |
+ |
integer :: atype_counter = 0 |
37 |
+ |
|
38 |
|
status = 0 |
39 |
|
|
40 |
+ |
allocate(this_lj_atype,stat=alloc_error) |
41 |
+ |
if (alloc_error /= 0 ) then |
42 |
+ |
status = -1 |
43 |
+ |
return |
44 |
+ |
end if |
45 |
+ |
|
46 |
+ |
! assign our new lj_atype information |
47 |
+ |
this_lj_atype%name = name |
48 |
+ |
this_lj_atype%mass = mass |
49 |
+ |
this_lj_atype%epslon = epslon |
50 |
+ |
this_lj_atype%sigma = sigma |
51 |
+ |
|
52 |
+ |
|
53 |
+ |
! if lj_atype_list is null then we are at the top of the list. |
54 |
+ |
if (.not. associated(lj_atype_list)) then |
55 |
+ |
lj_atype_ptr => this_lj_atype |
56 |
+ |
atype_counter = 1 |
57 |
+ |
else ! we need to find the bottom of the list |
58 |
+ |
lj_atype_ptr => lj_atype_list%next |
59 |
+ |
find_end: do |
60 |
+ |
if (.not. associated(lj_atype_ptr%next)) then |
61 |
+ |
exit find_end |
62 |
+ |
end if |
63 |
+ |
lj_atype_ptr => lj_atype_ptr%next |
64 |
+ |
end do find_end |
65 |
+ |
end if |
66 |
+ |
|
67 |
+ |
lj_atype_ptr => this_lj_atype |
68 |
+ |
|
69 |
|
end subroutine new_lj_atype |
70 |
|
|
71 |
+ |
subroutine add_lj_atype() |
72 |
|
|
73 |
|
|
74 |
|
|
75 |
+ |
end subroutine add_lj_atype |
76 |
|
|
77 |
|
|
78 |
+ |
subroutine do_lj_ff(q,f,potE) |
79 |
+ |
real ( kind = dp ), dimension(ndim,) :: q |
80 |
+ |
real ( kind = dp ), dimension(ndim,nLRparticles) :: f |
81 |
+ |
real ( kind = dp ) :: potE |
82 |
+ |
|
83 |
+ |
|
84 |
+ |
|
85 |
+ |
|
86 |
+ |
|
87 |
+ |
|
88 |
+ |
|
89 |
+ |
end subroutine do_lj_ff |
90 |
+ |
|
91 |
+ |
|
92 |
+ |
|
93 |
|
end module lj_ff |