get_scaling_factors

mdhelper.algorithm.unit.get_scaling_factors(bases: dict[str, Quantity | Quantity], other: dict[str, list] = {}) dict[str, Quantity | Quantity][source]

Evaluates scaling factors for reduced units.

Parameters:
basesdict

Fundamental quantities: molar mass (\(m\)), length (\(\sigma\)), and energy (\(\epsilon\)).

Format:

{
  "mass": <openmm.unit.Quantity> | <pint.Quantity>,
  "length": <openmm.unit.Quantity> | <pint.Quantity>,
  "energy": <openmm.unit.Quantity> | <pint.Quantity>
}

Reference units: \(\mathrm{g/mol}\), \(\mathrm{nm}\), and \(\mathrm{kJ}\).

otherdict, optional

Other scaling factors to compute. The key should be the name of the scaling factor, and the value should contain tuple objects with the names of bases or default scaling factors and their powers.

Example: {"diffusivity": (("length", 2), ("time", -1))}.

Returns:
scalesdict

Scaling factors.