Simbody
Defines

Constants.h File Reference

High precision mathematical and physical constants. More...

Go to the source code of this file.

Defines

#define SimTK_PI   3.141592653589793238462643383279502884197169399375105820974944592L
 The ratio pi of a circle's circumference to its diameter in Euclidean geometry.
#define SimTK_E   2.718281828459045235360287471352662497757247093699959574966967628L
 e, or exp(1).
#define SimTK_LN2   6.931471805599453094172321214581765680755001343602552541206800095e-1L
 The natural (base e) logarithm of 2.
#define SimTK_LN10   2.302585092994045684017991454684364207601101488628772976033327901L
 The natural (base e) logarithm of 10.
#define SimTK_LOG2E   1.442695040888963407359924681001892137426645954152985934135449407L
 log2(e).
#define SimTK_LOG10E   4.342944819032518276511289189166050822943970058036665661144537832e-1L
 log10(e).
#define SimTK_SQRT2   1.414213562373095048801688724209698078569671875376948073176679738L
 The square root of 2.
#define SimTK_SQRT3   1.732050807568877293527446341505872366942805253810380628055806979L
 The square root of 3.
#define SimTK_CBRT2   1.259921049894873164767210607278228350570251464701507980081975112L
 The cube root of 2.
#define SimTK_CBRT3   1.442249570307408382321638310780109588391869253499350577546416195L
 The cube root of 3.
#define SimTK_AVOGADROS_NUMBER   6.0221415e23L
 Avogadro's number (NA) is defined as the number of atoms in 12g of pure Carbon-12 in its unbound, rest state.
#define SimTK_MASS_OF_PROTON_IN_MD   1.00727646688L
 Mass of a proton in MD units.
#define SimTK_MASS_OF_NEUTRON_IN_MD   1.00866491560L
 Mass of a neutron in MD units.
#define SimTK_MASS_OF_ELECTRON_IN_MD   5.4857990945e-4L
 Mass of an electron in MD units.
#define SimTK_CHARGE_OF_PROTON_IN_SI   1.60217653e-19L
 Atomic charge unit e expressed in MKS unit of Coulombs.
#define SimTK_CHARGE_OF_PROTON_IN_MD   1.L
 Atomic charge unit e expressed in MD units, which uses e as its charge unit! The charge on an electron is just the negative of this value.
#define SimTK_MOLAR_CHARGE_IN_SI   9.6485338e+4L
 The charge of 1 mole of protons, expressed in Coulombs.
#define SimTK_MOLAR_CHARGE_IN_MD   SimTK_AVOGADROS_NUMBER
 The charge of 1 mole of protons, expressed in MD units where the unit of charge is just the charge on one proton.
#define SimTK_LIGHTSPEED_IN_SI   2.99792458e+8L
 Speed of light c is exact in MKS units of m/s.
#define SimTK_LIGHTSPEED_IN_MD   2.99792458e+5L
 Speed of light c is exact in MD units of nm/ps.
#define SimTK_GRAVITATIONAL_CONSTANT_IN_SI   6.6742e-11L
 Newton's gravitational constant G in N-m^2/kg^2 = m^3 kg^-1 s^-2.
#define SimTK_GRAVITATIONAL_CONSTANT_IN_MD   1.10827e-34L
 Newton's gravitational constant G in (kJ/mol)-nm^2/u^2 = nm^3 u^-1 ps^-2.
#define SimTK_MAGNETIC_PERMEABILITY_IN_SI   1.256637061435917295385057353311801153678867759750042328389977837e-6L
 Free space magnetic permeability constant mu0 in SI units (exact).
#define SimTK_MAGNETIC_PERMEABILITY_IN_MD   1.94259179e-8L
 Free space magnetic permeability constant mu0 in MD units (not exact).
#define SimTK_ELECTRIC_PERMITTIVITY_IN_SI   8.854187817620389850536563031710750260608370166599449808102417149e-12L
 Free space permittivity constant e0 = 1/(mu0*c^2) Farad/m = Coulomb^2/(N-m^2) (exact in SI units).
#define SimTK_ELECTRIC_PERMITTIVITY_IN_MD   5.7276575e-4L
 Free space permittivity constant e0=1/(mu0*c^2) e^2/(kN-nm^2) using MD permeability and MD lightspeed.
#define SimTK_COULOMB_CONSTANT_IN_SI   8.9875517873681764e+9L
 Coulomb's constant kappa = 1/(4pi*e0)=1e-7*c^2 N-m^2/Coulomb^2 (exact in SI units).
#define SimTK_COULOMB_CONSTANT_IN_MD   1.38935456e+2L
 Coulomb's constant kappa = 1/(4*pi*e0) in MD units.
#define SimTK_COULOMB_CONSTANT_IN_KCAL_ANGSTROM   3.32063711e+2L
 Coulomb's constant kappa = 1/(4*pi*e0) in kcal-Angstroms/e^2.
#define SimTK_MOLAR_GAS_CONSTANT_SI   8.314472L
 This is the gas constant R in (J/mol)/K.
#define SimTK_MOLAR_GAS_CONSTANT_MD   8.314472e-3L
 This is the gas constant R in (kJ/mol)/K.
#define SimTK_MOLAR_GAS_CONSTANT_KCAL_ANGSTROM   1.9872065e-3L
 This is the gas constant R in (kcal/mol)/K.
#define SimTK_BOLTZMANN_CONSTANT_SI   1.3806505e-23L
 Boltzmann's constant in SI units of joules/kelvin; just divide R by NA.
#define SimTK_BOLTZMANN_CONSTANT_MD   SimTK_MOLAR_GAS_CONSTANT_MD
 Boltzmann's constant in MD units of (kJ/mol)/kelvin; same as R.
#define SimTK_BOLTZMANN_CONSTANT_KCAL_ANGSTROM   SimTK_MOLAR_GAS_CONSTANT_KCAL_ANGSTROM
 Boltzmann's constant in Kcal-Angstrom units of (kcal/mol)/kelvin; same as R.
#define SimTK_RADIAN_TO_DEGREE   5.729577951308232087679815481410517033240547246656432154916024386e+1L
 Convert radians to degrees.
#define SimTK_DEGREE_TO_RADIAN   1.745329251994329576923690768488612713442871888541725456097191440e-2L
 Convert degrees to radians.
#define SimTK_NS_TO_S   1e-9L
 Convert nanoseconds to seconds.
#define SimTK_S_TO_NS   1e9L
 Convert seconds to nanoseconds.
#define SimTK_KCAL_TO_KJOULE   4.184L
 Convert Kcal to Kjoule (also Kcal/mol to Kjoule/mol).
#define SimTK_KJOULE_TO_KCAL   2.390057361376673040152963671128107074569789674952198852772466539e-1L
 Convert Kjoule to Kcal (also Kjoule/mol to Kcal/mol).
#define SimTK_DALTON_TO_GRAM   1.66053886e-24L
 Convert atomic mass unit (amu, Dalton) to g.
#define SimTK_E_TO_COULOMB   SimTK_CHARGE_OF_PROTON_IN_SI
 Convert proton charge units to Coulombs.
#define SimTK_EV_TO_JOULE   SimTK_CHARGE_OF_PROTON_IN_SI
 Convert electron volts to Joules.

Detailed Description

High precision mathematical and physical constants.

This file is self-contained and can be included in ANSI C programs as well as C++.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines