6 |
|
!! @author Charles F. Vardeman II |
7 |
|
!! @author Matthew Meineke |
8 |
|
!! @author J. Daniel Gezelter |
9 |
< |
!! @version $Id: neighborLists.F90,v 1.4 2003-07-16 21:30:56 mmeineke Exp $, |
9 |
> |
!! @version $Id: neighborLists.F90,v 1.5 2003-08-08 21:22:37 chuckv Exp $, |
10 |
|
|
11 |
|
module neighborLists |
12 |
|
|
168 |
|
!! calculate the largest displacement of any atom in any direction |
169 |
|
|
170 |
|
!! If we have changed the particle idents, then we need to update |
171 |
< |
if (.not. allocated(q0) .or. size(q0) /= nlocal) then |
171 |
> |
if (.not. allocated(q0) .or. size(q0,2) /= nlocal) then |
172 |
|
update_nlist = .true. |
173 |
|
return |
174 |
|
end if |
196 |
|
|
197 |
|
#endif |
198 |
|
|
199 |
+ |
|
200 |
|
!! a conservative test of list skin crossings |
201 |
|
dispmx = 2.0E0_DP * sqrt (3.0E0_DP * dispmx * dispmx) |
202 |
|
|
203 |
|
update_nlist = (dispmx.gt.listSkin) |
204 |
|
|
205 |
< |
end subroutine checkNeighborList |
205 |
> |
end subroutine checkNeighborList |
206 |
|
|
207 |
|
|
208 |
|
!! Saves neighbor list for comparison in check. |
214 |
|
real(kind = dp ), dimension(3,natoms), intent(in) :: q |
215 |
|
integer :: list_size |
216 |
|
|
217 |
+ |
|
218 |
|
|
219 |
|
!! get size of list |
220 |
|
list_size = natoms |
221 |
|
|
222 |
|
if (.not. allocated(q0)) then |
223 |
|
allocate(q0(3,list_size)) |
224 |
< |
else if( list_size > size(q0)) then |
224 |
> |
else if( list_size > size(q0,2)) then |
225 |
|
deallocate(q0) |
226 |
|
allocate(q0(3,list_size)) |
227 |
|
endif |