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. |
Cite
Please consider citing the BiorXiv preprint at BiorXiv.
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 python=3.12
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 install from pipy, run :
pip install menger-curvature
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(backend="multiprocessing", n_workers=4)
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.
Metadata
Release files for menger-curvature 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| menger_curvature-1.1.1.tar.gz | 75.7 MB | Without provenance | Details for menger_curvature-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| menger_curvature-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for menger_curvature-1.1.1-py3-none-any.whl |
Total release size: 151.4 MB
Release files / menger_curvature-1.1.1.tar.gz
| Download URL | menger_curvature-1.1.1.tar.gz |
|---|---|
| Size | 75.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c44dd012854a91efab59a469aa94db78ede77d4d275f8d695009642e1e865d45
|
|
BLAKE2b-256 checksum How to use checksums |
eece5641c60c07f1401fa466c6f4961c9cd2f2472852d1c477e219b08b1b3327
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / menger_curvature-1.1.1-py3-none-any.whl
| Download URL | menger_curvature-1.1.1-py3-none-any.whl |
|---|---|
| Size | 75.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f4a093261d5801a4d27c07122bc50291a102d78582e3bbba2da8bf0b018a384
|
|
BLAKE2b-256 checksum How to use checksums |
eded64fbc657ef0de43eb9cc4d768dde6475e28bc57137f6092efe97eb2de4f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for menger-curvature 1.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.