kim-api  2.1.4-git+v2.1.3-git-3-g4c859c7f.GNU
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
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--2019, 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.git repository. */
33 /* */
34 
35 
36 #ifndef KIM_MODEL_H_
37 #define KIM_MODEL_H_
38 
39 /* Forward declarations */
40 #ifndef KIM_LOG_VERBOSITY_DEFINED_
41 #define KIM_LOG_VERBOSITY_DEFINED_
42 
48 #endif
49 
50 #ifndef KIM_DATA_TYPE_DEFINED_
51 #define KIM_DATA_TYPE_DEFINED_
52 
57 typedef struct KIM_DataType KIM_DataType;
58 #endif
59 
60 #ifndef KIM_MODEL_ROUTINE_NAME_DEFINED_
61 #define KIM_MODEL_ROUTINE_NAME_DEFINED_
62 
68 #endif
69 
70 #ifndef KIM_SPECIES_NAME_DEFINED_
71 #define KIM_SPECIES_NAME_DEFINED_
72 
78 #endif
79 
80 #ifndef KIM_NUMBERING_DEFINED_
81 #define KIM_NUMBERING_DEFINED_
82 
88 #endif
89 
90 #ifndef KIM_LENGTH_UNIT_DEFINED_
91 #define KIM_LENGTH_UNIT_DEFINED_
92 
98 #endif
99 
100 #ifndef KIM_ENERGY_UNIT_DEFINED_
101 #define KIM_ENERGY_UNIT_DEFINED_
102 
108 #endif
109 
110 #ifndef KIM_CHARGE_UNIT_DEFINED_
111 #define KIM_CHARGE_UNIT_DEFINED_
112 
118 #endif
119 
120 #ifndef KIM_TEMPERATURE_UNIT_DEFINED_
121 #define KIM_TEMPERATURE_UNIT_DEFINED_
122 
128 #endif
129 
130 #ifndef KIM_TIME_UNIT_DEFINED_
131 #define KIM_TIME_UNIT_DEFINED_
132 
137 typedef struct KIM_TimeUnit KIM_TimeUnit;
138 #endif
139 
140 #ifndef KIM_COMPUTE_ARGUMENTS_DEFINED_
141 #define KIM_COMPUTE_ARGUMENTS_DEFINED_
142 
148 #endif
149 
150 
151 #ifndef KIM_MODEL_DEFINED_
152 #define KIM_MODEL_DEFINED_
153 
160 typedef struct KIM_Model KIM_Model;
161 #endif
162 
170 int KIM_Model_Create(KIM_Numbering const numbering,
171  KIM_LengthUnit const requestedLengthUnit,
172  KIM_EnergyUnit const requestedEnergyUnit,
173  KIM_ChargeUnit const requestedChargeUnit,
174  KIM_TemperatureUnit const requestedTemperatureUnit,
175  KIM_TimeUnit const requestedTimeUnit,
176  char const * const modelName,
177  int * const requestedUnitsAccepted,
178  KIM_Model ** const model);
179 
187 void KIM_Model_Destroy(KIM_Model ** const model);
188 
196 int KIM_Model_IsRoutinePresent(KIM_Model const * const model,
197  KIM_ModelRoutineName const modelRoutineName,
198  int * const present,
199  int * const required);
200 
209 void KIM_Model_GetInfluenceDistance(KIM_Model const * const model,
210  double * const influenceDistance);
211 
222  KIM_Model const * const model,
223  int * const numberOfNeighborLists,
224  double const ** const cutoffs,
225  int const ** const modelWillNotRequestNeighborsOfNoncontributingParticles);
226 
234 void KIM_Model_GetUnits(KIM_Model const * const model,
235  KIM_LengthUnit * const lengthUnit,
236  KIM_EnergyUnit * const energyUnit,
237  KIM_ChargeUnit * const chargeUnit,
238  KIM_TemperatureUnit * const temperatureUnit,
239  KIM_TimeUnit * const timeUnit);
240 
250  KIM_Model const * const model,
251  KIM_ComputeArguments ** const computeArguments);
252 
262  KIM_Model const * const model,
263  KIM_ComputeArguments ** const computeArguments);
264 
272 int KIM_Model_Compute(KIM_Model const * const model,
273  KIM_ComputeArguments const * const computeArguments);
274 
282 int KIM_Model_Extension(KIM_Model * const model,
283  char const * const extensionID,
284  void * const extensionStructure);
285 
293 int KIM_Model_ClearThenRefresh(KIM_Model * const model);
294 
303 int KIM_Model_WriteParameterizedModel(KIM_Model const * const model,
304  char const * const path,
305  char const * const modelName);
306 
315 int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const * const model,
316  KIM_SpeciesName const speciesName,
317  int * const speciesIsSupported,
318  int * const code);
319 
328 void KIM_Model_GetNumberOfParameters(KIM_Model const * const model,
329  int * const numberOfParameters);
330 
339 int KIM_Model_GetParameterMetadata(KIM_Model const * const model,
340  int const parameterIndex,
341  KIM_DataType * const dataType,
342  int * const extent,
343  char const ** const name,
344  char const ** const description);
345 
355 int KIM_Model_GetParameterInteger(KIM_Model const * const model,
356  int const parameterIndex,
357  int const arrayIndex,
358  int * const parameterValue);
359 
369 int KIM_Model_GetParameterDouble(KIM_Model const * const model,
370  int const parameterIndex,
371  int const arrayIndex,
372  double * const parameterValue);
373 
382 int KIM_Model_SetParameterInteger(KIM_Model * const model,
383  int const parameterIndex,
384  int const arrayIndex,
385  int const parameterValue);
386 
395 int KIM_Model_SetParameterDouble(KIM_Model * const model,
396  int const parameterIndex,
397  int const arrayIndex,
398  double const parameterValue);
399 
409  void * const ptr);
410 
419 void KIM_Model_GetSimulatorBufferPointer(KIM_Model const * const model,
420  void ** const ptr);
421 
429 char const * KIM_Model_ToString(KIM_Model const * const model);
430 
438 void KIM_Model_SetLogID(KIM_Model * const model, char const * const logID);
439 
447 void KIM_Model_PushLogVerbosity(KIM_Model * const model,
448  KIM_LogVerbosity const logVerbosity);
449 
457 void KIM_Model_PopLogVerbosity(KIM_Model * const model);
458 
459 #endif /* KIM_MODEL_H_ */
struct KIM_ComputeArguments KIM_ComputeArguments
Provides the primary interface to a KIM API ComputeArguments object and is meant to be used by simula...
void KIM_Model_GetInfluenceDistance(KIM_Model const *const model, double *const influenceDistance)
Get the Model's influence distance.
int KIM_Model_WriteParameterizedModel(KIM_Model const *const model, char const *const path, char const *const modelName)
Call the Model's MODEL_ROUTINE_NAME::WriteParameterizedModel routine.
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)
Get the Model's base unit values.
int KIM_Model_GetParameterMetadata(KIM_Model const *const model, int const parameterIndex, KIM_DataType *const dataType, int *const extent, char const **const name, char const **const description)
Get the metadata associated with one of the Model's parameter arrays.
void KIM_Model_Destroy(KIM_Model **const model)
Destroy a previously Model::Create'd object.
void KIM_Model_PushLogVerbosity(KIM_Model *const model, KIM_LogVerbosity const logVerbosity)
Push a new LogVerbosity onto the Model object's Log object verbosity stack.
void KIM_Model_GetNeighborListPointers(KIM_Model const *const model, int *const numberOfNeighborLists, double const **const cutoffs, int const **const modelWillNotRequestNeighborsOfNoncontributingParticles)
Get the Model's neighbor list information.
An Extensible Enumeration for the EnergyUnit's supported by the KIM API.
void KIM_Model_PopLogVerbosity(KIM_Model *const model)
Pop a LogVerbosity from the Model object's Log object verbosity stack.
int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const *const model, KIM_SpeciesName const speciesName, int *const speciesIsSupported, int *const code)
Get the Model's support and code for the requested SpeciesName.
An Extensible Enumeration for the LengthUnit's supported by the KIM API.
An Extensible Enumeration for the ChargeUnit's supported by the KIM API.
int KIM_Model_SetParameterDouble(KIM_Model *const model, int const parameterIndex, int const arrayIndex, double const parameterValue)
Set a parameter value for the Model.
void KIM_Model_SetSimulatorBufferPointer(KIM_Model *const model, void *const ptr)
Set the Simulator's buffer pointer within the Model object.
SupportStatus const required
The standard required status.
int KIM_Model_ComputeArgumentsCreate(KIM_Model const *const model, KIM_ComputeArguments **const computeArguments)
Create a new ComputeArguments object for the Model object.
char const * KIM_Model_ToString(KIM_Model const *const model)
Get a string representing the internal state of the Model object.
An Extensible Enumeration for the Numbering's supported by the KIM API.
Definition: KIM_Numbering.h:46
int KIM_Model_SetParameterInteger(KIM_Model *const model, int const parameterIndex, int const arrayIndex, int const parameterValue)
Set a parameter value for the Model.
An Extensible Enumeration for the DataType's supported by the KIM API.
Definition: KIM_DataType.h:46
int KIM_Model_GetParameterDouble(KIM_Model const *const model, int const parameterIndex, int const arrayIndex, double *const parameterValue)
Get a parameter value from the Model.
An Extensible Enumeration for the ModelRoutineName's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
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)
Create a new KIM API Model object.
void KIM_Model_GetNumberOfParameters(KIM_Model const *const model, int *const numberOfParameters)
Get the number of parameter arrays provided by the Model.
An Extensible Enumeration for the TimeUnit's supported by the KIM API.
Definition: KIM_TimeUnit.h:46
int KIM_Model_ClearThenRefresh(KIM_Model *const model)
Clear influence distance and neighbor list pointers and refresh Model object after parameter changes...
int KIM_Model_ComputeArgumentsDestroy(KIM_Model const *const model, KIM_ComputeArguments **const computeArguments)
Destroy a previously Model::ComputeArgumentsCreate'd object.
int KIM_Model_Extension(KIM_Model *const model, char const *const extensionID, void *const extensionStructure)
Call the Model's MODEL_ROUTINE_NAME::Extension routine.
int KIM_Model_IsRoutinePresent(KIM_Model const *const model, KIM_ModelRoutineName const modelRoutineName, int *const present, int *const required)
Determine presence and required status of the given ModelRoutineName.
int KIM_Model_GetParameterInteger(KIM_Model const *const model, int const parameterIndex, int const arrayIndex, int *const parameterValue)
Get a parameter value from the Model.
int KIM_Model_Compute(KIM_Model const *const model, KIM_ComputeArguments const *const computeArguments)
Call the Model's MODEL_ROUTINE_NAME::Compute routine.
void KIM_Model_GetSimulatorBufferPointer(KIM_Model const *const model, void **const ptr)
Get the Simulator's buffer pointer from the Model object.
An Extensible Enumeration for the TemperatureUnit's supported by the KIM API.
void KIM_Model_SetLogID(KIM_Model *const model, char const *const logID)
Set the identity of the Log object associated with the Model object.
struct KIM_Model KIM_Model
Provides the primary interface to a KIM API Model object and is meant to be used by simulators...
Definition: KIM_Model.h:160
An Extensible Enumeration for the SpeciesName's supported by the KIM API.