Skip to main content

High-performance molecular dynamics trajectory analysis (RDF, SSF, VHF, ISF, four-point functions, diffusion and non-Gaussian metrics).

Project description

Ripple

PyPI version Python versions License

Ripple is a high-performance Python package for molecular dynamics trajectory analysis. It turns ASE-compatible trajectories into reusable NumPy memory-mapped caches and evaluates structural, dynamical, diffusion, non-Gaussian, and four-point correlation observables with threaded C++ kernels.

The package is designed for repeated analysis of large trajectories on workstations and high-performance computing systems. A trajectory is prepared once, written to a compact cache, and then reused by multiple calculations without rereading the original trajectory file.

Installation

pip install ripple-hpc

Ripple requires Python 3.10+. The only hard runtime dependency is NumPy. Prebuilt wheels are published for the supported CPython versions; source builds require a C++17 compiler and CMake.

What It Computes

  • Pair structure:
    • radial distribution functions for same-species or cross-species pairs
    • shell-averaged partial static structure factors in reciprocal space
  • Single-particle dynamics:
    • self part of the van Hove correlation function
    • self part of the intermediate scattering function
  • Distinct-particle dynamics:
    • distinct part of the van Hove correlation function
    • distinct part of the intermediate scattering function
  • Diffusion and transport:
    • mean-squared displacement tensor curves
    • collective mean-squared displacement tensor curves
    • diffusion tensor fitting by ordinary least squares or generalized least squares
  • Non-Gaussian displacement statistics:
    • lag-resolved scalar non-Gaussian parameter alpha_2(t)
    • fourth-order displacement cumulant tensor kappa_4(t)
    • directional and covariance-whitened summaries of the fourth-order cumulant
  • Dynamic heterogeneity and four-point correlations:
    • four-point dynamic susceptibility chi_4(t)
    • real-space four-point correlation function G_4(r,t)
    • shell-averaged four-point structure factor S_4(q,t)

Mathematical Reference

The formulas below use plain text notation for consistent rendering on package indexes. Ripple applies shell averaging, selected-lag averaging, and normalization inside the calculation methods.

Density mode:
rho_A(q,t) = sum_{i in A} exp[i q . r_i(t)]

Radial distribution function:
g_AB(r) = < sum_{i in A} sum_{j in B}' delta(r - |r_j - r_i|) >
          / [rho_B shell_measure(r)]

Partial static structure factor:
S_AA(q) = < |rho_A(q,t)|^2 / N_A >
S_AB(q) = < Re[rho_A(q,t) rho_B(q,t)^*] / sqrt(N_A N_B) >

Self van Hove correlation function:
G_s(r,t) = < delta(r - |r_i(t0 + t) - r_i(t0)|) >

Distinct van Hove correlation function:
G_d(r,t) = < sum_{i in A} sum_{j in B}'
                 delta(r - |r_j(t0 + t) - r_i(t0)|) >

Self intermediate scattering function:
F_s(q,t) = < exp[i q . (r_i(t0 + t) - r_i(t0))] >

Distinct intermediate scattering function:
F_d(q,t) = < Re[rho_A(q,t0) rho_B(q,t0 + t)^*] >

Mean-squared displacement tensor:
M_self(t) = < Delta r_i(t) Delta r_i(t)^T >

Collective mean-squared displacement tensor:
M_collective(t) = (1 / N) < Delta R(t) Delta R(t)^T >
Delta R(t) = sum_i Delta r_i(t)

Diffusion tensor model:
M(t) = 2 D t + C

Scalar non-Gaussian parameter:
alpha_2(t) = 3 < |Delta r(t)|^4 > / [5 < |Delta r(t)|^2 >^2] - 1

Fourth-order displacement cumulant tensor:
kappa_4,ijkl(t) =
    < delta r_i delta r_j delta r_k delta r_l >
  - < delta r_i delta r_j >< delta r_k delta r_l >
  - < delta r_i delta r_k >< delta r_j delta r_l >
  - < delta r_i delta r_l >< delta r_j delta r_k >

Binary mobility field for four-point correlations:
c_i(t0,t; a) = Theta(|r_i(t0 + t) - r_i(t0)| - a)
delta c_i(t0,t) = c_i(t0,t; a) - <c(t)>

Four-point dynamic susceptibility:
chi_4(t) = N Var_t0[(1 / N) sum_i c_i(t0,t; a)]

Real-space four-point correlation function:
G_4(r,t) = < sum_{i != j} delta c_i(t0,t) delta c_j(t0,t)
                 delta(r - |r_j(t0) - r_i(t0)|) >

Four-point structure factor:
S_4(q,t) = (1 / N) < |sum_i delta c_i(t0,t) exp[i q . r_i(t0)]|^2 >

Basic Workflow

Ripple uses a two-step workflow:

  1. memmap_create(...) reads trajectory frames and writes one reusable PreparedTrajectory cache.
  2. *_cal(prepared, ...) derives any observable-specific memmaps it needs, runs the compiled kernel, and returns a typed result object.

Use memmap_load(...) with the same save_dir and trajectory_tag to reuse an existing cache without rereading the original trajectory.

Minimal Example

from ase.io import iread

from ripple import alpha2_cal, memmap_create, msd_cal, rdf_cal

traj = lambda: iread("trajectory.extxyz", format="extxyz", index=":")
species = "Li"

prepared = memmap_create(
    traj,
    n_frames=1000,
    save_dir="ripple_cache",
    trajectory_tag="run_001",
    pos_dtype="float64",
)
rdf = rdf_cal(
    prepared,
    target_atoms1=species,
    target_atoms2=species,
    mode="abc",
    r_max=10.0,
    dr=0.05,
    n_workers=8,
)
print(rdf.bins, rdf.rdf)

msd = msd_cal(
    prepared,
    target_atoms=species,
    timestep_ps=0.1,
    n_workers=8,
    drift_correction="framework_equal",
)
alpha2 = alpha2_cal(
    prepared,
    target_atoms=species,
    timestep_ps=0.1,
    n_workers=8,
    drift_correction="framework_equal",
)
fit = msd.diffusion_tensor(method="ols")
print(msd.msd_tensor.shape, alpha2.alpha2.shape, fit.D_tensor)

Public Entry Points

  • Prepare/load: memmap_create(...), memmap_load(...), returning PreparedTrajectory.
  • Radial distribution function: rdf_cal(prepared, ...).
  • Static structure factor: ssf_cal(prepared, ...).
  • Self and distinct van Hove correlation functions: vhf_self_cal(prepared, ...) and vhf_distinct_cal(prepared, ...).
  • Self and distinct intermediate scattering functions: isf_self_cal(prepared, ...) and isf_distinct_cal(prepared, ...).
  • Mean-squared displacement, collective mean-squared displacement, and non-Gaussian displacement statistics: msd_cal(prepared, ...), cmsd_cal(prepared, ...), alpha2_cal(prepared, ...), and kappa4_cal(prepared, ...).
  • Four-point dynamic susceptibility, real-space four-point correlation function, and four-point structure factor: chi4_cal(prepared, ...), G4_cal(prepared, ...), and S4_cal(prepared, ...).

Notes

  • Trajectories may be passed as sequences, iterables with n_frames, or factories such as lambda: ase.io.iread(...).
  • Radial real-space calculations support one-, two-, and three-dimensional periodic subspaces through the mode argument. Reciprocal-space structure factors require full three-dimensional periodic boundary conditions.
  • Static-cell trajectories store one cell frame in the cache. Variable-cell trajectories store the cell for every frame and the kernels account for the changing geometry.
  • Periodic analyses validate the required periodic axes before entering the C++ kernels.
  • The diffusion module requires continuous unwrapped trajectory coordinates. It uses Atoms.positions directly and does not unwrap periodic images during preparation.
  • PreparedTrajectory.clean() removes the full cache directory owned by the object, including main cache files and lazily generated derived memmaps.

License

MIT. See LICENSE.

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 Distributions

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

ripple_hpc-1.4.1-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

ripple_hpc-1.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ripple_hpc-1.4.1-cp312-cp312-macosx_11_0_arm64.whl (933.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ripple_hpc-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

ripple_hpc-1.4.1-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

ripple_hpc-1.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ripple_hpc-1.4.1-cp311-cp311-macosx_11_0_arm64.whl (911.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

ripple_hpc-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl (982.0 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

ripple_hpc-1.4.1-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

ripple_hpc-1.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

ripple_hpc-1.4.1-cp310-cp310-macosx_11_0_arm64.whl (898.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

ripple_hpc-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl (969.0 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file ripple_hpc-1.4.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: ripple_hpc-1.4.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ripple_hpc-1.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8c7ec03add44dc5c778f4b69215e39f21f6b26b909c4ce1795b13fed67322d61
MD5 0fb7d50b91317571b3db05bf109aa6ee
BLAKE2b-256 f35902d85ee983621b2145d21b26f8513e4b9217d4f38ec49baf5c06d042ad92

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 6117a71f601327abfda4906d2a0a86d17349aa1acff2855ba2000fd5a15a37cf
MD5 01847a1500271b02b62fb14809bb09c4
BLAKE2b-256 ec1b6e63973245b79ba4d08ab1e428bda120de6a1cae2d9a2d0e0553b49b261c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9283e3fbcabd957a9605c9ac9eeada923efd899a0ee05ce3917e6e7f6cd2d6aa
MD5 6aad33c798e0a10591926558887bec2e
BLAKE2b-256 e8db6e48cc55af2ae5f603c9455e82dd4f6ce65554e2675e86f8cf79e161e62e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 07793a56211d12de5fe7d7ac5ed1bea4e8498be318ec31bddead309a2105c9fa
MD5 da4dfa5275bf4e12d552f3111dc7ce7b
BLAKE2b-256 7632342ff76468b7066ccae097a9b3f3a1500bb625f8f90f5584f7707f7488ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp312-cp312-macosx_10_13_x86_64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: ripple_hpc-1.4.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ripple_hpc-1.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 815e67dd24d7c842a8d32636b1d795228cfca87929d1c575300c84e9f578028e
MD5 0df27408edab8b9d304b54bc03bdaabb
BLAKE2b-256 1735513728e922c8ce292857e422ecb850be167281a90675e5a3bbd05aa65f5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d39dc612367002737c6bce4f56c44863919d0e79d1a639559f2c41cc5a581e14
MD5 87e48ac6ac3344f39ccf1a195efb7f98
BLAKE2b-256 ae1d2a696ff3a25089af39a70fa204436c33b7de3a98aa9e20d5bd77e4350a0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3ce66f05dd5159ec0c0ad65e281193daa532e075ec9591685ec17e25570001f
MD5 50b59df8ad21e7e79d39dbcd3ff87c03
BLAKE2b-256 29ec089c1e0a557ade88e9a750127daa3fd2a03fd7521d94082b5ec9cd2b5150

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2f85cac9134b9d6c3dcbd87ec6e7a560d11e90f179fa0c7083d86601facd2801
MD5 1921e308776901063bf4862dbd4bd9e2
BLAKE2b-256 1423792bd59224ea92aa20f1db22ff125ece59e5a55b5abb3dc37f6db0f048e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: ripple_hpc-1.4.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ripple_hpc-1.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8b1c8a2a59b00376398b3a73d8cc14fd05e61c299a44e17d0d082cfda89117eb
MD5 ca134c8b9b5d7aaeb5c36b19f8d62c57
BLAKE2b-256 9daca801efb98f9b9c585eeb37a81c07b0f532d481bac83c3c70dd164a42bab9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 d05a1d166639a8e76d81d01e123d4ffbfc684af14a71bbea4fba0096caa9c923
MD5 17f2f76bb38df029bc320bc0588ab4f2
BLAKE2b-256 43096278674da84e7a709107f9a8f90f9db5baac076d12edaf966da58011c154

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 57ef32c68cae4a63da5932219368c27aeb38d09aa8389707f6b61d5550e25816
MD5 2db6d96d44265475fc307dc7be74a71a
BLAKE2b-256 11b1d64ba0be3c17e83f6eba8614a4ae21f44e733b0e60d56cb8e524fa7c605e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ripple_hpc-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for ripple_hpc-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2a1f3bf8902817e809011f450459e8ad4fe68c4c63c66dc5bd45dfe79d18ab98
MD5 9ddf27e0045ea9b4535ac6a0c4262fa5
BLAKE2b-256 5bc90c71e681e7f45914bfbd797b1496af83e588e68ef14d6317e48beef1fd59

See more details on using hashes here.

Provenance

The following attestation bundles were made for ripple_hpc-1.4.1-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: wheels.yml on Lucius2019/Ripple-hpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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