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:
- License:
BSD-3-Clause
- Version:
2026.8.15
- DOI:
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):
CPython 3.12.10, 3.13.15, 3.14.7, 3.15.0rc 64-bit
Numpy 2.5.2
Matplotlib 3.11.1
Flask 3.1.3 (optional)
Revisions
2026.8.15
Add HTML application based on Pyodide.
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
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.
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.
A comparison of six DNA bending models. Tan RK and Harvey SC. J Biomol Struct Dyn 5, 497-512, 1987.
Curved DNA: design, synthesis, and circularization. Ulanovsky L et al. Proc Natl Acad Sci USA 83, 862-6, 1986.
The ten helical twist angles of B-DNA. Kabsch W, Sander C, and Trifonov EN. Nucleic Acids Res 10, 1097-1104, 1982.
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)
Release files for dnacurve 2026.8.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dnacurve-2026.8.15.tar.gz | 29.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dnacurve-2026.8.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.8 kB
Release files / dnacurve-2026.8.15.tar.gz
| Download URL | dnacurve-2026.8.15.tar.gz |
|---|---|
| Size | 29.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
272a0f21a473b8313c60fd8da497d846de74a9b6b98c92f516cd6c0edf6ec701
|
|
BLAKE2b-256 checksum How to use checksums |
09d94c69d496f2bec0dde0134cf564c20c68edac167698480384cc76eb223a85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / dnacurve-2026.8.15-py3-none-any.whl
| Download URL | dnacurve-2026.8.15-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
925307322f0214961cb497282350384f2608f1c0df17681da8719bb8095d2cec
|
|
BLAKE2b-256 checksum How to use checksums |
9c2030c562f9c2b946bc199c479da7312c86113e473beb98d8b783110d8660a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|