Skip to main content

Software module for DNA structure analysis and generation

Project description

MDNA: a software module for DNA structure generation and analysis

Description

MDNA is a Python toolkit for building, modifying and analyzing double stranded DNA structures at atomic resolution. It generates arbitrary DNA shapes through spline based mapping, supports canonical and non canonical base modifications, and applies Monte Carlo minimization to obtain physically consistent configurations. The toolkit implements full rigid base analysis, including intra base pair parameters shear, stretch, stagger, buckle, propeller, and opening, as well as inter base pair step parameters shift, slide, rise, tilt, roll, and twist. With built in linking number calculations and seamless interoperability with MDTraj and OpenMM, MDNA unifies structure generation, editing, and analysis in a single modular framework for complex DNA and DNA protein assemblies.

Installation

To install MDNA use pip:

pip install mdna

Or if you want to install the most recent version of MDNA, follow these steps:

git clone --recurse-submodules https://github.com/heezch/mdna.git

After that go to the 'mdna' project folder and do:

pip install .

Usage

See our documentation page

Citation

Link to the publication

Contributing

We welcome contributions from the community! To contribute:

  • Fork the repository.
  • Create a new branch (git checkout -b feature-branch).
  • Make your changes and commit them (git commit -am 'Add new feature').
  • Push to the branch (git push origin feature-branch).
  • Create a new Pull Request.

Please ensure your code adheres to our coding standards and includes relevant tests.

Optional full filament dataset (tutorial)

The filament tutorial runs in minimal mode by default using bundled filament_minimal data. If you want full-trajectory mode, download the optional dataset:

cd examples
export MDNA_FILAMENT_DATASET_URL='https://doi.org/10.6084/m9.figshare.31423193'
python ./scripts/fetch_filament_dataset.py --output-root ./data

Optional integrity check (only if you know the real archive hash):

cd examples
export MDNA_FILAMENT_DATASET_URL='https://doi.org/10.6084/m9.figshare.31423193'
export MDNA_FILAMENT_DATASET_SHA256='<REAL_SHA256>'
python ./scripts/fetch_filament_dataset.py --output-root ./data --force

If you do not have a published SHA256 yet, leave MDNA_FILAMENT_DATASET_SHA256 unset and run the download command without checksum verification.

What happens behind the scenes: the DOI points to a Figshare item page, and the fetch script automatically resolves the direct file download URL before downloading and unpacking the archive into examples/data/filament_dataset.

Optional: build PyLk Cython extensions (faster + no fallback warnings)

MDNA vendors PyLk inside mdna/PMCpy/pmcpy/Evals/PyLk. If you see warnings like "Cython version of writhemap/linkingnumber not compiled", you can compile the extensions in-place:

Prerequisite: ensure Cython is installed in the same environment where you run MDNA.

# example for conda/mamba env named `mdna`
mamba run -n mdna python -m pip install Cython
# from repository root
cd mdna/PMCpy/pmcpy/Evals/PyLk
python setup.py build_ext --inplace

If you use conda/mamba, run with your env explicitly:

mamba run -n mdna python mdna/PMCpy/pmcpy/Evals/PyLk/setup.py build_ext --inplace

Quick verification:

mamba run -n mdna python - <<'PY'
from mdna.PMCpy.pmcpy.Evals.PyLk.pylk import writhemap, eval_link
print('PyLk import OK:', writhemap.__name__, eval_link.__name__)
PY

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

mdna-0.1.0.tar.gz (16.0 MB view details)

Uploaded Source

Built Distribution

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

mdna-0.1.0-py3-none-any.whl (3.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mdna-0.1.0.tar.gz
  • Upload date:
  • Size: 16.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for mdna-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c87da8773ac3d0af953aaab10b57f4bdb198fdbd155b2d13e25b7e6d3dd5b9f5
MD5 06d4be6977de7c59332e09acccb424e4
BLAKE2b-256 48b6c7d0c5f048caaa96525ab777d5b0b73f03e5ddae3181bafa5abf9a86ff02

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mdna-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for mdna-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76a68503498f0ec061187ef2a9d4d3b5aae6899d707c1941612d1738b62b5af4
MD5 43d8dd166f2a3d976fe31c31d7d707ac
BLAKE2b-256 01644720181e7bd6d99b2f26477e75c37b559c003b513fe8931f7467cc237820

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