biotite.structure.spread_chain_wise

biotite.structure.spread_chain_wise(array, input_data)[source]

Expand chain-wise data to atom-wise data.

Each value in the chain-wise input is assigned to all atoms of this chain:

output_data[i] = input_data[j], i is incremented from atom to atom, j is incremented every chain change.

Parameters
arrayAtomArray or AtomArrayStack

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

input_datandarray

The data to be spread. The length of axis=0 must be equal to the amount of different chain IDs in array.

Returns
output_datandarray

Chain-wise spread input_data. Length is the same as array_length() of array.