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.1 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_GetNeighborListPointers(KIM_Model const * const model,
122  int * const numberOfNeighborLists,
123  double const ** const cutoffs,
124  int const ** const paddingNeighborHints,
125  int const ** const halfListHints);
126 
127 void KIM_Model_GetUnits(KIM_Model const * const model,
128  KIM_LengthUnit * const lengthUnit,
129  KIM_EnergyUnit * const energyUnit,
130  KIM_ChargeUnit * const chargeUnit,
131  KIM_TemperatureUnit * const temperatureUnit,
132  KIM_TimeUnit * const timeUnit);
133 
135  KIM_Model const * const model,
136  KIM_ComputeArguments ** const computeArguments);
138  KIM_Model const * const model,
139  KIM_ComputeArguments ** const computeArguments);
140 int KIM_Model_Compute(KIM_Model const * const model,
141  KIM_ComputeArguments const * const computeArguments);
142 
143 int KIM_Model_ClearThenRefresh(KIM_Model * const model);
144 
145 int KIM_Model_GetSpeciesSupportAndCode(KIM_Model const * const model,
146  KIM_SpeciesName const speciesName,
147  int * const speciesIsSupported,
148  int * const code);
149 
150 void KIM_Model_GetNumberOfParameters(KIM_Model const * const model,
151  int * const numberOfParameters);
153  KIM_Model const * const model, int const parameterIndex,
154  KIM_DataType * const dataType, int * const extent,
155  char const ** const description);
156 int KIM_Model_GetParameterInteger(KIM_Model const * const model,
157  int const parameterIndex,
158  int const arrayIndex,
159  int * const parameterValue);
160 int KIM_Model_GetParameterDouble(KIM_Model const * const model,
161  int const parameterIndex,
162  int const arrayIndex,
163  double * const parameterValue);
164 int KIM_Model_SetParameterInteger(KIM_Model * const model,
165  int const parameterIndex,
166  int const arrayIndex,
167  int const parameterValue);
168 int KIM_Model_SetParameterDouble(KIM_Model * const model,
169  int const parameterIndex,
170  int const arrayIndex,
171  double const parameterValue);
172 
174  void * const ptr);
175 void KIM_Model_GetSimulatorBufferPointer(KIM_Model const * const model,
176  void ** const ptr);
177 
178 char const * const KIM_Model_String(KIM_Model const * const model);
179 
180 void KIM_Model_SetLogID(KIM_Model * const model, char const * const logID);
181 void KIM_Model_PushLogVerbosity(KIM_Model * const model,
182  KIM_LogVerbosity const logVerbosity);
183 void KIM_Model_PopLogVerbosity(KIM_Model * const model);
184 
185 #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_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_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_ClearThenRefresh(KIM_Model *const model)
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_GetNeighborListPointers(KIM_Model const *const model, int *const numberOfNeighborLists, double const **const cutoffs, int const **const paddingNeighborHints, int const **const halfListHints)
void KIM_Model_SetLogID(KIM_Model *const model, char const *const logID)
struct KIM_Model KIM_Model
Definition: KIM_Model.h:104