kim-api  2.3.1-git+v2.3.0-git-2-g378406f9.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_ModelCreate.h
Go to the documentation of this file.
1 /* */
2 /* KIM-API: An API for interatomic models */
3 /* Copyright (c) 2013--2022, Regents of the University of Minnesota. */
4 /* All rights reserved. */
5 /* */
6 /* Contributors: */
7 /* Ryan S. Elliott */
8 /* */
9 /* SPDX-License-Identifier: LGPL-2.1-or-later */
10 /* */
11 /* This library is free software; you can redistribute it and/or */
12 /* modify it under the terms of the GNU Lesser General Public */
13 /* License as published by the Free Software Foundation; either */
14 /* version 2.1 of the License, or (at your option) any later version. */
15 /* */
16 /* This library is distributed in the hope that it will be useful, */
17 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
19 /* Lesser General Public License for more details. */
20 /* */
21 /* You should have received a copy of the GNU Lesser General Public License */
22 /* along with this library; if not, write to the Free Software Foundation, */
23 /* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
24 /* */
25 
26 /* */
27 /* Release: This file is part of the kim-api.git repository. */
28 /* */
29 
30 
31 #ifndef KIM_MODEL_CREATE_H_
32 #define KIM_MODEL_CREATE_H_
33 
34 #ifndef KIM_FUNCTION_TYPES_H_
35 #include "KIM_FunctionTypes.h" /* IWYU pragma: export */
36 #endif
37 
38 /* Forward declarations */
39 #ifndef KIM_LOG_VERBOSITY_DEFINED_
40 #define KIM_LOG_VERBOSITY_DEFINED_
41 
47 #endif
48 
49 #ifndef KIM_LANGUAGE_NAME_DEFINED_
50 #define KIM_LANGUAGE_NAME_DEFINED_
51 
57 #endif
58 
59 #ifndef KIM_NUMBERING_DEFINED_
60 #define KIM_NUMBERING_DEFINED_
61 
67 #endif
68 
69 #ifndef KIM_MODEL_ROUTINE_NAME_DEFINED_
70 #define KIM_MODEL_ROUTINE_NAME_DEFINED_
71 
77 #endif
78 
79 #ifndef KIM_SPECIES_NAME_DEFINED_
80 #define KIM_SPECIES_NAME_DEFINED_
81 
87 #endif
88 
89 #ifndef KIM_LENGTH_UNIT_DEFINED_
90 #define KIM_LENGTH_UNIT_DEFINED_
91 
96 typedef struct KIM_LengthUnit KIM_LengthUnit;
97 #endif
98 
99 #ifndef KIM_ENERGY_UNIT_DEFINED_
100 #define KIM_ENERGY_UNIT_DEFINED_
101 
106 typedef struct KIM_EnergyUnit KIM_EnergyUnit;
107 #endif
108 
109 #ifndef KIM_CHARGE_UNIT_DEFINED_
110 #define KIM_CHARGE_UNIT_DEFINED_
111 
116 typedef struct KIM_ChargeUnit KIM_ChargeUnit;
117 #endif
118 
119 #ifndef KIM_TEMPERATURE_UNIT_DEFINED_
120 #define KIM_TEMPERATURE_UNIT_DEFINED_
121 
127 #endif
128 
129 #ifndef KIM_TIME_UNIT_DEFINED_
130 #define KIM_TIME_UNIT_DEFINED_
131 
136 typedef struct KIM_TimeUnit KIM_TimeUnit;
137 #endif
138 
139 
140 #ifndef KIM_MODEL_CREATE_DEFINED_
141 #define KIM_MODEL_CREATE_DEFINED_
142 
149 typedef struct KIM_ModelCreate KIM_ModelCreate;
150 #endif
151 
152 
161 int KIM_ModelCreate_SetModelNumbering(KIM_ModelCreate * const modelCreate,
162  KIM_Numbering const numbering);
163 
173  KIM_ModelCreate * const modelCreate,
174  double const * const influenceDistance);
175 
185  KIM_ModelCreate * const modelCreate,
186  int const numberOfNeighborLists,
187  double const * const cutoffs,
188  int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
189 
199  KIM_ModelCreate * const modelCreate,
200  KIM_ModelRoutineName const modelRoutineName,
201  KIM_LanguageName const languageName,
202  int const required,
203  KIM_Function * const fptr);
204 
213 int KIM_ModelCreate_SetSpeciesCode(KIM_ModelCreate * const modelCreate,
214  KIM_SpeciesName const speciesName,
215  int const code);
216 
226  KIM_ModelCreate * const modelCreate,
227  int const extent,
228  int * const ptr,
229  char const * const name,
230  char const * const description);
231 
241  KIM_ModelCreate * const modelCreate,
242  int const extent,
243  double * const ptr,
244  char const * const name,
245  char const * const description);
246 
256  void * const ptr);
257 
265 int KIM_ModelCreate_SetUnits(KIM_ModelCreate * const modelCreate,
266  KIM_LengthUnit const lengthUnit,
267  KIM_EnergyUnit const energyUnit,
268  KIM_ChargeUnit const chargeUnit,
269  KIM_TemperatureUnit const temperatureUnit,
270  KIM_TimeUnit const timeUnit);
271 
280 int KIM_ModelCreate_ConvertUnit(KIM_LengthUnit const fromLengthUnit,
281  KIM_EnergyUnit const fromEnergyUnit,
282  KIM_ChargeUnit const fromChargeUnit,
283  KIM_TemperatureUnit const fromTemperatureUnit,
284  KIM_TimeUnit const fromTimeUnit,
285  KIM_LengthUnit const toLengthUnit,
286  KIM_EnergyUnit const toEnergyUnit,
287  KIM_ChargeUnit const toChargeUnit,
288  KIM_TemperatureUnit const toTemperatureUnit,
289  KIM_TimeUnit const toTimeUnit,
290  double const lengthExponent,
291  double const energyExponent,
292  double const chargeExponent,
293  double const temperatureExponent,
294  double const timeExponent,
295  double * const conversionFactor);
296 
304 void KIM_ModelCreate_LogEntry(KIM_ModelCreate const * const modelCreate,
305  KIM_LogVerbosity const logVerbosity,
306  char const * const message,
307  int const lineNumber,
308  char const * const fileName);
309 
317 char const *
318 KIM_ModelCreate_ToString(KIM_ModelCreate const * const modelCreate);
319 
320 #endif /* KIM_MODEL_CREATE_H_ */
void KIM_ModelCreate_SetInfluenceDistancePointer(KIM_ModelCreate *const modelCreate, double const *const influenceDistance)
Set the Model's influence distance data pointer.
void() KIM_Function(void)
Generic function type.
void KIM_ModelCreate_LogEntry(KIM_ModelCreate const *const modelCreate, KIM_LogVerbosity const logVerbosity, char const *const message, int const lineNumber, char const *const fileName)
Write a log entry into the log file.
An Extensible Enumeration for the EnergyUnit's supported by the KIM API.
An Extensible Enumeration for the LengthUnit's supported by the KIM API.
An Extensible Enumeration for the ChargeUnit's supported by the KIM API.
SupportStatus const required
The standard required status.
An Extensible Enumeration for the LanguageName's supported by the KIM API.
void KIM_ModelCreate_SetModelBufferPointer(KIM_ModelCreate *const modelCreate, void *const ptr)
Set the Model's buffer pointer within the Model object.
An Extensible Enumeration for the Numbering's supported by the KIM API.
Definition: KIM_Numbering.h:41
struct KIM_ModelCreate KIM_ModelCreate
Forward declaration.
An Extensible Enumeration for the ModelRoutineName's supported by the KIM API.
An Extensible Enumeration for the LogVerbosity's supported by the KIM API.
An Extensible Enumeration for the TimeUnit's supported by the KIM API.
Definition: KIM_TimeUnit.h:41
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)
Set the Model's base unit values.
int KIM_ModelCreate_SetParameterPointerInteger(KIM_ModelCreate *const modelCreate, int const extent, int *const ptr, char const *const name, char const *const description)
Set the next parameter data pointer to be provided by the model.
int KIM_ModelCreate_SetModelNumbering(KIM_ModelCreate *const modelCreate, KIM_Numbering const numbering)
Set the Model's particle Numbering.
void KIM_ModelCreate_SetNeighborListPointers(KIM_ModelCreate *const modelCreate, int const numberOfNeighborLists, double const *const cutoffs, int const *const modelWillNotRequestNeighborsOfNoncontributingParticles)
Set the Model's neighbor list data pointers.
int KIM_ModelCreate_SetSpeciesCode(KIM_ModelCreate *const modelCreate, KIM_SpeciesName const speciesName, int const code)
Set integer code for supported SpeciesName.
char const * KIM_ModelCreate_ToString(KIM_ModelCreate const *const modelCreate)
Get a string representing the internal state of the Model object.
int KIM_ModelCreate_SetRoutinePointer(KIM_ModelCreate *const modelCreate, KIM_ModelRoutineName const modelRoutineName, KIM_LanguageName const languageName, int const required, KIM_Function *const fptr)
Set the function pointer for the ModelRoutineName of interest.
int KIM_ModelCreate_SetParameterPointerDouble(KIM_ModelCreate *const modelCreate, int const extent, double *const ptr, char const *const name, char const *const description)
Set the next parameter data pointer to be provided by the model.
An Extensible Enumeration for the TemperatureUnit's supported by the KIM API.
int KIM_ModelCreate_ConvertUnit(KIM_LengthUnit const fromLengthUnit, KIM_EnergyUnit const fromEnergyUnit, KIM_ChargeUnit const fromChargeUnit, KIM_TemperatureUnit const fromTemperatureUnit, KIM_TimeUnit const fromTimeUnit, KIM_LengthUnit const toLengthUnit, KIM_EnergyUnit const toEnergyUnit, KIM_ChargeUnit const toChargeUnit, KIM_TemperatureUnit const toTemperatureUnit, KIM_TimeUnit const toTimeUnit, double const lengthExponent, double const energyExponent, double const chargeExponent, double const temperatureExponent, double const timeExponent, double *const conversionFactor)
Get the multiplicative factor to convert between a derived unit represented in two different sets of ...
An Extensible Enumeration for the SpeciesName's supported by the KIM API.