Get entity index#
Querying 0-indexed integer indices for entities in a molecular system.
The function molsysmt.element.entity.get_entity_index() returns 0-based topological indices for entities.
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.entity.get_entity_index().
Basic usage#
Let’s retrieve the topological indices:
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.
indices = msm.element.entity.get_entity_index(molsys, element='entity', selection='all')
print('Entity indices:', indices)
Entity indices: [0, 1]
See also
Related Tools & References
Get entity id: Get entity IDs with
molsysmt.element.entity.get_entity_id().Get entity name: Get entity names with
molsysmt.element.entity.get_entity_name().