biotite.structure.array

biotite.structure.array(atoms)[source]

Create an AtomArray from a list of Atom.

Parameters
atomsiterable(Atom)

The atoms to be combined in an array.

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.array_length())
3