Simulate DNA loop extrusion by SMCs using LAMMPS
Project description
DNA Loop Extrusion by SMCCs in LAMMPS
Loop extrusion simulation
Installation
Python
From PyPI
The code is available as a package on PyPI.
pip install smc-lammps
From Source Using uv (recommended)
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
You can also use docker to run the code. First build the image
docker build -t smc-lammps .
Now you can run an interactive session using
docker run -it -v .:/data smc-lammps
Or, to run directly (see Usage)
docker run -v .:/data smc-lammps smc-lammps ...
Note: the docker image does not include VMD.
Usage
- Create a directory for your simulation using
smc-lammps mysim. - Define all parameters in
mysim/parameters.py(seesrc/smc_lammps/generate/default_parameters.pyfor all options). - Run
smc-lammps [flags] mysim, providing the directory of the parameters file. Use the-gflag to generate the required parameterfile and datafile.
Examples
smc-lammps mysim -grto generate and run.smc-lammps mysim -grpvto generate, run, post-process, and visualize.smc-lammps mysim -grvnto generate, run, and visualize while ignoring errors.smc-lammps mysim -vto visualize.smc-lammps mysim -vfto visualize a perspective following the SMC.smc-lammps mysim -cto 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
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smc_lammps-0.2.1.tar.gz.
File metadata
- Download URL: smc_lammps-0.2.1.tar.gz
- Upload date:
- Size: 186.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
431aa4a91d1d4294357f279fea1a711ec50b9970c949571580eee0564ba40e87
|
|
| MD5 |
34b5d7a7f0125164e5b4284a5ad98599
|
|
| BLAKE2b-256 |
625cd090b6640db8288629809f221d43d85e36352539b377b11f67f6a4c049d9
|
Provenance
The following attestation bundles were made for smc_lammps-0.2.1.tar.gz:
Publisher:
publish.yml on LucasDooms/SMC_LAMMPS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smc_lammps-0.2.1.tar.gz -
Subject digest:
431aa4a91d1d4294357f279fea1a711ec50b9970c949571580eee0564ba40e87 - Sigstore transparency entry: 828809244
- Sigstore integration time:
-
Permalink:
LucasDooms/SMC_LAMMPS@5230b13e09bed5939ea8cb4bfbfe4fdf89e67117 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/LucasDooms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5230b13e09bed5939ea8cb4bfbfe4fdf89e67117 -
Trigger Event:
push
-
Statement type:
File details
Details for the file smc_lammps-0.2.1-py3-none-any.whl.
File metadata
- Download URL: smc_lammps-0.2.1-py3-none-any.whl
- Upload date:
- Size: 87.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5416465dbae9300beb31f4752a4a918781022095fee2038830516ce75a89c9fd
|
|
| MD5 |
0a077483c57d766982b1b05875596998
|
|
| BLAKE2b-256 |
7ca2b1cae82c53810cde52045f91abec9d851a183d13e59f2b1c470b8fe2bae1
|
Provenance
The following attestation bundles were made for smc_lammps-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on LucasDooms/SMC_LAMMPS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smc_lammps-0.2.1-py3-none-any.whl -
Subject digest:
5416465dbae9300beb31f4752a4a918781022095fee2038830516ce75a89c9fd - Sigstore transparency entry: 828809247
- Sigstore integration time:
-
Permalink:
LucasDooms/SMC_LAMMPS@5230b13e09bed5939ea8cb4bfbfe4fdf89e67117 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/LucasDooms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5230b13e09bed5939ea8cb4bfbfe4fdf89e67117 -
Trigger Event:
push
-
Statement type: