Skip to main content

DNA Loop Extrusion by SMCCs in LAMMPS

bioRxiv DOI


View the poster


Loop extrusion simulation

Installation

Below are instructions to install the smc-lammps python package and a separate LAMMPS executable used to perform simulations.

Python

From PyPI

The code is available as a package on PyPI.

pip install smc-lammps
git clone https://github.com/LucasDooms/SMC_LAMMPS.git
cd SMC_LAMMPS
uv sync --no-dev
# alternatively, to include optional dependencies
uv sync --all-groups
source .venv/bin/activate

or use uv run <command> without activating the environment.

From Source Using pip

git clone https://github.com/LucasDooms/SMC_LAMMPS.git
cd SMC_LAMMPS
python3 -m venv .venv
source .venv/bin/activate
# get exact versions (recommended)
pip install -r requirements.txt
# or, install from pyproject.toml file
pip install -e .

LAMMPS

You will need a LAMMPS executable with the MOLECULE, EXTRA-MOLECULE, and RIGID packages.
See https://docs.lammps.org/Install.html for more information.

Simple example:

git clone https://github.com/lammps/lammps --depth=1000 mylammps
cd mylammps
git checkout stable # or release for a more recent version
mkdir build && cd build
cmake -D CMAKE_INSTALL_PREFIX="$HOME/lammps" -D PKG_MOLECULE=yes -D PKG_EXTRA-MOLECULE=yes -D PKG_RIGID=yes ../cmake
cmake --build . -j8
make
make install
export PATH="$HOME/lammps/bin:$PATH"

(Optional) VMD

To use the src/smc_lammps/post_process/visualize.py script, you will need VMD,
see https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD.

Docker Installation

Alternative: install smc-lammps and LAMMPS in a docker container

You can also use docker to run the code.

Either download the image using

docker pull ghcr.io/lucasdooms/smc-lammps:latest

or build it locally with docker build -t smc-lammps . (replacing ghcr.io/lucasdooms/smc-lammps with smc-lammps for the instructions below).

Now you can run an interactive session using

docker run -it -v .:/data ghcr.io/lucasdooms/smc-lammps

Or, to run directly (see Usage)

docker run -v .:/data ghcr.io/lucasdooms/smc-lammps smc-lammps ...

To run a jupyter notebook session, use

docker run -it -v .:/data -p 127.0.0.1:8888:8888 ghcr.io/lucasdooms/smc-lammps jupyter notebook --allow-root --no-browser --ServerApp.ip=0.0.0.0 /data

and open the displayed link http://127.0.0.1:8888/tree?token=... in your browser.

Note: the docker image does not include VMD.

Usage

  1. Create a directory for your simulation using smc-lammps mysim.
  2. Define all parameters in mysim/parameters.py (see src/smc_lammps/generate/default_parameters.py for all options).
  3. Run smc-lammps [flags] mysim, providing the directory of the parameters file. Use the -g flag to generate the required parameterfile and datafile.

Examples

  • smc-lammps mysim -gr to generate and run.
  • smc-lammps mysim -grpv to generate, run, post-process, and visualize.
  • smc-lammps mysim -grvn to generate, run, and visualize while ignoring errors.
  • smc-lammps mysim -v to visualize.
  • smc-lammps mysim -vf to visualize a perspective following the SMC.
  • smc-lammps mysim -c to continue a run from a restart file.

Help

Show help with smc-lammps --help.

Shell Completion

To get shell completion when using smc-lammps on the command-line run the following:

  • For bash or zsh, use eval "$(register-python-argcomplete smc-lammps)"
  • For fish, use register-python-argcomplete --shell fish smc-lammps | source

Development

Enable dev dependencies

uv sync --dev

Tests

Run all tests using

pytest

Documentation

Dependencies

To build the documentation, you will need to install graphviz, e.g. sudo apt update && sudo apt install graphviz on Debian/Ubuntu.

Build

Build the documentation using

make -C docs html

(or sphinx-build -b html docs/source docs/build/html)

Now open docs/build/html/index.html in a browser or use python -m http.server -d docs/build/html and browse to http://localhost:8000.

Autobuild

To view new changes made to the documentation automatically, you can use sphinx-autobuild

sphinx-autobuild -b html --watch src/smc_lammps docs/source docs/build/html

Doctests

Run the doctests using

make -C docs doctest

Authors

Original code by Stefanos Nomidis (https://github.com/sknomidis/SMC_LAMMPS).
Modifications by Arwin Goossens.
All commits in this repository by Lucas Dooms.
Released under MIT license.

Metadata

Release files for smc-lammps 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smc-lammps 0.2.4
File Size Uploaded Provenance Actions
smc_lammps-0.2.4.tar.gz 232.7 kB With provenance Details for smc_lammps-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smc-lammps 0.2.4
File Interpreter ABI Platform Actions
smc_lammps-0.2.4-py3-none-any.whl Python 3 none any Details for smc_lammps-0.2.4-py3-none-any.whl

Total release size: 328.3 kB

Release files / smc_lammps-0.2.4.tar.gz

Download URL smc_lammps-0.2.4.tar.gz
Size 232.7 kB
Tags Source
SHA-256 checksum
How to use checksums
19ba88845f04f4b3f5db935e751ae13bc898be1fc3b6af4afd581cb2d7836411
BLAKE2b-256 checksum
How to use checksums
6f07f291e934b49dee8a1df0025bc31e2ad6e0bc3bb855940c71c71410ec1c75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / smc_lammps-0.2.4-py3-none-any.whl

Download URL smc_lammps-0.2.4-py3-none-any.whl
Size 95.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6c9d1a1a872151845cc5c9ac3ddbba0f35db3046f2a35833c2c8349cb3582a0
BLAKE2b-256 checksum
How to use checksums
708b47e51c7d325ca77d0b308d7e5df6301cc35c3c239eaf42035b5be5fff9c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for smc-lammps 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for smc_lammps-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page