Skip to main content

A package to calculate the radial distribution function of particles

Project description

Radial Distribution Function

This package provides the radial distribution function to analyze the radial density of particles around other particles. The package provides a single function inner_rdf that calculates the RDF but excludes the border regions (as they would require n-dimensional intersection of shapes, which isn't computationally feasible).

A future version, if my short attention span permits it, will provide an rdf function that handles the 2D and 3D cases with the inclusion of the border regions.

Example

from radialdf import inner_rdf
import numpy as np
import plotly.graph_objs as go

# Generate 10000 random particles with 3 coordinates between 0 and 100
particles = np.random.rand(10000, 3) * 100
# Define a volume from 0 to 100 on 3 axes
box = [[0, 100]] * 3
# Check the radial distribution, which should be pretty boring and flat
g = inner_rdf(box, particles, 20, 0.2)
go.Figure(go.Scatter(x=[i * 0.2 for i in range(21)], y=g)).show()

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

radialdf-0.0.1-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

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