get_chain_starts#

biotite.structure.get_chain_starts(array, add_exclusive_stop=False)[source]#

Get the indices in an atom array, which indicates the beginning of a new chain.

A new chain starts, when the chain ID changes or when the residue ID decreases.

Parameters:
arrayAtomArray or AtomArrayStack

The atom array (stack) to get the chain starts from.

add_exclusive_stopbool, optional

If true, the exclusive stop of the input atom array, i.e. array.array_length(), is added to the returned array of start indices as last element.

Returns:
startsndarray, dtype=int

The start indices of new chains in array.

Notes

This method is internally used by all other chain-related functions.