Skip to main content

A toolkit for handling bead-spring polymers and LAMMPS output in Python

Project description

pylimer-tools

Run Tests Test Coverage (Python) Test Coverage (C++) Total Coverage Docs PyPI version Downloads License DOI

Pronunciation: "pylimer” like "pü-limer”, with the "py” as in the German word "müde” (IPA: /ˈpyːlɪmɚ/).

pylimer-tools is a toolkit for simulation, analysis, and data handling of bead–spring polymer systems in Python and C++. It combines high-level Python utilities with performant C++ extensions for common tasks in computational polymer science.

Table of Contents

1. Features

A selection of features includes:

  • Monte Carlo structure (network "universe”) generation
  • Dissipative Particle Dynamics (DPD) simulation with slip-springs
  • Maximum Entropy Homogenization Procedure (MEHP) with and without slip-links
  • LAMMPS output readers: data, dump, thermodynamic outputs
  • Network analysis: loops, chain reconstruction, degree statistics
  • Structural metrics: radius of gyration, end-to-end distance, distributions
  • Normal mode analysis for stress autocorrelation, loss and storage modulus
  • Command line interfaces for batch workflows

2. Installation

Requirements

Python >= 3.9.

Stable Release

Stable release from PyPI:

pip install pylimer-tools

Build from Source

Requirements

Build requires CMake, a C++17 compiler, and (optionally) Ninja for faster builds.

Additionally, the system packages flex and bison are required (winflexbison on Windows using choco) to build the dependency igraph.

Build

To build from source (compiles C++ extension):

git clone https://github.com/GenieTim/pylimer-tools.git
cd pylimer-tools
pip install -e .

Optional: Use provided helper scripts in ./bin (e.g. ./bin/build-wheel.sh, ./bin/build-tests.sh).

3. Test Installation

import pylimer_tools
import pylimer_tools_cpp

print("Installed version: {} == {}".format(
  pylimer_tools.__version__,
  pylimer_tools_cpp.__version__
))

More examples: see the examples in the documentation and their code in examples/. Additionally, the tests and the CLI Tools may serve as examples.

4. CLI Tools

Installed console scripts:

  • pylimer-generate-network – generate random bead-spring networks using our MC generation procedure
  • pylimer-analyse-networks – batch analysis / statistics given LAMMPS data (structure) files
  • pylimer-basic-lammps-stats – quick structural stats from LAMMPS data (structure) file
  • pylimer-displace-randomly – random displacement utility

Run any with --help for usage.

5. Documentation

Full documentation (API reference, tutorials, examples): https://genietim.github.io/pylimer-tools

6. Development & Testing

Clone and install in editable mode (see Installation). Then:

./bin/run-tests.sh       # full test suite (Python + C++), includes benchmarks & tests that may fail
./bin/run-tests-short.sh # quicker subset, generates coverage, is what's run in the CI
./bin/format-code.sh     # apply formatting & style (run before PR)

Generate docs:

./bin/make-stubs.sh      # builds the stubs for the C++ module
./bin/make-docs.sh       # build Sphinx HTML docs

Adding Features

  • Add tests in tests/ (unit or integration). New functionality without tests may be deferred.
  • Keep public APIs documented in docstrings so they surface in Sphinx.
  • If a change alters behavior, update existing tests rather than deleting them. Explain rationale in the PR.

7. Citing

If you use pylimer-tools in published work, please cite it. A minimal BibTeX example:

@software{pylimer-tools,
	title = {pylimer-tools},
	author = {Bernhard, Tim},
	url = {https://github.com/GenieTim/pylimer-tools},
	year = {2025},
	note = {See CITATION.cff for full metadata and related method references}
}

Also cite the specific theoretical / methodological papers corresponding to the components you use (listed in CITATION.cff).

8. Contributing

We welcome contributions on GitHub via Issues and Pull Requests.

  1. Discuss larger ideas in an Issue first (helps align scope).
  2. Fork, branch, implement, add tests & docs.
  3. Run formatting and tests locally.
  4. Submit PR referencing the Issue (if any).

See also: Code of Conduct.

9. Code of Conduct

We strive for an inclusive, respectful environment. By participating you agree to uphold the Code of Conduct. Report concerns to the maintainer email specified there.

10. Acknowledgements

The authors gratefully acknowledge financial support from the Swiss National Science Foundation (SNSF project 200021_204196).

11. License

GPL-3.0-or-later. See LICENSE.

This project includes third-party code and libraries under various compatible licenses. See THIRD_PARTY_LICENSES.md for detailed information about all third-party dependencies and their licenses.

Pronunciation Note

"pylimer” resembles "polymer”; the playful spelling emphasizes Python integration.

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

pylimer_tools-0.3.19.tar.gz (1.5 MB view details)

Uploaded Source

Built Distributions

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

pylimer_tools-0.3.19-cp312-cp312-win_amd64.whl (38.3 MB view details)

Uploaded CPython 3.12Windows x86-64

pylimer_tools-0.3.19-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (51.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pylimer_tools-0.3.19-cp312-cp312-macosx_15_0_universal2.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 15.0+ universal2 (ARM64, x86-64)

pylimer_tools-0.3.19-cp311-cp311-win_amd64.whl (38.3 MB view details)

Uploaded CPython 3.11Windows x86-64

pylimer_tools-0.3.19-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (50.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pylimer_tools-0.3.19-cp311-cp311-macosx_15_0_universal2.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 15.0+ universal2 (ARM64, x86-64)

pylimer_tools-0.3.19-cp310-cp310-win_amd64.whl (38.3 MB view details)

Uploaded CPython 3.10Windows x86-64

pylimer_tools-0.3.19-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (50.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pylimer_tools-0.3.19-cp310-cp310-macosx_15_0_universal2.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 15.0+ universal2 (ARM64, x86-64)

pylimer_tools-0.3.19-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (50.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pylimer_tools-0.3.19-cp39-cp39-macosx_15_0_universal2.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 15.0+ universal2 (ARM64, x86-64)

File details

Details for the file pylimer_tools-0.3.19.tar.gz.

File metadata

  • Download URL: pylimer_tools-0.3.19.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pylimer_tools-0.3.19.tar.gz
Algorithm Hash digest
SHA256 d0575e1d0e95493ae7801816c9bd4eecf6ffe81deb3467eff846aa273b1912e8
MD5 8b1315a8ed37967251b486f091a000dd
BLAKE2b-256 2e0145e3ec9d39b3d606eafceb5b2cdcd7b948e10a096eca5a6f40afeee0d6f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19.tar.gz:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9cb943b76e93f64c88e5733f3cc004da62a86c76202a04b9898067eb39c09a59
MD5 f7cf4856628fb9e55093b6fff8a8f7af
BLAKE2b-256 54d9da4d84fc424fce6ecba05b5a536f4222fe87f899185529b50319d88dafb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp312-cp312-win_amd64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8cb2dc33e93842983a2f86e2754d58a89dcc2fae80ee597a61ea26927ba45f0c
MD5 d9a03187ee1f9814a6dd49b476f43494
BLAKE2b-256 dc496d2f2546016c0c47cc9d6e00a3508e2bab1ff964f94094a55f4f6f020c02

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp312-cp312-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp312-cp312-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 46145c4e2189347ec18b26c07be22bbd92a2307fe7817c770d0d1b5a7034b5cc
MD5 a16c388599ff041c13945fbe399ac7f6
BLAKE2b-256 2f57ce557a7bf368f8ea50b4ff2eb70c0420af1e7a897a42d519e54b205ba05d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp312-cp312-macosx_15_0_universal2.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f2fa4cf1c06638232360eb6afc739a6b374e79e525e2994cc4cc7e4c14ef138
MD5 9c3a45ff12223333e2f760fcb4619984
BLAKE2b-256 e0acc5d793b1e3a5b3f31fae0003402283add029cf5902a040332125857159df

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp311-cp311-win_amd64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1039a61e364db76928d86568dcbb8e1ecb629667fed66ba2d5324e332e8918bf
MD5 4f021f701e32ca6ff8105bd4928b9c2b
BLAKE2b-256 8cab3835e6cc6c4633683281122d63f80d9518d6e5d38b0651ab57ef289c1a9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp311-cp311-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp311-cp311-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 15035869b2a6b746539e62f43a417d98fe8578f9a35c0ea7c0702e7c25fdd41d
MD5 ee395a393ba0fee47a4fdc0c6c06f57c
BLAKE2b-256 6520119ca064e517402c100654455c7e4da4e1bc6ef70c1ef33e9bbbb47b86fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp311-cp311-macosx_15_0_universal2.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d67842df48fbfe22790498575ca612e7361b907c98d9340e51db554cc315d354
MD5 041d0ff3873bf7fd80fdfbf48a7e9f2f
BLAKE2b-256 9292190c29a46de3f77755520eed4808b9727d9b229fbecfda00307b2462ab3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp310-cp310-win_amd64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfd5fa412bf439157cc97754fd7e07e7bff86b93808595e845108faae5b64f8d
MD5 0432e6025619f0b03c70310032b92f55
BLAKE2b-256 2d2d12f4f15bd4c7d32b16dc9944ac3d1452a59eeecf0c7325128077d992dbf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp310-cp310-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp310-cp310-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 e7b6f479e57c6a0c29ce3e0ca6b66a8906074ef1df3a74688949d92dd347d0f5
MD5 fdb7946c22c240f7512b9d774cccdf31
BLAKE2b-256 cd479fe03a56c0b6fefdd74df63f2f8fe34a100fcc6e95f93f575a5094da3971

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp310-cp310-macosx_15_0_universal2.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a249016569117edbd5a9ecf25895e5f52b7ceb135e264d298669ff34b964ca88
MD5 6e73b6aec04863851b50bff3d26248f3
BLAKE2b-256 27dfb234287e49a832d195fe4f91b2f73418a7f27e28b5f946bfc0c4baf6993f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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

File details

Details for the file pylimer_tools-0.3.19-cp39-cp39-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.19-cp39-cp39-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 dfa744d892f2aac1dcd85202a28c926cc6a113d672776a56e89a87579364f00f
MD5 2695927fe16299e81e77a19977e9efad
BLAKE2b-256 f0a62c4e6f1b08d57f223f725351e12d0512da25433a2e7896c45f18d05d1608

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.19-cp39-cp39-macosx_15_0_universal2.whl:

Publisher: publish-package.yml on GenieTim/pylimer-tools

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