fractaldna.dna_models.basepair.BasePair

class fractaldna.dna_models.basepair.BasePair(base, chain=-1, position=array([0., 0., 0.]), rotation=array([0., 0., 0.]), index=0)

Bases: object

Defines a base pair

BasePair(base, chain=-1, position=np.zeros(3), rotation=np.zeros(3))

Create a base pair defined by a particular base GTAC (in the 5’ dirn)

Parameters:
  • base (str) – defining base (GATC)

  • chain (int) – int to indicate the id of the current DNA macromolecule

  • position (array) – position of base pair relative to (0, 0, 0)

  • rotation (array) – rotation euler angles of base pair relative to local xyz

  • index (int) – index of base pair in chain

__init__(base, chain=-1, position=array([0., 0., 0.]), rotation=array([0., 0., 0.]), index=0)

Constructor

Methods

__init__(base[, chain, position, rotation, ...])

Constructor

getCenter()

Get the geometric center of the base-pair (non-weighted average molecule position)

iterMolecules()

rotate(rotation[, about_origin])

BasePair.rotation(rotation, about_origin=False)

setNewChain(chainIdx)

Reset the chain index for all molecules and the base pair

set_bp_index(bp_idx)

BasePair.setNewChain(chainIdx)

to_frame()

Return base pair as data frame of molecules

to_text([seperator])

Return a description of the molecules in the base pair as text

translate(translation)

translate the base pair by the specified 3-vector array

Attributes

moleculeNames

pairings

getCenter()

Get the geometric center of the base-pair (non-weighted average molecule position)

Return type:

array

rotate(rotation, about_origin=False)

BasePair.rotation(rotation, about_origin=False)

Rotate elements in base pair

If about_origin is True, the rotation is with respect to (0, 0, 0) If about_origin is False, the rotation is with respect to the base pair position

Return type:

None

setNewChain(chainIdx)

Reset the chain index for all molecules and the base pair

Return type:

None

set_bp_index(bp_idx)

BasePair.setNewChain(chainIdx)

Reset the chain index for all molecules

Return type:

None

to_frame()

Return base pair as data frame of molecules

Return type:

DataFrame

to_text(seperator=' ')

Return a description of the molecules in the base pair as text

Return type:

str

translate(translation)

translate the base pair by the specified 3-vector array

Return type:

None