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.
API documentation
Follow this link for a detailed description of the input arguments, raised errors, and returned objects of this function: molsysmt.element.chain.get_chain_id().
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'])
Note
Demo Systems Catalog
This tutorial uses demonstration datasets provided by MolSysMT. To explore the full catalog of bundled systems, forms, and file paths, visit the Demo Systems guide.
ids = msm.element.chain.get_chain_id(molsys, element='chain', selection='all')
print('Chain IDs:', ids)
Chain IDs: ['0']
See also
Related Tools & References
Get chain index: Get chain indices with
molsysmt.element.chain.get_chain_index().Get chain name: Get chain names with
molsysmt.element.chain.get_chain_name().Get chain type: Get chain types with
molsysmt.element.chain.get_chain_type().