array
#
- biotite.structure.array(atoms)[source]#
Create an
AtomArray
from a list ofAtom
.- Parameters:
- atomsiterable object of Atom
The atoms to be combined in an array. All atoms must share the same annotation categories.
- Returns:
- arrayAtomArray
The listed atoms as array.
Examples
Creating an atom array from atoms:
>>> atom1 = Atom([1,2,3], chain_id="A") >>> atom2 = Atom([2,3,4], chain_id="A") >>> atom3 = Atom([3,4,5], chain_id="B") >>> atom_array = array([atom1, atom2, atom3]) >>> print(atom_array) A 0 1.000 2.000 3.000 A 0 2.000 3.000 4.000 B 0 3.000 4.000 5.000