KIM API V2
KIM_Model.h
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. */
14 /* If applicable, add the following below this CDDL HEADER, with the fields */
15 /* enclosed by brackets "[]" replaced with your own 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) 2016--2018, Regents of the University of Minnesota. */
25 /* All rights reserved. */
26 /* */
27 /* Contributors: */
28 /* Ryan S. Elliott */
29 /* */
30 
31 /* */
32 /* Release: This file is part of the kim-api-v2.0.0-beta.0 package. */
33 /* */
34 
35 
36 #ifndef KIM_MODEL_H_
37 #define KIM_MODEL_H_
38 
39 #ifndef KIM_FUNC_H_
40 #include "KIM_func.h"
41 #endif
42 
43 /* Forward declarations */
44 #ifndef KIM_LOG_VERBOSITY_DEFINED_
45 #define KIM_LOG_VERBOSITY_DEFINED_
47 #endif
48 
49 #ifndef KIM_SPECIES_NAME_DEFINED_
50 #define KIM_SPECIES_NAME_DEFINED_
52 #endif
53 
54 #ifndef KIM_LANGUAGE_NAME_DEFINED_
55 #define KIM_LANGUAGE_NAME_DEFINED_
57 #endif
58 
59 #ifndef KIM_NUMBERING_DEFINED_
60 #define KIM_NUMBERING_DEFINED_
62 #endif
63 
64 #ifndef KIM_LENGTH_UNIT_DEFINED_
65 #define KIM_LENGTH_UNIT_DEFINED_
67 #endif
68 
69 #ifndef KIM_DATA_TYPE_DEFINED_
70 #define KIM_DATA_TYPE_DEFINED_
71 typedef struct KIM_DataType KIM_DataType;
72 #endif
73 
74 #ifndef KIM_ENERGY_UNIT_DEFINED_
75 #define KIM_ENERGY_UNIT_DEFINED_
77 #endif
78 
79 #ifndef KIM_CHARGE_UNIT_DEFINED_
80 #define KIM_CHARGE_UNIT_DEFINED_
82 #endif
83 
84 #ifndef KIM_TEMPERATURE_UNIT_DEFINED_
85 #define KIM_TEMPERATURE_UNIT_DEFINED_
87 #endif
88 
89 #ifndef KIM_TIME_UNIT_DEFINED_
90 #define KIM_TIME_UNIT_DEFINED_
91 typedef struct KIM_TimeUnit KIM_TimeUnit;
92 #endif
93 
94 #ifndef KIM_COMPUTE_ARGUMENTS_DEFINED_
95 #define KIM_COMPUTE_ARGUMENTS_DEFINED_
97 #endif
98 
99 
100 struct KIM_Model;
101 
102 #ifndef KIM_MODEL_DEFINED_
103 #define KIM_MODEL_DEFINED_
104 typedef struct KIM_Model KIM_Model;
105 #endif
106 
107 int KIM_Model_Create(KIM_Numbering const numbering,
108  KIM_LengthUnit const requestedLengthUnit,
109  KIM_EnergyUnit const requestedEnergyUnit,
110  KIM_ChargeUnit const requestedChargeUnit,
111  KIM_TemperatureUnit const requestedTemperatureUnit,
112  KIM_TimeUnit const requestedTimeUnit,
113  char const * const modelName,
114  int * const requestedUnitsAccepted,
115  KIM_Model ** const model);
116 void KIM_Model_Destroy(KIM_Model ** const model);
117 
118 void KIM_Model_GetInfluenceDistance(KIM_Model const * const model,
119  double * const influenceDistance);
120 
121 void KIM_Model_GetNeighborListCutoffsPointer(KIM_Model const * const model,
122  int * const numberOfCutoffs,
123  double const ** const cutoffs);
124 
125 void KIM_Model_GetUnits(KIM_Model const * const model,
126  KIM_LengthUnit * const lengthUnit,
127  KIM_EnergyUnit * const energyUnit,
128  KIM_ChargeUnit * const chargeUnit,
129  KIM_TemperatureUnit * const temperatureUnit,
130  KIM_TimeUnit * const timeUnit);
131 
133  KIM_Model const * const model,
134  KIM_ComputeArguments ** const computeArguments);
136  KIM_Model const * const model,
137  KIM_ComputeArguments ** const computeArguments);
138 int KIM_Model_Compute(KIM_Model const * const model,
139  KIM_ComputeArguments const * const computeArguments);
140 
142  KIM_Model * const model);
143 
144 int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const * const model,
145  KIM_SpeciesName const speciesName,
146  int * const speciesIsSupported,
147  int * const code);
148 
149 void KIM_Model_GetNumberOfParameters(KIM_Model const * const model,
150  int * const numberOfParameters);
152  KIM_Model const * const model, int const parameterIndex,
153  KIM_DataType * const dataType, int * const extent,
154  char const ** const description);
155 int KIM_Model_GetParameterInteger(KIM_Model const * const model,
156  int const parameterIndex,
157  int const arrayIndex,
158  int * const parameterValue);
159 int KIM_Model_GetParameterDouble(KIM_Model const * const model,
160  int const parameterIndex,
161  int const arrayIndex,
162  double * const parameterValue);
163 int KIM_Model_SetParameterInteger(KIM_Model * const model,
164  int const parameterIndex,
165  int const arrayIndex,
166  int const parameterValue);
167 int KIM_Model_SetParameterDouble(KIM_Model * const model,
168  int const parameterIndex,
169  int const arrayIndex,
170  double const parameterValue);
171 
173  void * const ptr);
174 void KIM_Model_GetSimulatorBufferPointer(KIM_Model const * const model,
175  void ** const ptr);
176 
177 char const * const KIM_Model_String(KIM_Model const * const model);
178 
179 void KIM_Model_SetLogID(KIM_Model * const model, char const * const logID);
180 void KIM_Model_PushLogVerbosity(KIM_Model * const model,
181  KIM_LogVerbosity const logVerbosity);
182 void KIM_Model_PopLogVerbosity(KIM_Model * const model);
183 
184 #endif /* KIM_MODEL_H_ */
struct KIM_ComputeArguments KIM_ComputeArguments
void KIM_Model_GetInfluenceDistance(KIM_Model const *const model, double *const influenceDistance)
void KIM_Model_GetUnits(KIM_Model const *const model, KIM_LengthUnit *const lengthUnit, KIM_EnergyUnit *const energyUnit, KIM_ChargeUnit *const chargeUnit, KIM_TemperatureUnit *const temperatureUnit, KIM_TimeUnit *const timeUnit)
void KIM_Model_GetNeighborListCutoffsPointer(KIM_Model const *const model, int *const numberOfCutoffs, double const **const cutoffs)
void KIM_Model_Destroy(KIM_Model **const model)
void KIM_Model_PushLogVerbosity(KIM_Model *const model, KIM_LogVerbosity const logVerbosity)
void KIM_Model_PopLogVerbosity(KIM_Model *const model)
int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const *const model, KIM_SpeciesName const speciesName, int *const speciesIsSupported, int *const code)
int KIM_Model_GetParameterDataTypeExtentAndDescription(KIM_Model const *const model, int const parameterIndex, KIM_DataType *const dataType, int *const extent, char const **const description)
int KIM_Model_SetParameterDouble(KIM_Model *const model, int const parameterIndex, int const arrayIndex, double const parameterValue)
void KIM_Model_SetSimulatorBufferPointer(KIM_Model *const model, void *const ptr)
int KIM_Model_ComputeArgumentsCreate(KIM_Model const *const model, KIM_ComputeArguments **const computeArguments)
int KIM_Model_SetParameterInteger(KIM_Model *const model, int const parameterIndex, int const arrayIndex, int const parameterValue)
int KIM_Model_GetParameterDouble(KIM_Model const *const model, int const parameterIndex, int const arrayIndex, double *const parameterValue)
char const *const KIM_Model_String(KIM_Model const *const model)
int KIM_Model_ClearInfluenceDistanceAndCutoffsThenRefreshModel(KIM_Model *const model)
int KIM_Model_Create(KIM_Numbering const numbering, KIM_LengthUnit const requestedLengthUnit, KIM_EnergyUnit const requestedEnergyUnit, KIM_ChargeUnit const requestedChargeUnit, KIM_TemperatureUnit const requestedTemperatureUnit, KIM_TimeUnit const requestedTimeUnit, char const *const modelName, int *const requestedUnitsAccepted, KIM_Model **const model)
void KIM_Model_GetNumberOfParameters(KIM_Model const *const model, int *const numberOfParameters)
int KIM_Model_ComputeArgumentsDestroy(KIM_Model const *const model, KIM_ComputeArguments **const computeArguments)
int KIM_Model_GetParameterInteger(KIM_Model const *const model, int const parameterIndex, int const arrayIndex, int *const parameterValue)
int KIM_Model_Compute(KIM_Model const *const model, KIM_ComputeArguments const *const computeArguments)
void KIM_Model_GetSimulatorBufferPointer(KIM_Model const *const model, void **const ptr)
void KIM_Model_SetLogID(KIM_Model *const model, char const *const logID)
struct KIM_Model KIM_Model
Definition: KIM_Model.h:104