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;
67 };
68 typedef struct buffer buffer;
69 
70 /* Define prototype for Model create */
71 int model_create(KIM_ModelCreate * const modelCreate,
72  KIM_LengthUnit const requestedLengthUnit,
73  KIM_EnergyUnit const requestedEnergyUnit,
74  KIM_ChargeUnit const requestedChargeUnit,
75  KIM_TemperatureUnit const requestedTemperatureUnit,
76  KIM_TimeUnit const requestedTimeUnit);
77 
78 /* Define prototype for other routines */
79 static int compute(
80  KIM_ModelCompute const * const modelCompute,
81  KIM_ModelComputeArguments const * const modelComputeArguments);
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 
182 /* compute function */
184 static int compute(
185  KIM_ModelCompute const * const modelCompute,
186  KIM_ModelComputeArguments const * const modelComputeArguments)
187 {
188  /* local variables */
189  double R;
190  double R_pairs[2];
191  double *pR_pairs = &(R_pairs[0]);
192  double Rsqij;
193  double phi;
194  double dphi;
195  double d2phi;
196  double dEidr;
197  double d2Eidr;
198  double Rij[DIM];
199  double *pRij = &(Rij[0]);
200  double Rij_pairs[2][3];
201  double const * pRij_pairs = &(Rij_pairs[0][0]);
202  int ier;
203  int i;
204  int i_pairs[2];
205  int *pi_pairs = &(i_pairs[0]);
206  int j;
207  int j_pairs[2];
208  int *pj_pairs = &(j_pairs[0]);
209  int jj;
210  int k;
211  int const * neighListOfCurrentPart;
212  int comp_energy;
213  int comp_force;
214  int comp_particleEnergy;
215  int comp_process_dEdr;
216  int comp_process_d2Edr2;
217 
218  int* nParts;
221  double* cutoff;
222  double cutsq;
223  double epsilon;
224  double C;
225  double Rzero;
226  double shift;
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  LOG_INFORMATION("Checking if call backs are present.");
238  modelComputeArguments,
240  &comp_process_dEdr);
242  modelComputeArguments,
244  &comp_process_d2Edr2);
245 
246  LOG_INFORMATION("Getting data pointers");
247  ier =
249  modelComputeArguments,
251  &nParts)
252  ||
254  modelComputeArguments,
257  ||
259  modelComputeArguments,
262  ||
264  modelComputeArguments,
266  &coords)
267  ||
269  modelComputeArguments,
271  &energy)
272  ||
274  modelComputeArguments,
276  &force)
277  ||
279  modelComputeArguments,
281  &particleEnergy);
282  if (ier) {
283  LOG_ERROR("get data pointers failed");
284  return ier; }
285 
286  comp_energy = (energy != 0);
287  comp_force = (force != 0);
288  comp_particleEnergy = (particleEnergy != 0);
289 
290  /* set value of parameters */
291  KIM_ModelCompute_GetModelBufferPointer(modelCompute, (void**) &cutoff);
292  cutsq = (*cutoff)*(*cutoff);
293  epsilon = EPSILON;
294  C = PARAM_C;
295  Rzero = RZERO;
296  /* set value of parameter shift */
297  dummy = 0.0;
298  /* call calc_phi with r=cutoff and shift=0.0 */
299  calc_phi(&epsilon, &C, &Rzero, &dummy, cutoff, *cutoff, &shift);
300  /* set shift to -shift */
301  shift = -(shift);
302 
303  /* Check to be sure that the species are correct */
304 
305  ier = TRUE; /* assume an error */
306  for (i = 0; i < *nParts; ++i) {
307  if ( SPECCODE != particleSpeciesCodes[i]) {
308  LOG_ERROR("Unexpected species code detected");
309  return ier; } }
310  ier = FALSE; /* everything is ok */
311 
312  /* initialize potential energies, forces, and virial term */
313  LOG_INFORMATION("Initializing data");
314  if (comp_particleEnergy) {
315  for (i = 0; i < *nParts; ++i) {
316  particleEnergy[i] = 0.0; } }
317  if (comp_energy) {
318  *energy = 0.0; }
319 
320  if (comp_force) {
321  for (i = 0; i < *nParts; ++i) {
322  for (k = 0; k < DIM; ++k) {
323  force[i*DIM + k] = 0.0; } } }
324 
325  /* Compute energy and forces */
326 
327  /* loop over particles and compute enregy and forces */
328  LOG_INFORMATION("Starting main compute loop");
329  for (i = 0; i< *nParts; ++i) {
330  if (particleContributing[i])
331  {
333  modelComputeArguments,
334  0, i, &numOfPartNeigh, &neighListOfCurrentPart);
335  if (ier) {
336  /* some sort of problem, exit */
337  LOG_ERROR("GetNeighborList failed");
338  ier = TRUE;
339  return ier; }
340 
341  /* loop over the neighbors of particle i */
342  for (jj = 0; jj < numOfPartNeigh; ++ jj) {
343  j = neighListOfCurrentPart[jj]; /* get neighbor ID */
344 
345  /* compute relative position vector and squared distance */
346  Rsqij = 0.0;
347  for (k = 0; k < DIM; ++k) {
348  Rij[k] = coords[j*DIM + k] - coords[i*DIM + k];
349 
350  /* compute squared distance */
351  Rsqij += Rij[k]*Rij[k]; }
352 
353  /* compute energy and force */
354  if (Rsqij < cutsq) {
355  /* particles are interacting ? */
356  R = sqrt(Rsqij);
357  if (comp_process_d2Edr2) {
358  /* compute pair potential and its derivatives */
359  calc_phi_d2phi(&epsilon,
360  &C,
361  &Rzero,
362  &shift,
363  cutoff, R, &phi, &dphi, &d2phi);
364 
365  /* compute dEidr */
366  dEidr = 0.5*dphi;
367  d2Eidr = 0.5*d2phi; }
368  else if (comp_force || comp_process_dEdr) {
369  /* compute pair potential and its derivative */
370  calc_phi_dphi(&epsilon,
371  &C,
372  &Rzero,
373  &shift,
374  cutoff, R, &phi, &dphi);
375 
376  /* compute dEidr */
377  dEidr = 0.5*dphi; }
378  else {
379  /* compute just pair potential */
380  calc_phi(&epsilon,
381  &C,
382  &Rzero,
383  &shift,
384  cutoff, R, &phi); }
385 
386  /* contribution to energy */
387  if (comp_particleEnergy) {
388  particleEnergy[i] += 0.5*phi; }
389  if (comp_energy) {
390  *energy += 0.5*phi; }
391 
392  /* contribution to process_dEdr */
393  if (comp_process_dEdr) {
395  modelComputeArguments, dEidr, R, pRij, i, j); }
396 
397  /* contribution to process_d2Edr2 */
398  if (comp_process_d2Edr2) {
399  R_pairs[0] = R_pairs[1] = R;
400  Rij_pairs[0][0] = Rij_pairs[1][0] = Rij[0];
401  Rij_pairs[0][1] = Rij_pairs[1][1] = Rij[1];
402  Rij_pairs[0][2] = Rij_pairs[1][2] = Rij[2];
403  i_pairs[0] = i_pairs[1] = i;
404  j_pairs[0] = j_pairs[1] = j;
405 
407  modelComputeArguments,
408  d2Eidr, pR_pairs, pRij_pairs, pi_pairs, pj_pairs);
409  }
410 
411  /* contribution to forces */
412  if (comp_force) {
413  for (k = 0; k < DIM; ++k) {
414  force[i*DIM + k] += dEidr*Rij[k]/R; /* accumulate force on i */
415  force[j*DIM + k] -= dEidr*Rij[k]/R; /* accumulate force on j */ } } }
416  } /* loop on jj */
417  } /* if contributing */
418  } /* loop on i */
419  LOG_INFORMATION("Finished compute loop");
420 
421  /* everything is great */
422  ier = FALSE;
423 
424  return ier; }
425 
426 /* Create function */
428 int model_create(KIM_ModelCreate * const modelCreate,
429  KIM_LengthUnit const requestedLengthUnit,
430  KIM_EnergyUnit const requestedEnergyUnit,
431  KIM_ChargeUnit const requestedChargeUnit,
432  KIM_TemperatureUnit const requestedTemperatureUnit,
433  KIM_TimeUnit const requestedTimeUnit)
434 {
435  buffer * bufferPointer;
436  int error;
437 
438  /* set units */
439  LOG_INFORMATION("Set model units");
441  modelCreate, /* ignoring requested units */
447 
448  /* register species */
449  LOG_INFORMATION("Setting species code");
450  error = error ||
451  KIM_ModelCreate_SetSpeciesCode(modelCreate,
453 
454  /* register numbering */
455  LOG_INFORMATION("Setting model numbering");
458 
459  /* register function pointers */
460  LOG_INFORMATION("Register model function pointers");
461  error = error ||
463  modelCreate,
465  (func *) &compute);
466  error = error ||
468  modelCreate,
471  error = error ||
473  modelCreate,
476  error = error ||
478  modelCreate,
480  (func *) &model_destroy);
481  error = error ||
483  modelCreate,
485  (func *) &model_refresh);
486 
487  /* allocate buffer */
488  bufferPointer = (buffer *) malloc(sizeof(buffer));
489 
490  /* store model buffer in KIM object */
491  LOG_INFORMATION("Set influence distance and cutoffs");
493  bufferPointer);
494 
495  /* set buffer values */
496  bufferPointer->influenceDistance = CUTOFF;
497  bufferPointer->cutoff = CUTOFF;
498 
499  /* register influence distance */
501  modelCreate,
502  &(bufferPointer->influenceDistance));
503 
504  /* register cutoff */
506  &(bufferPointer->cutoff));
507 
508  if (error)
509  {
510  free(bufferPointer);
511  LOG_ERROR("Unable to successfully initialize model");
512  return TRUE;
513  }
514  else
515  return FALSE;
516 }
517 
518 /* refresh function */
520 static int model_refresh(KIM_ModelRefresh * const modelRefresh)
521 {
522  /* Local variables */
523  buffer * bufferPointer;
524 
525  /* get model buffer from KIM object */
526  LOG_INFORMATION("Getting model buffer");
528  (void **) &bufferPointer);
529 
530  LOG_INFORMATION("Resetting influence distance and cutoffs");
532  modelRefresh, &(bufferPointer->influenceDistance));
534  &(bufferPointer->cutoff));
535 
536  return FALSE;
537 }
538 
539 /* Initialization function */
541 int model_destroy(KIM_ModelDestroy * const modelDestroy) {
542  buffer * bufferPointer;
543 
544  LOG_INFORMATION("Getting buffer");
546  (void **) &bufferPointer);
547  LOG_INFORMATION("Freeing model memory");
548  free(bufferPointer);
549 
550  return FALSE; }
551 
552 /* compute arguments create routine */
555  KIM_ModelCompute const * const modelCompute,
556  KIM_ModelComputeArgumentsCreate * const modelComputeArgumentsCreate)
557 {
558  int error;
559  /* register arguments */
560  LOG_INFORMATION("Register argument supportStatus");
561  error =
563  modelComputeArgumentsCreate,
565  error = error ||
567  modelComputeArgumentsCreate,
569  error = error ||
571  modelComputeArgumentsCreate,
574 
575  /* register call backs */
576  LOG_INFORMATION("Register call back supportStatus");
577  error = error ||
579  modelComputeArgumentsCreate,
582  error = error ||
584  modelComputeArgumentsCreate,
587 
588  if (error)
589  {
590  LOG_ERROR("Unable to successfully initialize compute arguments");
591  return TRUE;
592  }
593  else
594  return FALSE;
595 }
596 
597 /* compue arguments destroy routine */
600  KIM_ModelCompute const * const modelCompute,
601  KIM_ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy)
602 {
603  /* nothing to be done */
604 
605  return FALSE;
606 }
#define TRUE
KIM_SupportStatus const KIM_SUPPORT_STATUS_optional
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_coordinates
KIM_ComputeCallbackName const KIM_COMPUTE_CALLBACK_NAME_ProcessD2EDr2Term
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy
static int model_destroy(KIM_ModelDestroy *const modelDestroy)
void KIM_ModelDestroy_GetModelBufferPointer(KIM_ModelDestroy const *const modelDestroy, void **const ptr)
KIM_LanguageName const KIM_LANGUAGE_NAME_c
#define RZERO
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
int KIM_ModelComputeArguments_GetArgumentPointerDouble(KIM_ModelComputeArguments const *const modelComputeArguments, KIM_ComputeArgumentName const computeArgumentName, double **const ptr)
int KIM_ModelComputeArguments_ProcessD2EDr2Term(KIM_ModelComputeArguments const *const modelComputeArguments, double const de, double const *const r, double const *const dx, int const *const i, int const *const j)
void KIM_ModelRefresh_GetModelBufferPointer(KIM_ModelRefresh const *const modelRefresh, void **const ptr)
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes
int KIM_ModelComputeArgumentsCreate_SetCallbackSupportStatus(KIM_ModelComputeArgumentsCreate *const modelComputeArgumentsCreate, KIM_ComputeCallbackName const computeCallbackName, KIM_SupportStatus const supportStatus)
static int compute_arguments_destroy(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
int KIM_ModelComputeArguments_IsCallbackPresent(KIM_ModelComputeArguments const *const modelComputeArguments, KIM_ComputeCallbackName const computeCallbackName, int *const present)
KIM_TemperatureUnit const KIM_TEMPERATURE_UNIT_unused
static int model_refresh(KIM_ModelRefresh *const modelRefresh)
#define EPSILON
KIM_SpeciesName const KIM_SPECIES_NAME_Ar
ChargeUnit const C
KIM_TimeUnit const KIM_TIME_UNIT_unused
void KIM_ModelCreate_SetNeighborListCutoffsPointer(KIM_ModelCreate *const modelCreate, int const numberOfCutoffs, double const *const cutoffs)
void KIM_ModelRefresh_SetNeighborListCutoffsPointer(KIM_ModelRefresh *const modelRefresh, int const numberOfCutoffs, double const *const cutoffs)
int KIM_ModelCreate_SetComputeArgumentsCreatePointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
static void calc_phi_d2phi(double *epsilon, double *C, double *Rzero, double *shift, double *cutoff, double r, double *phi, double *dphi, double *d2phi)
struct KIM_ModelDestroy KIM_ModelDestroy
void KIM_ModelCreate_SetModelBufferPointer(KIM_ModelCreate *const modelCreate, void *const ptr)
ComputeArgumentName const particleContributing
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)
void KIM_ModelCompute_GetModelBufferPointer(KIM_ModelCompute const *const modelCompute, void **const ptr)
void() func()
Definition: KIM_func.h:39
int KIM_ModelCreate_SetComputeArgumentsDestroyPointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
#define CUTOFF
#define LOG_ERROR(message)
int KIM_ModelCreate_SetDestroyPointer(KIM_ModelCreate *const modelCreate, KIM_LanguageName const languageName, func *const fptr)
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles
struct KIM_ModelComputeArguments KIM_ModelComputeArguments
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)
static void calc_phi_dphi(double *epsilon, double *C, double *Rzero, double *shift, double *cutoff, double r, double *phi, double *dphi)
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)
int KIM_ModelComputeArguments_GetNeighborList(KIM_ModelComputeArguments const *const modelComputeArguments, int const neighborListIndex, int const particleNumber, int *const numberOfNeighbors, int const **const neighborsOfParticle)
struct KIM_ModelComputeArgumentsDestroy KIM_ModelComputeArgumentsDestroy
struct buffer buffer
KIM_EnergyUnit const KIM_ENERGY_UNIT_eV
#define PARAM_C
static int compute_arguments_create(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
void KIM_ModelRefresh_SetInfluenceDistancePointer(KIM_ModelRefresh *const modelRefresh, double *const influenceDistance)
KIM_ChargeUnit const KIM_CHARGE_UNIT_unused
ComputeArgumentName const particleSpeciesCodes
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_partialEnergy
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
int KIM_ModelComputeArguments_ProcessDEDrTerm(KIM_ModelComputeArguments const *const modelComputeArguments, double const de, double const r, double const *const dx, int const i, int const j)
static int compute(KIM_ModelCompute const *const modelCompute, KIM_ModelComputeArguments const *const modelComputeArguments)
static void calc_phi(double *epsilon, double *C, double *Rzero, double *shift, double *cutoff, double r, double *phi)
KIM_LengthUnit const KIM_LENGTH_UNIT_A
#define FALSE
#define SPECCODE
LogVerbosity const error
KIM_Numbering const KIM_NUMBERING_zeroBased
int KIM_ModelComputeArguments_GetArgumentPointerInteger(KIM_ModelComputeArguments const *const modelComputeArguments, KIM_ComputeArgumentName const computeArgumentName, int **const ptr)
KIM_ComputeArgumentName const KIM_COMPUTE_ARGUMENT_NAME_particleContributing
#define DIM
struct KIM_ModelCompute KIM_ModelCompute