Skip to main content

DNA Curvature Analysis

Project description

Dnacurve is a Python library and console script 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.

For command line usage run python -m dnacurve --help


Christoph Gohlke


BSD 3-Clause






Remove support for Python 2.7 and 3.5. Update copyright.


Move modules into dnacurve package.


Add option to start web interface from console. Use matplotlib OOP interface.


Add functions to return PDB and CSV results as string.


Style and doctest fixes.


DNAse I Consensus model.


Overlapping chunks iterator.


Limit maximum sequence length to 510 nucleotides. Read simple Fasta sequence files. Save positive coordinates to PDB files. Fix sequence display for matplotlib 1.3.


Initial release.


The API is not stable yet and is expected to change between revisions.

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.


  1. Bending and curvature calculations in B-DNA. Goodsell DS, Dickerson RE. Nucleic Acids Res 22, 5497-503, 1994. See also

  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.


>>> from dnacurve import CurvedDNA
>>> result = CurvedDNA('ATGCAAATTG'*5, 'trifonov', name='Example')
>>> result.curvature[:, 18:22]
array([[0.58062, 0.58163, 0.58278, 0.58378],
       [0.0803 , 0.11293, 0.07676, 0.03166],
       [0.57924, 0.5758 , 0.57368, 0.5735 ]])
>>> result.save_csv('_test.csv')
>>> result.save_pdb('_test.pdb')
>>> result.plot('_test.png', dpi=160)

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-2020.1.1.tar.gz (21.8 kB view hashes)

Uploaded source

Built Distribution

dnacurve-2020.1.1-py3-none-any.whl (23.5 kB view hashes)

Uploaded py3

Supported by

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