molsysmt.physchem.get_polarity#

molsysmt.physchem.get_polarity(molecular_system, element='group', selection='all', syntax='MolSysMT', definition='grantham', skip_digestion=False)[source]#

Polarity index per residue group from a reference scale.

Returns a dimensionless polarity value for each selected residue group, looked up from one of the published amino-acid polarity scales. Polarity quantifies the tendency of the side chain to participate in electrostatic interactions and hydrogen bonding.

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

  • element (str, default='group') – 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 (object, default='grantham') – Argument definition.

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

Returns:

Polarity values for each selected group, in the same order as the selection. Length n_groups.

Return type:

list of float

Raises:

NotImplementedMethodError – If an unsupported definition is requested.

Notes

Supported scales and their primary references:

  • 'grantham': Grantham R. Science 185:862–864 (1974).

  • 'zimmerman': Zimmerman J.M., Eliezer N., Simha R. J. Theor. Biol. 21:170–201 (1968).

Added in version 1.0.0.