Skip to main content

GPU-accelerated radial distribution functions with NVIDIA ALCHEMI Toolkit-Ops neighbor lists and PyTorch.

Project description

cuRDF

DOI PyPI

CUDA-accelerated radial distribution functions using NVIDIA ALCHEMI Toolkit-Ops O(N) neighbor lists and PyTorch. Compatible with ASE Atoms or MDAnalysis Universe objects.

Benchmarking

cuRDF benchmark

cuRDF is benchmarked against RDF (MDAnalysis) and neighbour list implementations on CPU (AMD Ryzen 9 9950X, 32 threads) and GPU (NVIDIA RTX 5090).

Install

Latest release:

pip install cuRDF

For development:

git clone https://github.com/joehart2001/curdf.git
cd curdf
pip install -e .

Quickstart

ASE Atoms object:

from ase.io import read
from curdf import rdf

# Load trajectory or frame e.g. XYZ, extxyz, traj, LAMMPS data/dump
atoms = read("md_run.extxyz")

# Compute RDF between species C and O from 1.0 to 8.0 Å
bins, gr = rdf(
  atoms,
  species_a="C",
  species_b="O", # species b can be the same as species a
  r_min=1.0,
  r_max=8.0,
  nbins=200, # resolution of rdf histogram binning
  output = "results/rdf.csv"
)

# Plot RDF
plot_rdf(bins, gr, path="results/rdf.png")

MDAnalysis Universe (topology and trajectory):

import MDAnalysis as mda
from curdf import rdf

u = mda.Universe("topology.data", "traj.dcd", atom_style="id type x y z")
bins, gr = rdf(
  u,
  species_a="C",
  species_b="O",
  r_min=1.0,
  r_max=8.0,
)

Citation

If you use cuRDF in your work, please cite:

@software{cuRDF,
  author    = {Hart, Joseph},
  title     = {cuRDF: GPU-accelerated radial distribution functions},
  month     = dec,
  year      = 2025,
  publisher = {Zenodo},
  version   = {0.1.0},
  doi       = {10.5281/zenodo.1085332119},
  url       = {https://doi.org/10.5281/zenodo.1085332119}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

curdf-0.3.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

curdf-0.3.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file curdf-0.3.0.tar.gz.

File metadata

  • Download URL: curdf-0.3.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for curdf-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c73e1686aeb61e678968b349430b54412e1929496671b67a252bde4bc7864f71
MD5 98af2a18ec8f4546f1aec30414bc8481
BLAKE2b-256 057db26d1d8c32c10a70a0780d3f75f02a150951038207676e944556d1b4bb66

See more details on using hashes here.

File details

Details for the file curdf-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: curdf-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for curdf-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 113df7fd72dcb0e7221da75d5ca92afd0e48e43a6e8b0ae2e5f746b175282c07
MD5 46a64c39918f398b42c752be5796892d
BLAKE2b-256 0cccee9383d6217ff84318fc37758403c9795a3f550f4d476a160362c824c254

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page