Get component name#
Extracting descriptive names for components in molecular systems.
The function molsysmt.element.component.get_component_name() retrieves human-readable names assigned to components.
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.component.get_component_name().
Basic usage#
Let’s query the names across the system:
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.
names = msm.element.component.get_component_name(molsys, element='component', selection='all')
print('Component names:', names)
Component names: ['protein 1', 'protein 5']
See also
Related Tools & References
Get component id: Get component IDs with
molsysmt.element.component.get_component_id().Get component type: Get component types with
molsysmt.element.component.get_component_type().