Miscellaneous¶
- metatomic.torch.pick_device(model_devices: List[str], desired_device: str | None) str[source]¶
Select the best device according to the list of
model_devicesfrom a model, the user-provideddesired_deviceand what’s available on the current machine.
- metatomic.torch.unit_conversion_factor(quantity: str, from_unit: str, to_unit: str)[source]¶
Get the multiplicative conversion factor from
from_unittoto_unit. Both units must be valid and known for the given physicalquantity. The set of valid quantities and units is available here.
Known quantities and units¶
The following quantities and units can be used with metatomic models. Adding new
units and quantities is very easy, please contact us if you need something else!
In the mean time, you can create metatomic.torch.ModelOutput with
quantities that are not in this table. A warning will be issued and no unit
conversion will be performed.
When working with one of the quantities in this table, the unit you use must be one of the registered unit.
quantity |
units |
|---|---|
length |
|
energy |
|
force |
|
pressure |
|
momentum |
|