Code beautification with uncrustify
[alexxy/gromacs.git] / src / gromacs / legacyheaders / physics.h
index e707f0af20d3953fdf1af3d6436666720ea714a5..c77dd5c70408f20d872a2edaaa9d532e63b73410 100644 (file)
@@ -1,11 +1,11 @@
 /*
- * 
+ *
  *                This source code is part of
- * 
+ *
  *                 G   R   O   M   A   C   S
- * 
+ *
  *          GROningen MAchine for Chemical Simulations
- * 
+ *
  *                        VERSION 3.2.0
  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * If you want to redistribute modifications, please consider that
  * scientific software is very special. Version control is crucial -
  * bugs must be traceable. We will be happy to consider code for
  * inclusion in the official distribution, but derived work must not
  * be called official GROMACS. Details are found in the README & COPYING
  * files - if they are missing, get the official version at www.gromacs.org.
- * 
+ *
  * To help us fund GROMACS development, we humbly ask that you cite
  * the papers on the package - you can find them in the top README file.
- * 
+ *
  * For more info, check our website at http://www.gromacs.org
- * 
+ *
  * And Hey:
  * Gromacs Runs On Most of All Computer Systems
  */
@@ -57,40 +57,40 @@ extern "C" {
 #endif
 #endif
 
-#define ANGSTROM        (1e-10)                /* Old...       */
-#define KILO            (1e3)                  /* Thousand     */
-#define NANO            (1e-9)                 /* A Number     */
-#define PICO            (1e-12)                /* A Number     */
-#define A2NM            (ANGSTROM/NANO)        /* NANO         */
-#define NM2A            (NANO/ANGSTROM)        /* 10.0         */
-#define RAD2DEG                 (180.0/M_PI)           /* Conversion   */
-#define DEG2RAD                 (M_PI/180.0)           /* id           */
-#define CAL2JOULE       (4.184)                /* id           */
-#define E_CHARGE         (1.60217733e-19)      /* Coulomb      */
-
-#define AMU              (1.6605402e-27)        /* kg           */
-#define BOLTZMANN       (1.380658e-23)         /* (J/K)        */
-#define AVOGADRO        (6.0221367e23)         /* ()           */
-#define RGAS             (BOLTZMANN*AVOGADRO)   /* (J/(mol K))  */
-#define BOLTZ            (RGAS/KILO)            /* (kJ/(mol K)) */
-#define FARADAY          (E_CHARGE*AVOGADRO)    /* (C/mol)      */
-#define ELECTRONVOLT     (E_CHARGE*AVOGADRO/KILO) /* (kJ/mol)   */     
-#define PLANCK1          (6.6262e-34)           /* J s */
+#define ANGSTROM     (1e-10)                               /* Old...   */
+#define KILO         (1e3)                                 /* Thousand */
+#define NANO         (1e-9)                                /* A Number */
+#define PICO         (1e-12)                               /* A Number */
+#define A2NM         (ANGSTROM/NANO)                       /* NANO             */
+#define NM2A         (NANO/ANGSTROM)                       /* 10.0             */
+#define RAD2DEG      (180.0/M_PI)                          /* Conversion       */
+#define DEG2RAD      (M_PI/180.0)                          /* id               */
+#define CAL2JOULE    (4.184)                               /* id               */
+#define E_CHARGE         (1.60217733e-19)                  /* Coulomb  */
+
+#define AMU              (1.6605402e-27)                   /* kg           */
+#define BOLTZMANN    (1.380658e-23)                        /* (J/K)    */
+#define AVOGADRO     (6.0221367e23)                        /* ()               */
+#define RGAS             (BOLTZMANN*AVOGADRO)              /* (J/(mol K))  */
+#define BOLTZ            (RGAS/KILO)                       /* (kJ/(mol K)) */
+#define FARADAY          (E_CHARGE*AVOGADRO)               /* (C/mol)      */
+#define ELECTRONVOLT     (E_CHARGE*AVOGADRO/KILO)          /* (kJ/mol)   */
+#define PLANCK1          (6.6262e-34)                      /* J s */
 #define PLANCK           (6.6262e-34*AVOGADRO/(PICO*KILO)) /* (kJ/mol) ps */
 
-#define EPSILON0        (5.72765E-4)           /* (e^2 / Na (kJ nm))     
-                                                  == (e^2 mol/(kJ nm)) */
-                                                
-#define SPEED_OF_LIGHT   (2.9979245800E05)      /* nm/ps                */
-#define ATOMICMASS_keV   (940000.0)             /* Atomic mass in keV   */
-#define ELECTRONMASS_keV (512.0)                /* Electron mas in keV  */
+#define EPSILON0     (5.72765E-4)                          /* (e^2 / Na (kJ nm))
+                                                              == (e^2 mol/(kJ nm)) */
+
+#define SPEED_OF_LIGHT   (2.9979245800E05)                 /* nm/ps                */
+#define ATOMICMASS_keV   (940000.0)                        /* Atomic mass in keV   */
+#define ELECTRONMASS_keV (512.0)                           /* Electron mas in keV  */
 
 /* Improved accuracy (PL & EL, 20090421) */
-#define FACEL           (332.0636930*CAL2JOULE)/* (10 * (ONE_4PI_EPS0)) */
-#define ONE_4PI_EPS0    (FACEL*0.1)            /* 1/(4*pi*e0)*/
-#define PRESFAC           (16.6054)             /* bar / pressure unity */
-#define ENM2DEBYE         48.0321               /* Convert electron nm  *
-                                                * to debye             */
+#define FACEL        (332.0636930*CAL2JOULE) /* (10 * (ONE_4PI_EPS0)) */
+#define ONE_4PI_EPS0     (FACEL*0.1)         /* 1/(4*pi*e0)*/
+#define PRESFAC           (16.6054)          /* bar / pressure unity */
+#define ENM2DEBYE         48.0321            /* Convert electron nm  *
+                                              * to debye             */
 #define DEBYE2ENM         0.02081941
 /* to convert from a acceleration in (e V)/(amu nm) */
 /* FIELDFAC is also Faraday's constant and E_CHARGE/(1e6 AMU) */
@@ -136,32 +136,32 @@ extern "C" {
 #define unit_density_SI unit_mass_SI "/" unit_length_SI "^3"
 #define unit_invvisc_SI unit_length_SI " " unit_time_SI "/" unit_mass_SI
 
-  /* The routines below can be used for converting units from or to GROMACS
-     internal units. */
-  enum { eg2cAngstrom, eg2cNm, eg2cBohr, eg2cKcal_Mole, 
-        eg2cHartree, eg2cHartree_e, eg2cAngstrom3, eg2cCoulomb,
-        eg2cDebye, eg2cElectron, eg2cBuckingham, eg2cNR };
-  
-  /* Convert value x to GROMACS units. Energy -> Energy, Length -> Length etc. 
-     The type of x is deduced from unit, 
-     which should be taken from the enum above. */
-  extern double convert2gmx(double x,int unit);
-  
-  /* Convert value x from GROMACS units to the desired one. 
-     The type of return value is deduced from unit, see above */
-  extern double gmx2convert(double x,int unit);
-
-  /* Convert the string to one of the units supported. Returns -1 if not found. */
-  extern int string2unit(char *string);
-  
-  /* Convert the unit to a string. Return NULL when unit is out of range. */
-  extern const char *unit2string(int unit);
+/* The routines below can be used for converting units from or to GROMACS
+   internal units. */
+enum {
+    eg2cAngstrom, eg2cNm, eg2cBohr, eg2cKcal_Mole,
+    eg2cHartree, eg2cHartree_e, eg2cAngstrom3, eg2cCoulomb,
+    eg2cDebye, eg2cElectron, eg2cBuckingham, eg2cNR
+};
+
+/* Convert value x to GROMACS units. Energy -> Energy, Length -> Length etc.
+   The type of x is deduced from unit,
+   which should be taken from the enum above. */
+extern double convert2gmx(double x, int unit);
+
+/* Convert value x from GROMACS units to the desired one.
+   The type of return value is deduced from unit, see above */
+extern double gmx2convert(double x, int unit);
+
+/* Convert the string to one of the units supported. Returns -1 if not found. */
+extern int string2unit(char *string);
+
+/* Convert the unit to a string. Return NULL when unit is out of range. */
+extern const char *unit2string(int unit);
 
 #ifdef __cplusplus
 }
 #endif
 
 
-#endif /* _physics_h */
-
-
+#endif  /* _physics_h */