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.16.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.16-cp312-cp312-win_amd64.whl (38.3 MB view details)

Uploaded CPython 3.12Windows x86-64

pylimer_tools-0.3.16-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.16-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.16-cp311-cp311-win_amd64.whl (38.3 MB view details)

Uploaded CPython 3.11Windows x86-64

pylimer_tools-0.3.16-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.16-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.16-cp310-cp310-win_amd64.whl (38.3 MB view details)

Uploaded CPython 3.10Windows x86-64

pylimer_tools-0.3.16-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.16-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.16-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.16-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.16.tar.gz.

File metadata

  • Download URL: pylimer_tools-0.3.16.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.16.tar.gz
Algorithm Hash digest
SHA256 80ef37f5322ed5b0200399bd0f7d6ad19cd17ce267b198a20e8efeb0782c1d77
MD5 d39c93b317a40e13803225b832fb9097
BLAKE2b-256 28bc0dc727e3139928891cb03f221ae7999bec3fadace3727137087e3c42d70c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16.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.16-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 350ff44de3114406903a1d4d7532eaf645cc9324d85dae8f067d224931293290
MD5 a304cbc8dbbcb00abd434255a453d607
BLAKE2b-256 431469935ee4573b2fea1b127d00f7d3d9807211e34d58e1f72fedb5c6f05f0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8fb6af52272b08af456cfbc710e24fe692467fca80bf295326045128040109e9
MD5 9ba7f0f108da2bd6faeb143282c48aaa
BLAKE2b-256 07f654b7efde23d246f9d26dd916ce97d69289a905fef3c4386ef0f03ac9335d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp312-cp312-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp312-cp312-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 10fe19f83a97be304e63228ddd52fa5815b088a3960988c2b3765679759e98b7
MD5 f525062d3806df8648ab2c8edc4e0514
BLAKE2b-256 856c796dc17f31abcef5ef01d15b2cacf73f0e126bd37ecbe55b20cec4f425bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3db560f8110899951a4a6200026796f864f33065146e689aebccc648522c2cd4
MD5 9b916966d99a1cf0a9d011bee76cd23c
BLAKE2b-256 ab9dfc9425a857cfbd952603bc3c8f69eed794ea50d265e7a149cad45a677f07

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 85c4a44c2565533110f2b63f963913972781be4f89bc04e7dc836fe728b3e231
MD5 109e07b0050abd52408c6b68a89407e8
BLAKE2b-256 524dc2f09ae6bb947bde2755b18da441f8ef33fa252c36696ec6089590abc074

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp311-cp311-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp311-cp311-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 c8bcf2bc3434308ef44a513d3b29309169eccbf85e6b88f9d71840c89b515e55
MD5 14a30f0b742add0941c2feab0a67c20b
BLAKE2b-256 b635478f1113cf013e5756d8f256406584ec21002aaf86f5736b19226b54d0ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a05a63f3b89d3524d85d62a194bcb6a196bb8d24e2131c6875bb5559edb16be4
MD5 bf706bbb55ddd1a7060ce4d9f99d6fd7
BLAKE2b-256 7e0892f7dfa09098b58074e51f4184520d051b17b7708b4fc5d202f6481cfe53

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 652181eba78e1f0c215688d1b0f6b5aa4906f224f9d46e907ce1aedf8a601304
MD5 486d6badeecdecd378161701844987d7
BLAKE2b-256 ea51006cf04a8d04a82e59917ce9041020e715a49076a40adb64ff015c20c3bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp310-cp310-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp310-cp310-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 8380d50e814de8a059763f7453063a72b03cb2389ad6fea565a22b885d534541
MD5 3d552af413937ad79eb26834fb9fdcff
BLAKE2b-256 58cc76f78e5991ca472835eaa4d4127a7a3a871f859cc48730f2c3ede8618a5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22de021690987a1cd456ea37cc8e54e6c0369aedbf70b6c14f4165f0dae7b3e4
MD5 c56d8ac9f81bf0aaccada0d29b3818bf
BLAKE2b-256 5f11da5c811cf6a3323de34263bcf0e2b11af15c8efac905144c0ce157791d34

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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.16-cp39-cp39-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for pylimer_tools-0.3.16-cp39-cp39-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 82edaad15bf68c9d4797cb767061983b7b6f667673ab9b859b6491d51dc6b16f
MD5 1d799518266a46c583ba749dd591522d
BLAKE2b-256 617afad00fb3335b569881d0925c8455b97568fda3ff43e8897eb757d3ad2655

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylimer_tools-0.3.16-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