Is element#
Validating whether a given identifier represents a recognized topological element type in MolSysMT.
The function molsysmt.element.is_element() checks if a string or symbol corresponds to a valid structural element tier (atom, group, component, molecule, chain, entity, bond, 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.is_element().
Basic usage#
Let’s test standard element names against the recognized topological tiers:
import molsysmt as msm
print('Is "atom" an element?:', msm.element.is_element('atom'))
print('Is "group" an element?:', msm.element.is_element('group'))
print('Is "residue" recognized?:', msm.element.is_element('residue'))
print('Is "custom_tier" an element?:', msm.element.is_element('custom_tier'))
Is "atom" an element?: True
Is "group" an element?: True
Is "residue" recognized?: True
Is "custom_tier" an element?: False
See also
Related Tools & References
Is composed of: Check structural tier composition with
molsysmt.element.is_composed_of().