Get chain index#

Querying 0-indexed integer indices for chains in a molecular system.

The function molsysmt.element.chain.get_chain_index() returns 0-based topological indices for chains.

Added in version 1.0.0.

Basic usage#

Let’s retrieve the topological indices:

import molsysmt as msm
molsys = msm.convert(msm.systems['Barnase-Barstar']['barnase_barstar.h5msm'])
indices = msm.element.chain.get_chain_index(molsys, element='chain', selection='all')
print('Chain indices:', indices)
Chain indices: [0]