This project aims to provide a simple MDAkit for JIT accelerated Menger curvature calculation
Project description
Menger_Curvature
| Latest release | |
|---|---|
| Status | |
| Community |
This project aims to provide a simple MDAkit for JIT accelerated Menger curvature calculation. The idea is to associate a value of curvature to as many residues as possible in a polymer. If one has access to several conformations , the average value of the curvature (LC) and its standard deviation (LF) are valuable information to characterize the local dynamics of the backbone.
| Range of proteic menger curvature (PMC) values and their associated structural elements. Backbone representations are extracted from the single chain tubulin simulation. Backbone is represented in licorice, Cαs involved in the PMC calculations are in black Van de Waals. |
Installation
User
With pypi project
The easiest way to install Menger_Curvature is through pip:
pip install menger-curvature
This will install the latest stable release from PyPI.
Developper
Clone the repository and enter it:
git clone https://github.com/EtienneReboul/menger_curvature.git
cd menger_curvature
To build Menger_Curvature 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 and
for pip.
With conda
Ensure that you have conda installed.
Create a virtual environment and activate it:
conda create --name menger_curvature
conda activate menger_curvature
Install the development and documentation dependencies:
conda env update --name menger_curvature --file devtools/conda-envs/test_env.yaml
conda env update --name menger_curvature --file docs/requirements.yaml
Build this package from source:
pip install -e .
If you want to update your dependencies (which can be risky!), run:
conda update --all
And when you are finished, you can exit the virtual environment with:
conda deactivate
With pip
To build the package from source, run:
pip install .
If you want to create a development environment, install the dependencies required for tests and docs with:
pip install ".[test,doc]"
Quick Start
We expect the calculation to take less than a minute for a trajectory of 441 alpha carbon with 20,000 frames Calculate Menger curvature for the chain A of a tubulin protein trajectory in serial mode:
import MDAnalysis as mda
from menger.analysis.mengercurvature import MengerCurvature
from menger.data import files
# replace by your own filepaths
topology = files.TUBULIN_CHAIN_A_PDB
trajectory = files.TUBULIN_CHAIN_A_DCD
u = mda.Universe(topology, trajectory)
# run analysis in serial mode
menger_analyser = MengerCurvature(
u,
select="name CA and chainID A",
spacing=2
)
menger_analyser.run()
# retrieve results data
average_curvature = menger_analyser.results.local_curvatures
flexibility = menger_analyser.results.local_flexibilities
menger_curvature = menger_analyser.results.curvature_array
Calculate Menger curvature for the chain A of a tubulin protein trajectory in parallel mode:
import MDAnalysis as mda
from menger.analysis.mengercurvature import MengerCurvature
from menger.data import files
# replace by your own filepaths
topology = files.TUBULIN_CHAIN_A_PDB
trajectory = files.TUBULIN_CHAIN_A_DCD
u = mda.Universe(topology, trajectory)
# run analysis in parallel
menger_analyser = MengerCurvature(
u,
select="name CA and chainID A",
spacing=2,n_workers=4
)
menger_analyser.run_parallel()
average_curvature = menger_analyser.results.local_curvatures
flexibility = menger_analyser.results.local_flexibilities
menger_curvature = menger_analyser.results.curvature_array
Tutorial
We provide a more comprehensive tutorial in a jupyter notebook
Code of conduct
Menger_Curvature is bound by a Code of Conduct.
Copyright
The Menger_Curvature source code is hosted at https://github.com/EtienneReboul/menger_curvature and is available under the GNU General Public License, version 2 (see the file LICENSE).
Copyright (c) 2025, LBT
Acknowledgements
Project based on the MDAnalysis Cookiecutter version 0.1. Please cite MDAnalysis when using Menger_Curvature in published work.
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 menger_curvature-1.0.0.tar.gz.
File metadata
- Download URL: menger_curvature-1.0.0.tar.gz
- Upload date:
- Size: 75.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0123f594caa19d9568ce8cb15b2cd86097967264be04a74cca6bd9406172b698
|
|
| MD5 |
1967ff64ef802bb0bd0ee208d9a67398
|
|
| BLAKE2b-256 |
c062d0715a0150d188d303c9e956db2284dc88d79fc44f3b210e5280c7828c33
|
File details
Details for the file menger_curvature-1.0.0-py3-none-any.whl.
File metadata
- Download URL: menger_curvature-1.0.0-py3-none-any.whl
- Upload date:
- Size: 75.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79ece51f3aaaaf5d17f1506a0664b8ac21139d957adb56451ef516a474716130
|
|
| MD5 |
bb28c1d4d4222f68e1e48dc420e8df94
|
|
| BLAKE2b-256 |
572f4770339efa5d38c1ddfc717a7ba24aa0fe53e59ccc66540164ca06fd4b2f
|