No project description provided
Project description
cuRDF
CUDA-accelerated radial distribution functions using NVIDIA ALCHEMI Toolkit-Ops O(N) neighbor lists and PyTorch. Compatible with ASE Atoms or MDAnalysis Universe objects.
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
)
MDAnalysis Universe (topology and trajectory):
import MDAnalysis as mda
from curdf import rdf
u = mda.Universe("topology.data", "traj.dcd")
bins, gr = rdf(u, species_a="C", species_b="O", r_min=1.0, r_max=8.0, nbins=200)
CLI
ASE (XYZ/extxyz/traj/LAMMPS data or dump)
curdf --file structure.xyz --species-a C --species-b O --min 1 --max 8 --nbins 200 --device cuda
LAMMPS dump (lammpstrj) via MDAnalysis:
curdf --file dump.lammpstrj --species-a C --species-b O --min 1 --max 8 --nbins 200 --device cuda
MDAnalysis:
curdf --topology top.data --trajectory traj.dcd --species-a C --species-b C --min 1 --max 8 --nbins 200 --device cuda --out results/rdf.npz --plot results/rdf.png
# If the LAMMPS data file needs a specific atom_style, pass --atom-style "id type x y z" (default)
# If the LAMMPS data file lacks atom names, map types to elements: --atom-types "1:C,2:O"
--no-wrap leaves coordinates unwrapped if you already wrapped them upstream. Half-fill is chosen automatically based on species (same-species → half-fill).
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curdf-0.2.0.tar.gz.
File metadata
- Download URL: curdf-0.2.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
121806ad0138c405f1c2773552f7835d829e9a94f480e6dbab469c0f1993106b
|
|
| MD5 |
fc20686a8a0f1faeb1902771e9f9cded
|
|
| BLAKE2b-256 |
c4c6ae0baa2b1939e311c49420bf333dc2d617539713829edcf76c1561803c35
|
File details
Details for the file curdf-0.2.0-py3-none-any.whl.
File metadata
- Download URL: curdf-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7116579d45c8f27108a0c11c7c48622e5ac60931565eb39b30e0bb6d2a57e214
|
|
| MD5 |
7f89b094b1332dfd5ac931f6b33a40c2
|
|
| BLAKE2b-256 |
8e7f9cee12d478f16443df59ee7efa7d17851404dc14eeba17504dc97d82df28
|