molsysmt.element.chain.get_chain_type#

molsysmt.element.chain.get_chain_type(molecular_system, element='atom', selection='all', redefine_indices=False, redefine_types=False, syntax='MolSysMT', skip_digestion=False)[source]#

Getting chain types from a molecular system.

Parameters:
  • molecular_system (molecular system) – Molecular system in any supported MolSysMT format.

  • element (str, default='atom') – Structural element level to query (‘atom’, ‘group’, ‘component’, ‘molecule’, ‘chain’, ‘entity’).

  • selection (str, list, tuple, or numpy.ndarray, default='all') – Selection string or boolean/integer array specifying elements.

  • redefine_indices (bool, default=False) – Whether to reassign contiguous 0-based indices.

  • redefine_types (object, default=False) – Argument redefine_types.

  • syntax (str, default='MolSysMT') – Selection syntax used to evaluate selection (e.g., ‘MolSysMT’, ‘MDTraj’).

  • skip_digestion (bool, default=False) – Whether to skip MolSysMT’s internal argument digestion mechanism.

Returns:

List of chain type classifications for each selected element.

Return type:

list of str

Notes

Explicit types are preserved when available. If types are redefined, they are inferred locally from the molecule types assigned to each chain.

Added in version 1.0.0.