KIM API V2
ex_model_Ar_P_Morse_07C.c
Go to the documentation of this file.
1 /* */
2 /* CDDL HEADER START */
3 /* */
4 /* The contents of this file are subject to the terms of the Common */
5 /* Development and Distribution License Version 1.0 (the "License"). */
6 /* */
7 /* You can obtain a copy of the license at */
8 /* http://www.opensource.org/licenses/CDDL-1.0. See the License for the */
9 /* specific language governing permissions and limitations under the License. */
10 /* */
11 /* When distributing Covered Code, include this CDDL HEADER in each file and */
12 /* include the License file in a prominent location with the name */
13 /* LICENSE.CDDL. If applicable, add the following below this CDDL HEADER, */
14 /* with the fields enclosed by brackets "[]" replaced with your own */
15 /* identifying information: */
16 /* */
17 /* Portions Copyright (c) [yyyy] [name of copyright owner]. */
18 /* All rights reserved. */
19 /* */
20 /* CDDL HEADER END */
21 /* */
22 
23 /* */
24 /* Copyright (c) 2013--2018, Regents of the University of Minnesota. */
25 /* All rights reserved. */
26 /* */
27 /* Contributors: */
28 /* Ryan S. Elliott */
29 /* Ellad B. Tadmor */
30 /* Stephen M. Whalen */
31 /* */
32 
33 /******************************************************************************/
34 /* */
35 /* ex_model_Ar_P_Morse_07C pair potential KIM Model */
36 /* shifted to have zero energy at the cutoff radius */
37 /* */
38 /* Language: C */
39 /* */
40 /******************************************************************************/
41 
42 
43 #include <stdlib.h>
44 #include <stdio.h>
45 #include <string.h>
46 #include <math.h>
47 #include "KIM_ModelHeaders.h"
48 
49 #define TRUE 1
50 #define FALSE 0
51 
52 /******************************************************************************/
53 /* Below are the definitions and values of all Model parameters */
54 /******************************************************************************/
55 #define DIM 3 /* dimensionality of space */
56 #define SPECCODE 1 /* internal species code */
57 #define CUTOFF 8.15 /* Angstroms */
58 #define EPSILON -0.0134783698072604 /* eV */
59 #define PARAM_C 1.545 /* 1/Angstroms */
60 #define RZERO 3.786 /* Angstroms */
61 
62 /* Model buffer definition */
63 struct buffer
64 {
65  double influenceDistance;
66  double cutoff;
68  int halfListHint;
69 };
70 typedef struct buffer buffer;
71 
72 /* Define prototype for Model create */
73 int model_create(KIM_ModelCreate * const modelCreate,
74  KIM_LengthUnit const requestedLengthUnit,
75  KIM_EnergyUnit const requestedEnergyUnit,
76  KIM_ChargeUnit const requestedChargeUnit,
77  KIM_TemperatureUnit const requestedTemperatureUnit,
78  KIM_TimeUnit const requestedTimeUnit);
79 
80 /* Define prototype for other routines */
81 static int compute(void* km);
82 static int compute_arguments_create(
83  KIM_ModelCompute const * const modelCompute,
84  KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate);
85 static int compute_arguments_destroy(
86  KIM_ModelCompute const * const modelCompute,
87  KIM_ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
88 static int model_refresh(KIM_ModelRefresh * const modelRefresh);
89 static int model_destroy(KIM_ModelDestroy * const modelDestroy);
90 
91 /* Define prototypes for pair potential calculations */
92 static void calc_phi(double* epsilon,
93  double* C,
94  double* Rzero,
95  double* shift,
96  double* cutoff, double r, double* phi);
97 
98 static void calc_phi_dphi(double* epsilon,
99  double* C,
100  double* Rzero,
101  double* shift,
102  double* cutoff, double r, double* phi, double* dphi);
103 
104 static void calc_phi_d2phi(double* epsilon,
105  double* C,
106  double* Rzero,
107  double* shift,
108  double* cutoff, double r, double* phi, double* dphi,
109  double* d2phi);
110 
111 /* Calculate pair potential phi(r) */
112 static void calc_phi(double* epsilon,
113  double* C,
114  double* Rzero,
115  double* shift,
116  double* cutoff, double r, double* phi) {
117  /* local variables */
118  double ep;
119  double ep2;
120 
121  ep = exp(-(*C)*(r-*Rzero));
122  ep2 = ep*ep;
123 
124  if (r > *cutoff) {
125  /* Argument exceeds cutoff radius */
126  *phi = 0.0; }
127  else {
128  *phi = (*epsilon)*( -ep2 + 2.0*ep ) + *shift; }
129 
130  return; }
131 
132 /* Calculate pair potential phi(r) and its derivative dphi(r) */
133 static void calc_phi_dphi(double* epsilon,
134  double* C,
135  double* Rzero,
136  double* shift,
137  double* cutoff, double r, double* phi, double* dphi) {
138  /* local variables */
139  double ep;
140  double ep2;
141 
142  ep = exp(-(*C)*(r-*Rzero));
143  ep2 = ep*ep;
144 
145  if (r > *cutoff) {
146  /* Argument exceeds cutoff radius */
147  *phi = 0.0;
148  *dphi = 0.0; }
149  else {
150  *phi = (*epsilon)*( -ep2 + 2.0*ep ) + *shift;
151  *dphi = 2.0*(*epsilon)*(*C)*( -ep + ep2 ); }
152 
153  return; }
154 
155 /* Calculate pair potential phi(r) and its 1st & 2nd derivatives dphi(r), */
156 /* d2phi(r) */
157 static void calc_phi_d2phi(double* epsilon,
158  double* C,
159  double* Rzero,
160  double* shift,
161  double* cutoff, double r, double* phi, double* dphi,
162  double* d2phi) {
163  /* local variables */
164  double ep;
165  double ep2;
166 
167  ep = exp(-(*C)*(r-*Rzero));
168  ep2 = ep*ep;
169 
170  if (r > *cutoff) {
171  /* Argument exceeds cutoff radius */
172  *phi = 0.0;
173  *dphi = 0.0;
174  *d2phi = 0.0; }
175  else {
176  *phi = (*epsilon)*( -ep2 + 2.0*ep ) + *shift;
177  *dphi = 2.0*(*epsilon)*(*C)*( -ep + ep2 );
178  *d2phi = 2.0*(*epsilon)*(*C)*(*C)*(ep - 2.0*ep2); }
179 
180  return; }
181 
183 //static int compute(void* km) {
184 // /* local variables */
185 // intptr_t* pkim = *((intptr_t**) km);
186 // double R;
187 // double R_pairs[2];
188 // double *pR_pairs = &(R_pairs[0]);
189 // double Rsqij;
190 // double phi;
191 // double dphi;
192 // double d2phi;
193 // double dEidr;
194 // double d2Eidr;
195 // double Rij[DIM];
196 // double *pRij = &(Rij[0]);
197 // double Rij_pairs[2][3];
198 // double *pRij_pairs = &(Rij_pairs[0][0]);
199 // int ier;
200 // int i;
201 // int i_pairs[2];
202 // int *pi_pairs = &(i_pairs[0]);
203 // int j;
204 // int j_pairs[2];
205 // int *pj_pairs = &(j_pairs[0]);
206 // int jj;
207 // int k;
208 // int currentPart;
209 // int* neighListOfCurrentPart;
210 // int comp_energy;
211 // int comp_force;
212 // int comp_particleEnergy;
213 // int comp_process_dEdr;
214 // int comp_process_d2Edr2;
215 // int one = 1;
216 // int request;
217 //
218 // int* nParts;
219 // int* particleSpecies;
220 // double* cutoff;
221 // double cutsq;
222 // double epsilon;
223 // double C;
224 // double Rzero;
225 // double shift;
226 // double* Rij_list;
227 // double* coords;
228 // double* energy;
229 // double* force;
230 // double* particleEnergy;
231 // int numOfPartNeigh;
232 // double dummy;
233 //
234 // /* check to see if we have been asked to compute the forces, */
235 // /* particleEnergy, and d1Edr */
236 // KIM_API_getm_compute(pkim, &ier, 5*3,
237 // "energy", &comp_energy, 1,
238 // "forces", &comp_force, 1,
239 // "particleEnergy", &comp_particleEnergy, 1,
240 // "process_dEdr", &comp_process_dEdr, 1,
241 // "process_d2Edr2", &comp_process_d2Edr2, 1
242 // );
243 // if (KIM_STATUS_OK > ier) {
244 // KIM_API_report_error(__LINE__, __FILE__, "KIM_API_getm_compute", ier);
245 // return ier; }
246 //
247 // KIM_API_getm_data(
248 // pkim, &ier, 7*3,
249 // "cutoff", &cutoff, 1,
250 // "numberOfParticles", &nParts, 1,
251 // "particleSpecies", &particleSpecies,1,
252 // "coordinates", &coords, 1,
253 // "energy", &energy, comp_energy,
254 // "forces", &force, comp_force,
255 // "particleEnergy", &particleEnergy, comp_particleEnergy
256 // );
257 // if (KIM_STATUS_OK > ier) {
258 // KIM_API_report_error(__LINE__, __FILE__, "KIM_API_getm_data", ier);
259 // return ier; }
260 //
261 // /* set value of parameters */
262 // cutsq = (*cutoff)*(*cutoff);
263 // epsilon = EPSILON;
264 // C = PARAM_C;
265 // Rzero = RZERO;
266 // /* set value of parameter shift */
267 // dummy = 0.0;
268 // /* call calc_phi with r=cutoff and shift=0.0 */
269 // calc_phi(&epsilon, &C, &Rzero, &dummy, cutoff, *cutoff, &shift);
270 // /* set shift to -shift */
271 // shift = -(shift);
272 //
273 // /* Check to be sure that the species are correct */
274 // /**/
275 // ier = KIM_STATUS_FAIL; /* assume an error */
276 // for (i = 0; i < *nParts; ++i) {
277 // if ( SPECCODE != particleSpecies[i]) {
278 // KIM_API_report_error(__LINE__, __FILE__,
279 // "Unexpected species detected", ier);
280 // return ier; } }
281 // ier = KIM_STATUS_OK; /* everything is ok */
282 //
283 // /* initialize potential energies, forces, and virial term */
284 // if (comp_particleEnergy) {
285 // for (i = 0; i < *nParts; ++i) {
286 // particleEnergy[i] = 0.0; } }
287 // if (comp_energy) {
288 // *energy = 0.0; }
289 //
290 // if (comp_force) {
291 // for (i = 0; i < *nParts; ++i) {
292 // for (k = 0; k < DIM; ++k) {
293 // force[i*DIM + k] = 0.0; } } }
294 //
295 // /* Compute energy and forces */
296 //
297 // /* loop over particles and compute enregy and forces */
298 // for (i = 0; i < *nParts; ++i) {
299 // request = i;
300 // ier = KIM_API_get_neigh(pkim, one, request, &currentPart,
301 // &numOfPartNeigh, &neighListOfCurrentPart,
302 // &Rij_list);
303 // if (KIM_STATUS_OK != ier) {
304 // /* some sort of problem, exit */
305 // KIM_API_report_error(__LINE__, __FILE__, "KIM_API_get_neigh", ier);
306 // ier = KIM_STATUS_FAIL;
307 // return ier; }
308 //
309 // /* loop over the neighbors of particle i */
310 // for (jj = 0; jj < numOfPartNeigh; ++ jj) {
311 // j = neighListOfCurrentPart[jj]; /* get neighbor ID */
312 //
313 // /* compute relative position vector and squared distance */
314 // Rsqij = 0.0;
315 // for (k = 0; k < DIM; ++k) {
316 // Rij[k] = coords[j*DIM + k] - coords[i*DIM + k];
317 //
318 // /* compute squared distance */
319 // Rsqij += Rij[k]*Rij[k]; }
320 //
321 // /* compute energy and force */
322 // if (Rsqij < cutsq) {
323 // /* particles are interacting ? */
324 // R = sqrt(Rsqij);
325 // if (comp_process_d2Edr2) {
326 // /* compute pair potential and its derivatives */
327 // calc_phi_d2phi(&epsilon,
328 // &C,
329 // &Rzero,
330 // &shift,
331 // cutoff, R, &phi, &dphi, &d2phi);
332 //
333 // /* compute dEidr */
334 // dEidr = 0.5*dphi;
335 // d2Eidr = 0.5*d2phi; }
336 // else if (comp_force || comp_process_dEdr) {
337 // /* compute pair potential and its derivative */
338 // calc_phi_dphi(&epsilon,
339 // &C,
340 // &Rzero,
341 // &shift,
342 // cutoff, R, &phi, &dphi);
343 //
344 // /* compute dEidr */
345 // dEidr = 0.5*dphi; }
346 // else {
347 // /* compute just pair potential */
348 // calc_phi(&epsilon,
349 // &C,
350 // &Rzero,
351 // &shift,
352 // cutoff, R, &phi); }
353 //
354 // /* contribution to energy */
355 // if (comp_particleEnergy) {
356 // particleEnergy[i] += 0.5*phi; }
357 // if (comp_energy) {
358 // *energy += 0.5*phi; }
359 //
360 // /* contribution to process_dEdr */
361 // if (comp_process_dEdr) {
362 // ier = KIM_API_process_dEdr(km, &dEidr, &R, &pRij, &i, &j); }
363 //
364 // /* contribution to process_d2Edr2 */
365 // if (comp_process_d2Edr2) {
366 // R_pairs[0] = R_pairs[1] = R;
367 // Rij_pairs[0][0] = Rij_pairs[1][0] = Rij[0];
368 // Rij_pairs[0][1] = Rij_pairs[1][1] = Rij[1];
369 // Rij_pairs[0][2] = Rij_pairs[1][2] = Rij[2];
370 // i_pairs[0] = i_pairs[1] = i;
371 // j_pairs[0] = j_pairs[1] = j;
372 //
373 // ier = KIM_API_process_d2Edr2(km, &d2Eidr, &pR_pairs, &pRij_pairs,
374 // &pi_pairs, &pj_pairs); }
375 //
376 // /* contribution to forces */
377 // if (comp_force) {
378 // for (k = 0; k < DIM; ++k) {
379 // force[i*DIM + k] += dEidr*Rij[k]/R; /* accumulate force on i */
380 // force[j*DIM + k] -= dEidr*Rij[k]/R; /* accumulate force on j */ } } }
381 // } /* loop on jj */
382 // } /* loop on i */
383 //
384 // /* everything is great */
385 // ier = KIM_STATUS_OK;
386 //
387 // return ier; }
388 
389 /* Create function */
391 int model_create(KIM_ModelCreate * const modelCreate,
392  KIM_LengthUnit const requestedLengthUnit,
393  KIM_EnergyUnit const requestedEnergyUnit,
394  KIM_ChargeUnit const requestedChargeUnit,
395  KIM_TemperatureUnit const requestedTemperatureUnit,
396  KIM_TimeUnit const requestedTimeUnit)
397 {
398  buffer * bufferPointer;
399  int error;
400 
401  /* set units */
402  LOG_INFORMATION("Set model units");
404  modelCreate, /* ignoring requested units */
410 
411  /* register species */
412  LOG_INFORMATION("Setting species code");
413  error = error ||
414  KIM_ModelCreate_SetSpeciesCode(modelCreate,
416 
417  /* register numbering */
418  LOG_INFORMATION("Setting model numbering");
421 
422  /* register function pointers */
423  LOG_INFORMATION("Register model function pointers");
424  error = error ||
426  modelCreate,
428  (func *) 2);
429  error = error ||
431  modelCreate,
434  error = error ||
436  modelCreate,
439  error = error ||
441  modelCreate,
443  (func *) &model_destroy);
444  error = error ||
446  modelCreate,
448  (func *) &model_refresh);
449 
450  /* allocate buffer */
451  bufferPointer = (buffer *) malloc(sizeof(buffer));
452 
453  /* store model buffer in KIM object */
454  LOG_INFORMATION("Set influence distance and cutoffs");
456  bufferPointer);
457 
458  /* set buffer values */
459  bufferPointer->influenceDistance = CUTOFF;
460  bufferPointer->cutoff = CUTOFF;
461  bufferPointer->paddingNeighborHint = 1;
462  bufferPointer->halfListHint = 0;
463 
464  /* register influence distance */
466  modelCreate,
467  &(bufferPointer->influenceDistance));
468 
469  /* register cutoff */
471  modelCreate,
472  1,
473  &(bufferPointer->cutoff),
474  &(bufferPointer->paddingNeighborHint),
475  &(bufferPointer->halfListHint));
476 
477  if (error)
478  {
479  free(bufferPointer);
480  LOG_ERROR("Unable to successfully initialize model");
481  return TRUE;
482  }
483  else
484  return FALSE;
485 }
486 
487 /* refresh function */
489 static int model_refresh(KIM_ModelRefresh * const modelRefresh)
490 {
491  /* Local variables */
492  buffer * bufferPointer;
493 
494  /* get model buffer from KIM object */
495  LOG_INFORMATION("Getting model buffer");
497  (void **) &bufferPointer);
498 
499  LOG_INFORMATION("Resetting influence distance and cutoffs");
501  modelRefresh, &(bufferPointer->influenceDistance));
503  modelRefresh,
504  1,
505  &(bufferPointer->cutoff),
506  &(bufferPointer->paddingNeighborHint),
507  &(bufferPointer->halfListHint));
508 
509  return FALSE;
510 }
511 
512 /* Initialization function */
514 int model_destroy(KIM_ModelDestroy * const modelDestroy) {
515  buffer * bufferPointer;
516 
517  LOG_INFORMATION("Getting buffer");
519  (void **) &bufferPointer);
520  LOG_INFORMATION("Freeing model memory");
521  free(bufferPointer);
522 
523  return FALSE; }
524 
525 /* compute arguments create routine */
528  KIM_ModelCompute const * const modelCompute,
529  KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate)
530 {
531  int error;
532  /* register arguments */
533  LOG_INFORMATION("Register argument supportStatus");
534  error =
536  modelComputeArgumentsCreate,
538  error = error ||
540  modelComputeArgumentsCreate,
542  error = error ||
544  modelComputeArgumentsCreate,
547 
548  /* register call backs */
549  LOG_INFORMATION("Register call back supportStatus");
550  error = error ||
552  modelComputeArgumentsCreate,
555  error = error ||
557  modelComputeArgumentsCreate,
560 
561  if (error)
562  {
563  LOG_ERROR("Unable to successfully initialize compute arguments");
564  return TRUE;
565  }
566  else
567  return FALSE;
568 }
569 
570 /* compue arguments destroy routine */
573  KIM_ModelCompute const * const modelCompute,
574  KIM_ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy)
575 {
576  /* nothing to be done */
577 
578  return FALSE;
579 }
KIM_SupportStatus const KIM_SUPPORT_STATUS_optional
#define SPECCODE
KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy
void KIM_ModelDestroy_GetModelBufferPointer(KIM_ModelDestroy const *const modelDestroy, void **const ptr)
KIM_LanguageName const KIM_LANGUAGE_NAME_c
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialForces
int KIM_ModelCreate_SetComputePointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
struct KIM_ModelRefresh KIM_ModelRefresh
void KIM_ModelRefresh_GetModelBufferPointer(KIM_ModelRefresh const *const modelRefresh, void **const ptr)
static void calc_phi(double *epsilon, double *C, double *Rzero, double *shift, double *cutoff, double r, double *phi)
int KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus(KIM_ModelComputeArgumentsCreate *const modelComputeArgumentsCreate, KIM_ComputeCallbackName const computeCallbackName, KIM_SupportStatus const supportStatus)
#define TRUE
KIM_TemperatureUnit const KIM_TEMPERATURE_UNIT_unused
static int compute_arguments_create(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
KIM_SpeciesName const KIM_SPECIES_NAME_Ar
ChargeUnit const C
KIM_TimeUnit const KIM_TIME_UNIT_unused
static void calc_phi_dphi(double *epsilon, double *C, double *Rzero, double *shift, double *cutoff, double r, double *phi, double *dphi)
int KIM_ModelCreate_SetComputeArgumentsCreatePointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
struct KIM_ModelDestroy KIM_ModelDestroy
void KIM_ModelCreate_SetModelBufferPointer(KIM_ModelCreate *const modelCreate, void *const ptr)
static int compute(void *km)
int KIM_ModelCreate_SetRefreshPointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
int KIM_ModelComputeArgumentsCreate_SetArgumentSupportStatus(KIM_ModelComputeArgumentsCreate *const modelComputeArgumentsCreate, KIM_ComputeArgumentName const computeArgumentName, KIM_SupportStatus const supportStatus)
#define FALSE
void() func()
Definition: KIM_func.h:39
int KIM_ModelCreate_SetComputeArgumentsDestroyPointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
#define LOG_ERROR(message)
int KIM_ModelCreate_SetDestroyPointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
#define CUTOFF
struct KIM_ModelComputeArgumentsCreate KIM_ModelComputeArgumentsCreate
void KIM_ModelCreate_SetInfluenceDistancePointer(KIM_ModelCreate *const modelCreate, double *const influenceDistance)
int KIM_ModelCreate_SetUnits(KIM_ModelCreate *const modelCreate, KIM_LengthUnit const lengthUnit, KIM_EnergyUnit const energyUnit, KIM_ChargeUnit const chargeUnit, KIM_TemperatureUnit const temperatureUnit, KIM_TimeUnit const timeUnit)
int KIM_ModelCreate_SetModelNumbering(KIM_ModelCreate *const modelCreate, KIM_Numbering const numbering)
#define LOG_INFORMATION(message)
int KIM_ModelCreate_SetSpeciesCode(KIM_ModelCreate *const modelCreate, KIM_SpeciesName const speciesName, int const code)
double influenceDistance
struct KIM_ModelComputeArgumentsDestroy KIM_ModelComputeArgumentsDestroy
KIM_EnergyUnit const KIM_ENERGY_UNIT_eV
void KIM_ModelRefresh_SetInfluenceDistancePointer(KIM_ModelRefresh *const modelRefresh, double *const influenceDistance)
KIM_ChargeUnit const KIM_CHARGE_UNIT_unused
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialEnergy
void KIM_ModelCreate_SetNeighborListPointers(KIM_ModelCreate *const modelCreate, int const numberOfNeighborLists, double const *const cutoffs, int const *const paddingNeighborHints, int const *const halfListHints)
int model_create(KIM_ModelCreate *const modelCreate, KIM_LengthUnit const requestedLengthUnit, KIM_EnergyUnit const requestedEnergyUnit, KIM_ChargeUnit const requestedChargeUnit, KIM_TemperatureUnit const requestedTemperatureUnit, KIM_TimeUnit const requestedTimeUnit)
KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_ProcessDEDrTerm
struct KIM_ModelCreate KIM_ModelCreate
void KIM_ModelRefresh_SetNeighborListPointers(KIM_ModelRefresh *const modelRefresh, int const numberOfNeighborLists, double const *const cutoffs, int const *const paddingNeighborHints, int const *const halfListHints)
static int compute_arguments_destroy(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
static int model_refresh(KIM_ModelRefresh *const modelRefresh)
KIM_LengthUnit const KIM_LENGTH_UNIT_A
static int model_destroy(KIM_ModelDestroy *const modelDestroy)
LogVerbosity const error
static void calc_phi_d2phi(double *epsilon, double *C, double *Rzero, double *shift, double *cutoff, double r, double *phi, double *dphi, double *d2phi)
KIM_Numbering const KIM_NUMBERING_zeroBased
struct KIM_ModelCompute KIM_ModelCompute