get_all_residue_positions#

biotite.structure.get_all_residue_positions(array)[source]#

For each atom, obtain the position of the residue corresponding to this atom in the input array.

For example, the position of the first residue in the atom array is 0, the the position of the second residue is 1, etc.

Parameters:
arrayAtomArray or AtomArrayStack

The atom array (stack) to determine the residues from.

Returns:
residue_indicesndarray, dtype=int, shape=(k,)

The indices that point to the position of the residues.

See also

get_residue_positions

Similar to this function, but for a given subset of atom indices.

Examples

>>> print(get_all_residue_positions(atom_array))
[ 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1
  1  1  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2  2  2  2  2  2  2  2
  2  2  2  2  2  2  2  2  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3
  3  3  3  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  5  5  5  5
  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  6  6  6  6
  6  6  6  6  6  6  6  6  6  6  6  6  6  6  6  7  7  7  7  7  7  7  7  7
  7  7  7  7  7  7  7  7  7  7  7  7  7  8  8  8  8  8  8  8  8  8  8  8
  8  9  9  9  9  9  9  9 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11
 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13
 13 13 13 14 14 14 14 14 14 14 15 15 15 15 15 15 15 15 15 15 15 15 15 15
 15 15 15 15 15 15 15 15 15 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16
 17 17 17 17 17 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 18
 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19]