Skip to main content

DNA curvature analysis

Project description

Dnacurve is a Python library, console script, and web application to calculate the global 3D structure of a B-DNA molecule from its nucleotide sequence according to the dinucleotide wedge model. Local bending angles and macroscopic curvature are calculated at each nucleotide.

Author:

Christoph Gohlke

License:

BSD-3-Clause

Version:

2026.6.9

DOI:

10.5281/zenodo.7135499

Quickstart

Install the dnacurve package and all dependencies from the Python Package Index:

python -m pip install -U "dnacurve[all]"

Print the console script usage:

python -m dnacurve --help

Run the web application:

python -m dnacurve --web

See Examples for using the programming interface.

Source code and support are available on GitHub.

Requirements

This revision was tested with the following requirements and dependencies (other versions may work):

Revisions

2026.6.9

  • Fix code review issues.

  • Use HTML Living Standard in web application.

  • Drop support for Python 3.11, support Python 3.15.

2026.1.8

  • Improve code quality.

2025.12.12

  • Remove unused overlapping_chunks function.

  • Drop support for Python 3.10, support Python 3.14.

2025.5.8

  • Remove deprecated save functions (breaking).

  • Remove doctest command line option.

2025.1.1

  • Improve type hints.

  • Drop support for Python 3.9, support Python 3.13.

2024.5.24

Refer to the CHANGES file for older revisions.

Notes

The algorithms, plots, and PDB format are not meant to be used with very long sequences. By default, sequences are truncated to 510 nucleotides, which can be overridden by the user.

The generated PDB files can be visualized interactively using UCSF Chimera.

Dnacurve.py was derived from DNACG.PAS (c) 1993, and DNACURVE.CPP (c) 1995.

References

  1. Bending and curvature calculations in B-DNA. Goodsell DS, Dickerson RE. Nucleic Acids Res 22, 5497-503, 1994. See also http://mgl.scripps.edu/people/goodsell/research/bend/index.html.

  2. Curved DNA without A-A: experimental estimation of all 16 DNA wedge angles. Bolshoy A et al. Proc Natl Acad Sci USA 88, 2312-6, 1991.

  3. A comparison of six DNA bending models. Tan RK and Harvey SC. J Biomol Struct Dyn 5, 497-512, 1987.

  4. Curved DNA: design, synthesis, and circularization. Ulanovsky L et al. Proc Natl Acad Sci USA 83, 862-6, 1986.

  5. The ten helical twist angles of B-DNA. Kabsch W, Sander C, and Trifonov EN. Nucleic Acids Res 10, 1097-1104, 1982.

  6. Rod models of DNA: sequence-dependent anisotropic elastic modelling of local bending phenomena. Munteanu MG et al. Trends Biochem Sci 23(9), 341-7, 1998.

Examples

>>> from dnacurve import CurvedDNA
>>> cdna = CurvedDNA('ATGCAAATTG' * 5, 'trifonov', name='Example')
>>> cdna.curvature[:, 18:22]
array([[0.58061616, 0.58163338, 0.58277938, 0.583783  ],
       [0.08029914, 0.11292516, 0.07675816, 0.03166286],
       [0.57923902, 0.57580064, 0.57367815, 0.57349872]])
>>> cdna.write_csv('_test.csv')
>>> cdna.write_pdb('_test.pdb')
>>> cdna.plot('_test.png', dpi=120)

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

dnacurve-2026.6.9.tar.gz (27.1 kB view details)

Uploaded Source

Built Distribution

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

dnacurve-2026.6.9-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file dnacurve-2026.6.9.tar.gz.

File metadata

  • Download URL: dnacurve-2026.6.9.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for dnacurve-2026.6.9.tar.gz
Algorithm Hash digest
SHA256 0add84b7ac7acf33b4a3155e5325d2f61aea75c3657173b470004cf2dbefbcb6
MD5 6b17429f725908f1aa25c71b7fc0dea0
BLAKE2b-256 550ca21a0638759b3914bb795b87ede872327d7ee09e5696c6ee111064e79052

See more details on using hashes here.

File details

Details for the file dnacurve-2026.6.9-py3-none-any.whl.

File metadata

  • Download URL: dnacurve-2026.6.9-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for dnacurve-2026.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 535fa1009b17d2a98667b22a17813ff063c439fa493c9eef79e1b77eea630553
MD5 dab6d260e59f1ee252b0132a0be57f23
BLAKE2b-256 d0322ed101a0bbe7459abff14c1f2cdb80047bc6eeca3327ebce3fcffd46cd8b

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