Get chain id#

Extracting chain identifier strings from molecular systems.

The function molsysmt.element.chain.get_chain_id() retrieves the assigned ID strings for chains in a molecular system.

Added in version 1.0.0.

Basic usage#

Let’s extract the IDs for a molecular complex:

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