get_scale_factors

mdcraft.algorithm.unit.get_scale_factors(bases: dict[str, Quantity | Quantity], other: dict[str, list] = None) dict[str, Quantity | Quantity][source]

Evaluates scale 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 scale factors to compute. The key should be the name of the scale factor, and the value should contain tuple objects with the names of bases or default scale factors and their powers.

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

Returns:
scalesdict

Scale factors.