fractaldna.dna_models.dnapositions.MoleculeFromAtoms¶
- class fractaldna.dna_models.dnapositions.MoleculeFromAtoms(atoms)¶
Bases:
object
- __init__(atoms)¶
MoleculeFromAtoms(atoms) A molecule created from a dictionary of cartesian atom positions
Methods
__init__
(atoms)MoleculeFromAtoms(atoms) A molecule created from a dictionary of cartesian atom positions
c = MoleculeFromAtoms.find_center()
l = MoleculeFromAtoms.find_equivalent_half_lengths()
r = MoleculeFromAtoms.find_equivalent_radius()
half_lengths = MoleculeFromAtoms.find_half_lengths()
r = MoleculeFromAtoms.find_radius()
from_cylindrical
(atoms[, inverse])Make a MoleculeFromAtoms instance from a list of atoms in cylindrical coords (r, theta, phi)
to_plot
()fig = MoleculeFromAtoms.to_plot()
- find_center()¶
c = MoleculeFromAtoms.find_center()
Find the barycenter of the atoms that constitute this molecule
- Return type:
float
- find_equivalent_half_lengths()¶
l = MoleculeFromAtoms.find_equivalent_half_lengths()
Find the half lengths scaled to give a volume equal to what the constituent molecules occupy
- Return type:
array
- find_equivalent_radius()¶
r = MoleculeFromAtoms.find_equivalent_radius()
Return the radius that yields the same volume occupied by all atoms
- Return type:
float
- find_half_lengths()¶
half_lengths = MoleculeFromAtoms.find_half_lengths()
Return an array of the half lengths of a box that encloses the molecule in xyz. This is not a minimum bounding volume
- Return type:
array
- find_radius()¶
r = MoleculeFromAtoms.find_radius()
Return the minimum radius that encloses this molecule
- Return type:
float
- classmethod from_cylindrical(atoms, inverse=False)¶
Make a MoleculeFromAtoms instance from a list of atoms in cylindrical coords (r, theta, phi)
MoleculeFromAtoms.from_cylindrical(atoms, inverse=False)
Note: Theta is in degrees
- Parameters:
inverse (
bool
) – (default False)Set to True to generate a dyadically related base pair (negates theta and z)
- to_plot()¶
fig = MoleculeFromAtoms.to_plot()
Returns a matplotlib figure instance of the molecule.
- Return type:
Figure