CellLists

Julia language implementation of the Cell Lists algorithm to solve the fixed-radius near neighbors problem including serial and multithreaded algorithms.

https://github.com/jaantollander/celllists.jl

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.4%) to scientific vocabulary

Keywords

agent-based-simulation cell-lists fixed-radius-near-neighbors julia molecular-dynamics-simulation
Last synced: 6 months ago · JSON representation ·

Repository

Julia language implementation of the Cell Lists algorithm to solve the fixed-radius near neighbors problem including serial and multithreaded algorithms.

Basic Info
Statistics
  • Stars: 19
  • Watchers: 2
  • Forks: 2
  • Open Issues: 1
  • Releases: 1
Topics
agent-based-simulation cell-lists fixed-radius-near-neighbors julia molecular-dynamics-simulation
Created over 5 years ago · Last pushed over 4 years ago
Metadata Files
Readme Changelog Funding License Citation

README.md

CellLists.jl

DOI Docs Image Runtests

Description

Cell Lists is an algorithm that solves the fixed-radius near neighbors problem. That is, it finds all pairs of points that are within a fixed distance apart from each other. We can use the Cell Lists algorithm as a part of molecular dynamics or agent-based simulations where the interaction potential has a finite range.

You can read more about it in the article Searching for Fixed-Radius Near Neighbors with Cell Lists Algorithm in Julia Language, which explores the Cell Lists algorithm and theory behind it more deeply. We also extended the algorithm to a multithreaded version, which we explain in the article Multithreading in Julia Language in Julia Language Applied to Cell Lists Algorithm.

Citation

You can cite the CellLists.jl repository and code by navigating to the DOI provided by Zenodo and then choosing your preferred citation format from the Export section. For example, we can export BibTex format. Alternatively, you can use the Cite This Repository button below the About section in the right sidebar.

Installation

You can install CellLists.jl with the Julia package manager.

pkg> add CellLists

Alternatively, you can install CellLists.jl directly from the GitHub repository.

pkg> add https://github.com/jaantollander/CellLists.jl

Serial Algorithm

We can use CellLists.jl by supplying n, d-dimensional points, and fixed radius r to the CellList constructor.

julia using CellLists: CellList, near_neighbors, distance_condition n, d, r = 10, 2, 0.1 p = rand(n, d) c = CellList(p, r)

By calling the near_neighbors function, we obtain a list of index pairs of points that are within r distance.

julia indices = near_neighbors(c, p, r)

julia [(3, 6), (4, 5), ...] # indices

We can compare Cell Lists to the brute force method.

julia indices2 = Vector{Tuple{Int, Int}}() for i in 1:(n-1) for j in (i+1):n if distance_condition(p[i, :], p[j, :], r) push!(indices2, (i, j)) end end end

The outputs should be equal as follows:

julia @assert Set(Set.(indices)) == Set(Set.(indices2))

On average, the Cell List algorithm is more efficient than brute force when dimensions d is small, the number of points n is sufficiently large, and radius r is small compared to the bounding box of the points.

Multithreaded Algorithm

We can use the multithreaded version of Cell Lists by dispatching with the Val(:threads) value type.

julia c = CellLists(p, r, Val(:threads))

julia near_neighbors(c, p, r, Val(:threads))

Benchmarks

You can find the benchmarking code from the CellListsBenchmarks.jl repository and scripts for running the benchmarks and plotting in the cell-lists-benchmarks repository.

Owner

  • Name: Jaan Tollander de Balsch
  • Login: jaantollander
  • Kind: user
  • Location: Finland
  • Company: CSC - IT Center for Science

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Tollander de Balsch"
  given-names: "Jaan"
  orcid: "https://orcid.org/0000-0002-4814-5554"
title: "jaantollander/CellLists.jl"
version: 0.1.0
doi: 10.5281/zenodo.5075063
date-released: 2021-07-01
url: "https://doi.org/10.5281/zenodo.5075063"

GitHub Events

Total
  • Fork event: 1
Last Year
  • Fork event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 74
  • Total Committers: 2
  • Avg Commits per committer: 37.0
  • Development Distribution Score (DDS): 0.392
Top Committers
Name Email Commits
Jaan Tollander de Balsch j****n@h****m 45
Jaan Tollander de Balsch d****v@j****m 29
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: less than a minute
  • Average time to close pull requests: N/A
  • Total issue authors: 2
  • Total pull request authors: 0
  • Average comments per issue: 0.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • KristofferC (1)
  • JuliaTagBot (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
juliahub.com: CellLists

Julia language implementation of the Cell Lists algorithm to solve the fixed-radius near neighbors problem including serial and multithreaded algorithms.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 9.9%
Stargazers count: 24.1%
Average: 28.3%
Dependent packages count: 38.9%
Forks count: 40.4%
Last synced: 6 months ago