Skip to main content

This project aims to provide a simple MDAkit for JIT accelerated Menger curvature calculation

Project description

Menger_Curvature

Latest release Last release tag GitHub commits since latest release (by date) for a branch Documentation Status
Status GH Actions Status codecov
Community License: GPL v2 Powered by MDAnalysis

"This project aims to provide a simple MDAkit for JIT accelerated Menger curvature calculation"

Menger_Curvature is bound by a Code of Conduct.

Installation

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]"

Examples

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.tests.utils import make_universe
>>> md_name = "tubulin_chain_a"
>>> u = make_universe(
...     topology_name=f"{md_name}.pdb",
...     trajectory_name=f"{md_name}.dcd",
... )
>>> menger_analyser = MengerCurvature(
...     u,
...     selection="name CA and chainID A",
...     spacing=2
... )
>>> menger_analyser.run()
>>> 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.tests.utils import make_universe
>>> md_name = "tubulin_chain_a"
>>> u = make_universe(
...     topology_name=f"{md_name}.pdb",
...     trajectory_name=f"{md_name}.dcd",
... )
>>> menger_analyser = MengerCurvature(
...     u,
...     selection="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

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

menger_curvature-0.1.0.tar.gz (75.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

menger_curvature-0.1.0-py3-none-any.whl (75.7 MB view details)

Uploaded Python 3

File details

Details for the file menger_curvature-0.1.0.tar.gz.

File metadata

  • Download URL: menger_curvature-0.1.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

Hashes for menger_curvature-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e399130c8ed88e90ce1530854de0e7869c5749f10994e64bb551c5f4eb04158
MD5 1d3bcb96f54986f75bd63c8055af964a
BLAKE2b-256 88056d5c2a58807b59a7f64cab3789c7341321633ad9e2690f368652cd524b1a

See more details on using hashes here.

File details

Details for the file menger_curvature-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for menger_curvature-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46081788a4aeabf22e98c98cd102bfaecceea0aa4186dd8ad7f6eebb52fee39f
MD5 167d71594fc14ed2027a83efe6a149fa
BLAKE2b-256 59e72d47ca36867b36dba7427d214c4895ce70b364f6340d53326576b8b48862

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page