sponge.function.set_global_units

查看源文件
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)[源代码]

给全局单位设置单位。

参数:
  • length_unit (Union[str, Units, Length, float, int]) - 长度单位。仅当 units 为 None 时才有效。默认值: None

  • energy_unit (Union[str, Units, Length, float, int]) - 能量单位。仅当 units 为 None 时才有效。默认值: None

  • units (Units) - 单位。默认值: None

支持平台:

Ascend GPU CPU

样例:

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