PyMembrane#
A modular C++/Python framework for simulations of elastic and liquid membranes on triangulated surfaces.
PyMembrane combines a C++ backend with a Python interface for setting up, running, and extending membrane simulations. It supports triangulated elastic shells, dynamically triangulated liquid membranes, Brownian dynamics, Monte Carlo workflows, minimization, constraints, and lightweight mesh output.
Create a conda environment, build the extension, and verify that the package imports correctly.
Run packaged examples for periodic sheets, shell buckling, liquid membranes, hybrid MC-BD workflows, and size scaling.
Follow a beginner-friendly Jupyter notebook that walks through a first PyMembrane simulation.
See the available command-line options for each packaged example.
Browse the Python interface for boxes, systems, evolvers, forces, integrators, minimizers, and output.
Inspect the underlying C++ classes and the implementation details used by the Python bindings.
Explore the internal scaling benchmark and scope comparison for spherical meshes and membrane-model workflows.
Explore the liquid-membrane and hybrid MC-BD examples built on the packaged workflow.
Install and check#
conda create -n pymemb python=3.8 numpy cmake pybind11
conda activate pymemb
pip install -e .
python -c "from pymembrane import *; print('import ok')"
Run an example#
python -m pymembrane.examples.periodic --quick
Packaged examples include their input data and can be run from the installed Python namespace.
What can I simulate?#
Elastic membranes and shells
Closed and open triangulated surfaces
Periodic sheets
Bending-dominated liquid membranes with edge flips
Hybrid Monte Carlo and Brownian dynamics workflows
Energy minimization with constraints
Why PyMembrane?#
PyMembrane is designed for modularity and extensibility. Users can combine forces, integrators, minimizers, constraints, and output routines through a Python interface, while performance-critical components are implemented in C++. The framework is intended for reproducible membrane-modeling workflows and for developing new membrane models.