Internal units

Jumos uses a set of internal units, converting back and forth to these units when needed. Conversion from SI units is always supported. Parenthesis indicate planned conversion that is not implemented yet.

Quantity Internal unit Supported conversions
Distances Ångtröm (\(A\)) (bohr)
Time Femptosecond (\(fs\))  
Velocities Ångtröm/Femptosecond (\(A/fs\))  
Mass Unified atomic mass (\(u\) or \(Da\)) \(g/mol\)
Temperature Kelvin (\(K\))  
Energy Kilo-Joule/Mole (\(kJ/mol\)) (\(eV\)), (\(Ry\)), (\(kcal/mol\))
Force Kilo-Joule/(Mole-Ångtröm) \(kJ/(mol A)\)  
Pressure \(bar\) (\(atm\))
Charge Multiples of \(e = 1.602176487\ 10^{-19}C\)  

Interaction with others units systems

Jumos uses it’s own unit system, and do not track the units in the code. All the interaction with units is based on the SIUnits package. We can convert from and to internal representation using the following functions :


Converts a value with unit to its internal representation.

julia> internal(2m)         # Distance

julia> internal(3kg*m/s^2)  # Force
with_unit(value::Number, target_unit::SIUnit)

Converts an internal value to its value in the International System. You shall note that units are not tracked in the code, so you can convert a position to a pressure. And all the results are returned in the main SI unit, without considering any power-of-ten prefix.

This may leads to strange results like:

julia> with_unit(45, mJ)
    188280.0 kg m²/s²

julia> with_unit(45, J)
    188280.0 kg m²/s²

This behaviour will be corrected in future versions.