molsysmt.physchem.get_mass#

molsysmt.physchem.get_mass(molecular_system, element='system', selection='all', syntax='MolSysMT', definition='physical', skip_digestion=False)[source]#

Total mass of the selected elements.

Returns the mass aggregated at the requested hierarchical level. Two definitions are available: a table of standard atomic masses ('physical') and mass values read directly from an OpenMM object ('OpenMM').

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

  • element (str, default='system') – 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.

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

  • definition (str, default='physical') – Reference dataset used to assign the requested physical property.

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

Returns:

Mass as a PyUnitWizard quantity in dalton (amu). Shape is (n_elements,) for atom/group/component/molecule/chain/entity elements, or a scalar for element='system'.

Return type:

quantity

Raises:

NotImplementedError – If the requested combination of element and form is not supported under the 'OpenMM' definition.

Notes

Standard atomic masses ('physical') follow IUPAC 2021 values. Results are converted to pint units and standardized through PyUnitWizard before being returned.

Added in version 1.0.0.