The Units package provides a set of common physical units required by BioSimSpace. This provides convenient, short-hand access to BioSimSpace.Types.

Some examples:

import BioSimSpace as BSS

# Create a length of 14.3 Angstrom.
length = BSS.Types.Length(14.3, "Angstrom") # Long-winded way.
length = 14.3*BSS.Units.Length.angstrom     # Simplified way.

# Create an area by multiplying two lengths.
area = 3.6*BSS.Units.Length.nanometer * 12*BSS.Units.Length.angstrom

# Create a time of 100 milliseconds.
time = 100*BSS.Units.Time.millisecond

Length units

Length.meter A length in meters.
Length.angstrom A length in Angstrom.
Length.nanometer A length in nanometers.
Length.picometer A length in picometers.

Area units

Area.meter2 An area in square meters.
Area.angstrom2 An area in square Angstrom.
Area.nanometer2 An area in square nanometers.
Area.picometer2 An area in square picometers.

Volume units

Volume.meter3 A volume in cube meters.
Volume.angstrom3 A volume in cube Angstrom.
Volume.nanometer3 A volume in cube nanometers.
Volume.picometer3 A volume in cube picometers.

Charge units

Charge.electron_charge A charge in electron charge.
Charge.coulomb A charge in Coulomb.

Energy units

Energy.kcal_per_mol An energy in kcal per mol.
Energy.kj_per_mol An energy in kJ per mol.
Energy.kt An energy in KT.

Pressure units

Pressure.atm A pressure in atmosphere. A pressure in bar.

Temperature units

Temperature.kelvin A temperature in Kelvin.
Temperature.celsius A temperature in Celsius.
Temperature.fahrenheit A temperature in Fahrenheit.

Time units A time in days.
Time.hour A time in hours.
Time.minute A time in minutes.
Time.second A time in seconds.
Time.millisecond A time in milliseconds.
Time.nanosecond A time in nanoseconds.
Time.picosecond A time in picoseconds.
Time.femtosecond A time in femtoseconds.