Tagged files with gromacs 3.0 header and added some license info
[alexxy/gromacs.git] / include / physics.h
1 /*
2  * $Id$
3  * 
4  *                This source code is part of
5  * 
6  *                 G   R   O   M   A   C   S
7  * 
8  *          GROningen MAchine for Chemical Simulations
9  * 
10  *                        VERSION 3.0
11  * 
12  * Copyright (c) 1991-2001
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  * 
21  * If you want to redistribute modifications, please consider that
22  * scientific software is very special. Version control is crucial -
23  * bugs must be traceable. We will be happy to consider code for
24  * inclusion in the official distribution, but derived work must not
25  * be called official GROMACS. Details are found in the README & COPYING
26  * files - if they are missing, get the official version at www.gromacs.org.
27  * 
28  * To help us fund GROMACS development, we humbly ask that you cite
29  * the papers on the package - you can find them in the top README file.
30  * 
31  * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
32  * 
33  * And Hey:
34  * Giving Russians Opium May Alter Current Situation
35  */
36
37 #ifndef _physics_h
38 #define _physics_h
39
40 static char *SRCID_physics_h = "$Id$";
41 #ifdef HAVE_CONFIG_H
42 #include <config.h>
43 #endif
44
45 #ifdef HAVE_IDENT
46 #ident  "@(#) physics.h 1.6 11/23/92"
47 #endif /* HAVE_IDENT */
48
49 /*
50  * Physical constants to be used in Gromacs.
51  * No constants (apart from 0, 1 or 2) should
52  * be anywhere else in the code.
53  */
54
55 #include <math.h>
56
57 #ifndef M_PI
58 #ifdef _PI
59 #define M_PI _PI
60 #else
61 #define M_PI        3.14159265358979323846
62 #endif
63 #endif
64
65 #define ANGSTROM         (1e-10)                /* Old...       */
66 #define KILO             (1e3)                  /* Thousand     */
67 #define NANO             (1e-9)                 /* A Number     */
68 #define PICO             (1e-12)                /* A Number     */
69 #define A2NM             (ANGSTROM/NANO)        /* NANO         */
70 #define NM2A             (NANO/ANGSTROM)        /* 10.0         */
71 #define RAD2DEG          (180.0/M_PI)           /* Conversion   */
72 #define DEG2RAD          (M_PI/180.0)           /* id           */
73 #define CAL2JOULE        (4.184)                /* id           */
74 #define E_CHARGE         (1.60217733e-19)       /* Coulomb      */
75
76 #define AMU              (1.6605402e-27)        /* kg           */
77 #define BOLTZMANN        (1.380658e-23)         /* (J/K)        */
78 #define AVOGADRO         (6.0221367e23)         /* ()           */
79 #define RGAS             (BOLTZMANN*AVOGADRO)   /* (J/(mol K))  */
80 #define BOLTZ            (RGAS/KILO)            /* (kJ/(mol K)) */
81 #define FARADAY          (E_CHARGE*AVOGADRO)    /* (C/mol)      */
82 #define ELECTRONVOLT     (E_CHARGE*AVOGADRO/KILO) /* (kJ/mol)   */     
83
84 #define EPSILON0         (5.72765E-4)           /* (e^2 Na/(kJ nm))     
85                                                    == (e^2/(kJ mol nm)) */
86                                                 
87 #define SPEED_OF_LIGHT   (2.9979245800E05)      /* nm/ps                */
88 #define ATOMICMASS_keV   (940000.0)             /* Atomic mass in keV   */
89 #define ELECTRONMASS_keV (512.0)                /* Electron mas in keV  */
90
91 #define FACEL             332.0636*CAL2JOULE    /* (sqrt(ONE_4PI_EPS0)) */
92 #define ONE_4PI_EPS0      FACEL*0.1
93 #define PRESFAC           (16.6054)             /* bar / pressure unity */
94 #define ENM2DEBYE         48.0321               /* Convert electron nm  *
95                                                  * to debye             */
96 #define DEBYE2ENM         0.02081941
97 /* to convert from a acceleration in (e V)/(amu nm) */
98 /* FIELDFAC is also Faraday's constant and E_CHARGE/(1e6 AMU) */
99 #define FIELDFAC          (FARADAY/KILO)
100
101 #endif  /* _physics_h */
102
103