3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
33 * GRoups of Organic Molecules in ACtion for Science
55 #define XX 0 /* Defines for indexing in */
56 #define YY 1 /* vectors */
58 #define DIM 3 /* Dimension of vectors */
59 #define XXXX 0 /* defines to index matrices */
70 /* typedef int bool; */
74 typedef int atom_id
; /* To indicate an atoms id */
75 #define NO_ATID (atom_id)(~0) /* Use this to indicate invalid atid */
77 /*! \brief Double precision accuracy */
78 #define GMX_DOUBLE_EPS 1.11022302E-16
80 /*! \brief Maximum double precision value - reduced 1 unit in last digit for MSVC */
81 #define GMX_DOUBLE_MAX 1.79769312E+308
83 /*! \brief Minimum double precision value */
84 #define GMX_DOUBLE_MIN 2.22507386E-308
86 /*! \brief Single precision accuracy */
87 #define GMX_FLOAT_EPS 5.96046448E-08
89 /*! \brief Maximum single precision value - reduced 1 unit in last digit for MSVC */
90 #define GMX_FLOAT_MAX 3.40282346E+38
92 /*! \brief Minimum single precision value */
93 #define GMX_FLOAT_MIN 1.17549435E-38
96 /* Check whether we already have a real type! */
102 #define GMX_MPI_REAL MPI_DOUBLE
103 #define GMX_REAL_EPS GMX_DOUBLE_EPS
104 #define GMX_REAL_MIN GMX_DOUBLE_MIN
105 #define GMX_REAL_MAX GMX_DOUBLE_MAX
111 #define GMX_MPI_REAL MPI_FLOAT
112 #define GMX_REAL_EPS GMX_FLOAT_EPS
113 #define GMX_REAL_MIN GMX_FLOAT_MIN
114 #define GMX_REAL_MAX GMX_FLOAT_MAX
117 #ifndef VECTORIZATION_BUFLENGTH
118 #define VECTORIZATION_BUFLENGTH 1000
119 /* The total memory size of the vectorization buffers will
120 * be 5*sizeof(real)*VECTORIZATION_BUFLENGTH
123 typedef real rvec
[DIM
];
125 typedef double dvec
[DIM
];
127 typedef real matrix
[DIM
][DIM
];
129 typedef real tensor
[DIM
][DIM
];
131 typedef int ivec
[DIM
];
133 typedef int imatrix
[DIM
][DIM
];
135 /* For the step count type gmx_large_int_t we aim for 8 bytes (64bit),
136 * but we might only be able to get 4 bytes (32bit).
138 #if (!(defined SIZEOF_LONG_LONG_INT) || SIZEOF_LONG_INT == 8)
139 typedef long int gmx_large_int_t
;
140 #define gmx_large_int_fmt "ld"
141 #define gmx_large_int_pfmt "%ld"
142 #define SIZEOF_LARGE_INT SIZEOF_LONG_INT
143 #define LARGE_INT_MAX LONG_MAX
145 typedef long long int gmx_large_int_t
;
146 #define gmx_large_int_fmt "lld"
147 #define gmx_large_int_pfmt "%lld"
148 #define SIZEOF_LARGE_INT SIZEOF_LONG_LONG_INT
149 #define LARGE_INT_MAX LLONG_MAX