Units and constants

The units of MDAnalysis trajectories are the Å (ångström) for length and ps (picosecond) for time. Regardless of how the original MD format stored the trajectory data, MDAnalysis converts it to MDAnalysis units when reading the data in, and converts back when writing the data out. Analysis classes generally also use these default units. Exceptions to the default units are always noted in the documentation; for example, mass densities can be given in \(g/cm^3\).

Other base units are listed in the table Base units in MDAnalysis.

Base units in MDAnalysis

Quantity

Unit

SI units

length

Å

\(10^{-10}\) m

time

ps

\(10^{-12}\) s

energy

kJ/mol

\(1.66053892103219 \times 10^{-21}\) J

charge

\(e\)

\(1.602176565 \times 10^{-19}\) As

force

kJ/(mol·Å)

\(1.66053892103219 \times 10^{-11}\) J/m

speed

Å/ps

\(100\) m/s

mass

u

\(1.66053906660(50) \times 10^{-27}\) kg

angle

degrees

\(\frac{\pi}{180}\) rad

Unit conversion

Quantities can be converted from units with convert(). convert() simply multiplies the initial quantity with a precomputed conversion factor, as obtained from get_conversion_factor().

The computed conversion factors for each quantity type are stored in MDAnalysis.units and shown below.

Constants