HMM model to determine Lo or Ld domains from coarse grained or atomistic MD simulations.
Project description
domhmm
| Latest release | |
|---|---|
| Status | |
| Community |
The study of lateral nano- and microdomains in biological lipid membranes is an important area in membrane biophysics. Molecular Dynamics (MD) simulations are used to investigate these lateral heterogeneities in lipid bilayers, offering complementary insights to experimental studies by shedding light on the underlying dynamics. However, the identification of Lo or Ld domains from coarse-grained or atomistic MD simulations still poses a huge effort for researchers during the analysis. DomHMM addresses this challenge by providing a reliable and straightforward workflow (see Trollmann & Böckmann, 2024 [1]) for domain identification in membrane simulations at different levels of resolution. This open-source package is built using the cookiecutter template for MDAKits.
[1] M. F. W. Trollmann, R. A. Böckmann, Characterization of domain formation in complex membranes. Methods Enzymol. 701, 1–46 (2024).
DomHMM is bound by a Code of Conduct.
Features
With DomHMM you can:
- Calculate the area per lipid for each lipid in every leaflet.
- Compute the average SCC parameter for each acyl chain of every lipid.
- Easily identify lateral nano- and microdomains in your membrane simulations.
Documentation
The documentation of DomHMM can be found here.
Installation
To build DomHMM from source,
we highly recommend using virtual environments.
If possible, we strongly recommend that you use
Anaconda as your package manager.
Below we provide instructions both for conda/mamba and
for pip.
Virtual environment
Ensure that you have conda or mamba installed.
Create a virtual environment and activate it:
conda create --name domhmm
conda activate domhmm
Or,
mamba create --name domhmm
mamba activate domhmm
Installing with PyPI
DomHMM can be installed directly with pip
pip install domhmm
Installing directly from the repository without cloning
If you want to install the latest version of DomHMM directly from the repository (either from the main branch or any other branch), you can use the following command:
python3 -m pip install git+https://github.com/BioMemPhys-FAU/domhmm@main
Installing directly from the repository with cloning
First clone repository:
git clone https://github.com/BioMemPhys-FAU/domhmm
cd domhmm
Install the development and documentation dependencies (with conda or with mamba):
conda env update --name domhmm --file devtools/conda-envs/test_env.yaml
conda env update --name domhmm --file docs/requirements.yaml
Build this package from the source:
pip install -e .
When you are finished, you can exit the virtual environment with the following:
conda deactivate
With pip
To build the package from the source, run the following:
pip install -e .
If you want to create a development environment, install the dependencies required for tests and docs with:
pip install -e ".[test,doc]"
Our test suite requires the installation of pytest. To install this package via conda or mamba run:
conda install pytest
Or,
mamba install pytest
To run the test, first clone the repository
git clone https://github.com/BioMemPhys-FAU/domhmm
Change into the directory and run pytest,
cd domhmm
pytest --pyargs domhmm
Usage
Example Script
You can use the DomHMM library like in this example script
import MDAnalysis as mda
import domhmm
path2xtc = "CHANGE_IT_TO_YOUR_XTC_FILE.xtc"
path2tpr = "CHANGE_IT_TO_YOUR_TPR_FILE.tpr"
uni = mda.Universe(path2tpr, path2xtc)
membrane_select = "resname DPPC DIPC CHOL"
heads = {"DPPC": "PO4", "DIPC": "PO4"}
tails = {"DPPC": [["C1B", "C2B", "C3B", "C4B"], ["C1A", "C2A", "C3A", "C4A"]],
"DIPC": [["C1B", "D2B", "D3B", "C4B"], ["C1A", "D2A", "D3A", "C4A"]]}
sterol_heads = {"CHOL": "ROH"}
sterol_tails = {"CHOL": ["ROH", "C1"]}
model = domhmm.PropertyCalculation(universe_or_atomgroup=uni,
leaflet_kwargs={"select": "name PO4", "pbc": True},
membrane_select=membrane_select,
leaflet_select="auto",
heads=heads,
sterol_heads=sterol_heads,
sterol_tails=sterol_tails,
tails=tails,
result_plots=True)
model.run()
- In this example, there are two lipids and one sterol with automatic leaflet detection option
- Be aware the order of the tails should be the same such as
{"Lipid_1":[[Acyl_Chain_1],[Acyl_Chain_2]], "Lipid_2":[[Acyl_Chain_1],[Acyl_Chain_2]]} - Be aware that for sterol tails configuration first element of the array represents the head part and the second element represents the tail part
- You can change the run configuration to decide start frame, end frame, and step size such as
model.run(start=0, stop=100, step=5) membrane_selectis used to select residues of membranes. There should be no other residues besides membrane ones- Since
result_plotsoption is set to enable, intermediate plots will be shown as in the below image.
Copyright
The DomHMM source code is hosted at https://github.com/BioMemPhys-FAU/domhmm and is available under the GNU General Public License, version 2 (see the file LICENSE).
Copyright (c) 2023, Marius FW Trollmann
Acknowledgements
Project based on the MDAnalysis Cookiecutter version 0.1. Please cite MDAnalysis when using DomHMM in published work.
Project details
Release history Release notifications | RSS feed
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 domhmm-1.1.1.tar.gz.
File metadata
- Download URL: domhmm-1.1.1.tar.gz
- Upload date:
- Size: 49.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8ce9bd00921f18dc155fef8aa7adf57a971a4f132c29a61308dddbcf2e06c15
|
|
| MD5 |
a28289fcc81059a8d65c38a2ac540d9f
|
|
| BLAKE2b-256 |
4a6bf9c31e76a0b8d6121092f9ceaffa0a110329a83e501fcf282fd2d6e28d97
|
File details
Details for the file domhmm-1.1.1-py3-none-any.whl.
File metadata
- Download URL: domhmm-1.1.1-py3-none-any.whl
- Upload date:
- Size: 49.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c84d7f8a9ecf5c008fd672439b444f43ce475542dc3c53be0f870d9f609f1bc2
|
|
| MD5 |
0dd895344f8b2e2b00b2d3c66b5473fc
|
|
| BLAKE2b-256 |
003a8ec26797730c5af10331bc4f218568be4b2358f348cf0d7ca2ead8d75b2f
|