Physical unit definitions¶
Defines
-
Unit¶
This file contains definitions of various physical units. We have decided to make the units more explicit in the program; since they are inline constexpr, there should be no runtime overhead on its use, and it makes for a less bug-prone and more clear code. It also makes switching scales far easier and less bug-prone.
-
namespace mdk
Variables
-
Unit f77unit = 1.0
-
Unit angstrom = f77unit / 5.0
-
Unit nanometer = 10.0 * angstrom
-
Unit meter = nanometer * 1.0e9
-
Unit nanosecond = 1.0
-
Unit tau = 1.0 * nanosecond
-
Unit microsecond = nanosecond * 1.0e3
-
Unit millisecond = nanosecond * 1.0e6
-
Unit second = nanosecond * 1.0e9
-
Unit atom = 1.0
-
Unit mol = 6.02214076e23 / atom
-
Unit eps = 1.0
-
Unit Joule = kcal / 4184.0
-
Unit eps_kB = 1.0
-
Unit f77mass = eps * tau * tau / (f77unit * f77unit)
In the Fortran version of the model, distance of
f77unit
, time oftau
, energy ofeps
and the average mass of an aminoacid were units; these are however incongruent, it’s a confirmed bug.
-
Unit echarge = 1.0
-
Unit Coulomb = echarge / 1.602176634e-19
-
Unit rad = 1.0
-
Unit degree = (2.0 * M_PI / 360.0) * rad
-
Unit f77unit = 1.0