sponge.function.set_global_units

View Source On Gitee
sponge.function.set_global_units(length_unit: Union[str, Units, Length, float, int] = None, energy_unit: Union[str, Units, Length, float, int] = None, units: Units = None)[source]

set global units.

Parameters
  • length_unit (Union[str, Units, Length, float, int]) – Length unit. Only valid when units is None. Default: None.

  • energy_unit (Union[str, Units, Length, float, int]) – Energy unit. Only valid when units is None. Default: None.

  • units (Units) – Units object. Default: None.

Supported Platforms:

Ascend GPU CPU

Examples

>>> from sponge import set_global_units
>>> set_global_units('nm', 'kj/mol')