-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.c
277 lines (250 loc) · 7.45 KB
/
config.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
/*
Copyright (C) 2010 The ESPResSo project
Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010 Max-Planck-Institute for Polymer Research, Theory Group, PO Box 3148, 55021 Mainz, Germany
This file is part of ESPResSo.
ESPResSo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ESPResSo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file config.c
*
* contains \ref code_info and version stuff.
*/
#include <tcl.h>
#include "utils.h"
#ifdef BOND_CONSTRAINT
#ifdef ROTATION
#error BOND_CONSTRAINT and ROTATION currently do not work together
#endif
#endif
#ifdef ADRESS
#ifdef ROTATION
#error ADRESS and ROTATION currently do not work together
#endif
#endif
/* errors for all modules that require fftw if not present */
#ifndef FFTW
#ifdef MODES
#error MODES requires the fftw
#endif
#ifdef LB
#error LB requires the fftw
#endif
#endif
#ifdef DAWAANR
#ifndef MAGNETOSTATICS
#error DAWAANR needs MAGNETOSTATICS in order to work
#endif
#endif
#ifdef MAGNETIC_DIPOLAR_DIRECT_SUM
#ifndef MAGNETOSTATICS
#error MAGNETIC DIRECT SUM needs MAGNETOSTATICS in order to work
#endif
#endif
#ifdef MDLC
#ifndef MAGNETOSTATICS
#error MDLC needs MAGNETOSTATICS
#endif
#if !(defined(MAGNETIC_DIPOLAR_DIRECT_SUM) || defined( ELP3M) )
#error MDLC needs either direct sum or P3M to be active
#endif
#ifndef DIPOLES
#error MDLC has no sense without the magnetic dipoles
#endif
#endif
int version_callback(Tcl_Interp *interp)
{
Tcl_AppendResult(interp, PACKAGE_NAME ": " PACKAGE_VERSION ", Last Change: " LAST_CHANGE, (char *) NULL);
return (TCL_OK);
}
/** callback for compilation status. */
int compilation_callback(Tcl_Interp *interp)
{
Tcl_AppendResult(interp, "{ Compilation status ", (char *) NULL);
#ifdef DEBUG
Tcl_AppendResult(interp, "{ " DEBUG " } ", (char *) NULL);
#endif
#ifdef PROFILING
Tcl_AppendResult(interp, "{ " PROFILING " } ", (char *) NULL);
#endif
Tcl_AppendResult(interp, "{ MPI " MPI " } ", (char *) NULL);
#if FFTW == 2
Tcl_AppendResult(interp, "{ FFTW2 } ", (char *) NULL);
#elif FFTW == 3
Tcl_AppendResult(interp, "{ FFTW3 } ", (char *) NULL);
#endif
#ifdef TK
Tcl_AppendResult(interp, "{ TK } ", (char *) NULL);
#endif
#ifdef MODES
Tcl_AppendResult(interp, "{ MODES } ", (char *) NULL);
#endif
#ifdef PARTIAL_PERIODIC
Tcl_AppendResult(interp, "{ PARTIAL_PERIODIC } ", (char *) NULL);
#endif
#ifdef LJ_WARN_WHEN_CLOSE
Tcl_AppendResult(interp, "{ LJ_WARN_WHEN_CLOSE } ", (char *) NULL);
#endif
#ifdef ELECTROSTATICS
Tcl_AppendResult(interp, "{ ELECTROSTATICS } ", (char *) NULL);
#endif
#ifdef MAGNETOSTATICS
Tcl_AppendResult(interp, "{ MAGNETOSTATICS } ", (char *) NULL);
#endif
#ifdef ROTATION
Tcl_AppendResult(interp, "{ ROTATION } ", (char *) NULL);
#endif
#ifdef DIPOLES
Tcl_AppendResult(interp, "{ DIPOLES } ", (char *) NULL);
#endif
#ifdef MASS
Tcl_AppendResult(interp, "{ MASS } ", (char *) NULL);
#endif
#ifdef EXTERNAL_FORCES
Tcl_AppendResult(interp, "{ EXTERNAL_FORCES } ", (char *) NULL);
#endif
#ifdef CONSTRAINTS
Tcl_AppendResult(interp, "{ CONSTRAINTS } ", (char *) NULL);
#endif
#ifdef BOND_CONSTRAINT
Tcl_AppendResult(interp, "{ BOND_CONSTRAINT } ", (char *) NULL);
#endif
#ifdef BOND_VIRTUAL
Tcl_AppendResult(interp, "{ BOND_VIRTUAL } ", (char *) NULL);
#endif
#ifdef EXCLUSIONS
Tcl_AppendResult(interp, "{ EXCLUSIONS } ", (char *) NULL);
#endif
#ifdef COMFORCE
Tcl_AppendResult(interp, "{ COMFORCE } ", (char *) NULL);
#endif
#ifdef COMFIXED
Tcl_AppendResult(interp, "{ COMFIXED } ", (char *) NULL);
#endif
#ifdef TABULATED
Tcl_AppendResult(interp, "{ TABULATED } ", (char *) NULL);
#endif
#ifdef OVERLAPPED
Tcl_AppendResult(interp, "{ OVERLAPPED } ", (char *) NULL);
#endif
#ifdef LENNARD_JONES
Tcl_AppendResult(interp, "{ LENNARD_JONES } ", (char *) NULL);
#endif
#ifdef LENNARD_JONES_GENERIC
Tcl_AppendResult(interp, "{ LENNARD_JONES_GENERIC } ", (char *) NULL);
#endif
#ifdef GAY_BERNE
Tcl_AppendResult(interp, "{ GAY_BERNE } ", (char *) NULL);
#endif
#ifdef LJ_ANGLE
Tcl_AppendResult(interp, "{ LJ_ANGLE } ", (char *) NULL);
#endif
#ifdef SMOOTH_STEP
Tcl_AppendResult(interp, "{ SMOOTH_STEP } ", (char *) NULL);
#endif
#ifdef HERTZIAN
Tcl_AppendResult(interp, "{ HERTZIAN } ", (char *) NULL);
#endif
#ifdef BMHTF_NACL
Tcl_AppendResult(interp, "{ BMHTF_NACL } ", (char *) NULL);
#endif
#ifdef MORSE
Tcl_AppendResult(interp, "{ MORSE } ", (char *) NULL);
#endif
#ifdef BUCKINGHAM
Tcl_AppendResult(interp, "{ BUCKINGHAM } ", (char *) NULL);
#endif
#ifdef SOFT_SPHERE
Tcl_AppendResult(interp, "{ SOFT_SPHERE } ", (char *) NULL);
#endif
#ifdef LJCOS
Tcl_AppendResult(interp, "{ LJCOS } ", (char *) NULL);
#endif
#ifdef LJCOS2
Tcl_AppendResult(interp, "{ LJCOS2 } ", (char *) NULL);
#endif
#ifdef BOND_ANGLE_HARMONIC
Tcl_AppendResult(interp, "{ BOND_ANGLE_HARMONIC } ", (char *) NULL);
#endif
#ifdef BOND_ANGLE_COSINE
Tcl_AppendResult(interp, "{ BOND_ANGLE_COSINE } ", (char *) NULL);
#endif
#ifdef BOND_ANGLE_COSSQUARE
Tcl_AppendResult(interp, "{ BOND_ANGLE_COSSQUARE } ", (char *) NULL);
#endif
#ifdef BOND_ANGLEDIST_HARMONIC
Tcl_AppendResult(interp, "{ BOND_ANGLEDIST_HARMONIC } ", (char *) NULL);
#endif
#ifdef BOND_ENDANGLEDIST_HARMONIC
Tcl_AppendResult(interp, "{ BOND_ENDANGLEDIST_HARMONIC } ", (char *) NULL);
#endif
#ifdef NEMD
Tcl_AppendResult(interp, "{ NEMD } ", (char *) NULL);
#endif
#ifdef NPT
Tcl_AppendResult(interp, "{ NPT } ", (char *) NULL);
#endif
#ifdef TRANS_DPD
Tcl_AppendResult(interp, "{ TRANS_DPD } ", (char *) NULL);
#endif
#ifdef DPD
Tcl_AppendResult(interp, "{ DPD } ", (char *) NULL);
#endif
#ifdef DPD_MASS_RED
Tcl_AppendResult(interp, "{ DPD_MASS_RED } ", (char *) NULL);
#endif
#ifdef DPD_MASS_LIN
Tcl_AppendResult(interp, "{ DPD_MASS_LIN } ", (char *) NULL);
#endif
#ifdef LB
Tcl_AppendResult(interp, "{ LB } ", (char *) NULL);
#endif
#ifdef INTER_DPD
Tcl_AppendResult(interp, "{ INTER_DPD } ", (char *) NULL);
#endif
#ifdef INTER_RF
Tcl_AppendResult(interp, "{ INTER_RF } ", (char *) NULL);
#endif
#ifdef NO_INTRA_NB
Tcl_AppendResult(interp, "{ NO_INTRA_NB } ", (char *) NULL);
#endif
#ifdef VIRTUAL_SITES
Tcl_AppendResult(interp, "{ VIRTUAL_SITES } ", (char *) NULL);
#endif
#ifdef METADYNAMICS
Tcl_AppendResult(interp, "{ METADYNAMICS } ", (char *) NULL);
#endif
#ifdef MOL_CUT
Tcl_AppendResult(interp, "{ MOL_CUT } ", (char *) NULL);
#endif
#ifdef TUNABLE_SLIP
Tcl_AppendResult(interp, "{ TUNABLE_SLIP } ", (char *) NULL);
#endif
#ifdef ADRESS
Tcl_AppendResult(interp, "{ ADRESS } ", (char *) NULL);
#ifdef ADRESS_INIT
Tcl_AppendResult(interp, "{ ADRESS_INIT } ", (char *) NULL);
#endif
#ifdef INTERFACE_CORRECTION
Tcl_AppendResult(interp, "{ INTERFACE_CORRECTION } ", (char *) NULL);
#endif
#endif
#ifdef MDLC
Tcl_AppendResult(interp, "{ MDLC } ", (char *) NULL);
#endif
#ifdef DAWAANR
Tcl_AppendResult(interp, "{ DAWAANR } ", (char *) NULL);
#endif
#ifdef MAGNETIC_DIPOLAR_DIRECT_SUM
Tcl_AppendResult(interp, "{ MAGNETIC_DIPOLAR_DIRECT_SUM } ", (char *) NULL);
#endif
Tcl_AppendResult(interp, "}", (char *) NULL);
return (TCL_OK);
}