Get n components#

Counting the total number of components in a molecular system.

The function molsysmt.element.component.get_n_components() counts components satisfying given selection criteria.

Added in version 1.0.0.

Basic usage#

Let’s count elements in the system:

import molsysmt as msm
molsys = msm.convert(msm.systems['Barnase-Barstar']['barnase_barstar.h5msm'])
n = msm.element.component.get_n_components(molsys)
print('Total components:', n)
Total components: 2