Constants.h

Go to the documentation of this file.
00001 #ifndef SimTK_SimTKCOMMON_CONSTANTS_H_
00002 #define SimTK_SimTKCOMMON_CONSTANTS_H_
00003 
00004 /* -------------------------------------------------------------------------- *
00005  *                      SimTK Core: SimTKcommon                               *
00006  * -------------------------------------------------------------------------- *
00007  * This is part of the SimTK Core biosimulation toolkit originating from      *
00008  * Simbios, the NIH National Center for Physics-Based Simulation of           *
00009  * Biological Structures at Stanford, funded under the NIH Roadmap for        *
00010  * Medical Research, grant U54 GM072970. See https://simtk.org.               *
00011  *                                                                            *
00012  * Portions copyright (c) 2006-7 Stanford University and the Authors.         *
00013  * Authors: Michael Sherman                                                   *
00014  * Contributors:                                                              *
00015  *                                                                            *
00016  * Permission is hereby granted, free of charge, to any person obtaining a    *
00017  * copy of this software and associated documentation files (the "Software"), *
00018  * to deal in the Software without restriction, including without limitation  *
00019  * the rights to use, copy, modify, merge, publish, distribute, sublicense,   *
00020  * and/or sell copies of the Software, and to permit persons to whom the      *
00021  * Software is furnished to do so, subject to the following conditions:       *
00022  *                                                                            *
00023  * The above copyright notice and this permission notice shall be included in *
00024  * all copies or substantial portions of the Software.                        *
00025  *                                                                            *
00026  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
00027  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   *
00028  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    *
00029  * THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,    *
00030  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR      *
00031  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE  *
00032  * USE OR OTHER DEALINGS IN THE SOFTWARE.                                     *
00033  * -------------------------------------------------------------------------- */
00034 
00089     /**************************/
00090     /* MATHEMATICAL CONSTANTS */
00091     /**************************/
00092 
00110 
00116 #define SimTK_PI     3.141592653589793238462643383279502884197169399375105820974944592L
00117 
00122 #define SimTK_E      2.718281828459045235360287471352662497757247093699959574966967628L
00123 
00129 #define SimTK_LN2    6.931471805599453094172321214581765680755001343602552541206800095e-1L
00130 
00136 #define SimTK_LN10   2.302585092994045684017991454684364207601101488628772976033327901L
00137 
00142 #define SimTK_LOG2E  1.442695040888963407359924681001892137426645954152985934135449407L
00143 
00148 #define SimTK_LOG10E 4.342944819032518276511289189166050822943970058036665661144537832e-1L
00149 
00154 #define SimTK_SQRT2  1.414213562373095048801688724209698078569671875376948073176679738L
00155 
00160 #define SimTK_SQRT3  1.732050807568877293527446341505872366942805253810380628055806979L
00161 
00166 #define SimTK_CBRT2  1.259921049894873164767210607278228350570251464701507980081975112L
00167 
00172 #define SimTK_CBRT3  1.442249570307408382321638310780109588391869253499350577546416195L
00173 
00176     /**********************/
00177     /* PHYSICAL CONSTANTS */
00178     /**********************/
00179 
00205 
00213 #define SimTK_AVOGADROS_NUMBER 6.0221415e23L
00214 
00229 #define SimTK_MASS_OF_PROTON_IN_MD 1.00727646688L
00230 
00237 #define SimTK_MASS_OF_NEUTRON_IN_MD 1.00866491560L
00238 
00245 #define SimTK_MASS_OF_ELECTRON_IN_MD 5.4857990945e-4L
00246 
00253 #define SimTK_CHARGE_OF_PROTON_IN_SI 1.60217653e-19L
00254 
00261 #define SimTK_CHARGE_OF_PROTON_IN_MD 1.L
00262 
00271 #define SimTK_MOLAR_CHARGE_IN_SI 9.6485338e+4L
00272 
00279 #define SimTK_MOLAR_CHARGE_IN_MD SimTK_AVOGADROS_NUMBER
00280 
00287 #define SimTK_LIGHTSPEED_IN_SI 2.99792458e+8L
00288 
00295 #define SimTK_LIGHTSPEED_IN_MD 2.99792458e+5L
00296 
00306 #define SimTK_GRAVITATIONAL_CONSTANT_IN_SI 6.6742e-11L   
00307 
00320 #define SimTK_GRAVITATIONAL_CONSTANT_IN_MD 1.10827e-34L
00321 
00331 #define SimTK_MAGNETIC_PERMEABILITY_IN_SI  \
00332     1.256637061435917295385057353311801153678867759750042328389977837e-6L
00333 
00344 #define SimTK_MAGNETIC_PERMEABILITY_IN_MD   1.94259179e-8L
00345 
00352 #define SimTK_ELECTRIC_PERMITTIVITY_IN_SI  \
00353     8.854187817620389850536563031710750260608370166599449808102417149e-12L  /* approx of exact */
00354 
00362 #define SimTK_ELECTRIC_PERMITTIVITY_IN_MD 5.7276575e-4L
00363 
00370 #define SimTK_COULOMB_CONSTANT_IN_SI 8.9875517873681764e+9L
00371 
00383 #define SimTK_COULOMB_CONSTANT_IN_MD 1.38935456e+2L
00384 
00392 #define SimTK_COULOMB_CONSTANT_IN_KCAL_ANGSTROM 3.32063711e+2L
00393 
00399 #define SimTK_MOLAR_GAS_CONSTANT_SI 8.314472L
00400 
00408 #define SimTK_MOLAR_GAS_CONSTANT_MD 8.314472e-3L
00409 
00417 #define SimTK_MOLAR_GAS_CONSTANT_KCAL_ANGSTROM 1.9872065e-3L
00418 
00424 #define SimTK_BOLTZMANN_CONSTANT_SI  1.3806505e-23L
00425 
00430 #define SimTK_BOLTZMANN_CONSTANT_MD  SimTK_MOLAR_GAS_CONSTANT_MD
00431 
00436 #define SimTK_BOLTZMANN_CONSTANT_KCAL_ANGSTROM SimTK_MOLAR_GAS_CONSTANT_KCAL_ANGSTROM
00437 
00440     /***************************/
00441     /* UNIT CONVERSION FACTORS */
00442     /***************************/
00443 
00453 
00461 #define SimTK_RADIAN_TO_DEGREE 5.729577951308232087679815481410517033240547246656432154916024386e+1L
00462 
00469 #define SimTK_DEGREE_TO_RADIAN 1.745329251994329576923690768488612713442871888541725456097191440e-2L
00470 
00477 #define SimTK_KCAL_TO_KJOULE 4.184L /* exact */
00478 
00485 #define SimTK_KJOULE_TO_KCAL 2.390057361376673040152963671128107074569789674952198852772466539e-1L
00486 
00493 #define SimTK_DALTON_TO_GRAM     1.66053886e-24L
00494 
00502 #define SimTK_E_TO_COULOMB       SimTK_CHARGE_OF_PROTON_IN_SI
00503 
00511 #define SimTK_EV_TO_JOULE        SimTK_CHARGE_OF_PROTON_IN_SI
00512 
00515 #endif /* SimTK_SimTKCOMMON_CONSTANTS_H_ */

Generated on Thu Feb 28 01:34:28 2008 for SimTKcommon by  doxygen 1.4.7