Skip to content

Commit 254f013

Browse files
committed
docs: add some docs
1 parent fa345c0 commit 254f013

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/neighbours.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ function build_neighbour_list!(system::Particles, neighbour_list::VerletList)
445445
# and from there scan atoms in cell c2
446446
for c2 in neighbour_cells
447447
@inbounds for j in neighbour_list.cells[c2]
448-
# Don't double count
448+
# Don't double count, or self interact
449449
if j <= i
450450
continue
451451
end
@@ -491,7 +491,9 @@ function old_new_cell(system::Particles, i, neighbour_list::VerletList)
491491
return c, c2
492492
end
493493

494+
"""Update Verlet neighbour list
494495
496+
The cell and list for any given particle is only update if it has moved a distance > dr/2 since the last update"""
495497
function update_neighbour_list!(system::Particles, i::Int, neighbour_list::VerletList)
496498
# Check if particle moved for more than half of dr since last update
497499
position_i = get_position(system, i)

0 commit comments

Comments
 (0)