Is composed of#

Checking structural containment relationships between element tiers.

The function molsysmt.element.is_composed_of() verifies if an upper-tier structural element is composed of a lower-tier element type according to the MolSysMT topological model.

Added in version 1.0.0.

Basic usage#

Let’s test hierarchical composition relationships across structural tiers:

import molsysmt as msm
print('Is component composed of groups?:', msm.element.is_composed_of('component', 'group'))
print('Is group composed of atoms?:', msm.element.is_composed_of('group', 'atom'))
print('Is atom composed of molecules?:', msm.element.is_composed_of('atom', 'molecule'))
Is component composed of groups?: True
Is group composed of atoms?: True
Is atom composed of molecules?: False