torch_sim.unitsΒΆ

Unit systems and conversions.

Defines a units system and returns a dictionary of conversion factors. Units are defined similar to https://docs.lammps.org/units.html.

Functions

unit_factor_from_annotation

Return a unit factor from an annotation, including optional annotations.

Classes

BaseConstant

CODATA Recommended Values of the Fundamental Physical Constants: 2014.

MetalUnits

Metal unit system using Angstroms, eV, amu, and proton charge.

RealUnits

Real unit system using Angstroms, kcal/mol, and proton charge.

UnitAnnotation

Typed typing.Annotated metadata for a unit conversion factor.

UnitConversion

Unit conversion factors between common unit systems.

UnitSystem

Container class for unit systems.

bc

alias of BaseConstant

pi

Convert a string or number to a floating-point number, if possible.

uc

alias of UnitConversion