Skip to content

Wyss/na2pdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

na2pdb

Convert DNA sequencesto PDB files and spatially wrangle them.
Useful for simulation input data. Conceived to be the basis of a cadnano 2.5 *.json converter, which is now in that repo as createPDB.py.

The core data structure is a stripped down version of ProDy's AtomGroup class

dependencies: numpy

Should be Python 2/3 compatible

RNA is not supported yet, but totally could be.

Base data pdb's were sourced from Avogadro 1.1.1 / OpenBabel output and an effort is made to come as close to the spatial output for double stranded DNA as would be generated from Avogadro 1.1.1.

""" create a strand that double backs on itself
"""
from na2pdb import AtomicSequence
aseq = AtomicSequence("ACGTACGT", name="not_useful")
aseq.transformBases(4, 8, 0, 0, 0, False)
# 1. Get base separation
aseq.linearize()
# 2. do all rotations
aseq.applyReverseQueue()
aseq.applyTwist()
# 3. move to position
aseq.applyTransformQueue()

out_file = 'test_file.pdb'
aseq.toPDB(out_file)

About

convert DNA and RNA to PDB files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages