kim-api  2.2.1+v2.2.1.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
KIM_ModelDriverCreate.hpp
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 Development
5 // 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 LICENSE.CDDL.
13 // If applicable, add the following below this CDDL HEADER, with the fields
14 // enclosed by brackets "[]" replaced with your own identifying information:
15 //
16 // Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 //
18 // CDDL HEADER END
19 //
20 
21 //
22 // Copyright (c) 2016--2020, Regents of the University of Minnesota.
23 // All rights reserved.
24 //
25 // Contributors:
26 // Ryan S. Elliott
27 //
28 
29 //
30 // Release: This file is part of the kim-api-2.2.1 package.
31 //
32 
33 
34 #ifndef KIM_MODEL_DRIVER_CREATE_HPP_
35 #define KIM_MODEL_DRIVER_CREATE_HPP_
36 
37 #include <sstream>
38 #include <string>
39 
40 #ifndef KIM_FUNCTION_TYPES_HPP_
41 #include "KIM_FunctionTypes.hpp" // IWYU pragma: export
42 #endif
43 
44 namespace KIM
45 {
46 // Forward declarations
47 class LogVerbosity;
48 class LanguageName;
49 class Numbering;
50 class ModelRoutineName;
51 class SpeciesName;
52 class LengthUnit;
53 class EnergyUnit;
54 class ChargeUnit;
55 class TemperatureUnit;
56 class TimeUnit;
57 class ModelDriverCreateImplementation;
58 
59 
68 {
69  public:
80  void
81  GetParameterFileDirectoryName(std::string const ** const directoryName) const;
82 
92  void GetNumberOfParameterFiles(int * const numberOfParameterFiles) const;
93 
112  int GetParameterFileName(int const index,
113  std::string const ** const parameterFileName) const;
114 
132  int const index, std::string const ** const parameterFileBasename) const;
133 
147  int SetModelNumbering(Numbering const numbering);
148 
167  void SetInfluenceDistancePointer(double const * const influenceDistance);
168 
194  int const numberOfNeighborLists,
195  double const * const cutoffs,
196  int const * const modelWillNotRequestNeighborsOfNoncontributingParticles);
197 
202 
219  int SetRoutinePointer(ModelRoutineName const modelRoutineName,
220  LanguageName const languageName,
221  int const required,
222  Function * const fptr);
223 
242  int SetSpeciesCode(SpeciesName const speciesName, int const code);
243 
273  int SetParameterPointer(int const extent,
274  int * const ptr,
275  std::string const & name,
276  std::string const & description);
277 
279  int SetParameterPointer(int const extent,
280  double * const ptr,
281  std::string const & name,
282  std::string const & description);
283 
298  void SetModelBufferPointer(void * const ptr);
299 
323  int SetUnits(LengthUnit const lengthUnit,
324  EnergyUnit const energyUnit,
325  ChargeUnit const chargeUnit,
326  TemperatureUnit const temperatureUnit,
327  TimeUnit const timeUnit);
328 
359  static int ConvertUnit(LengthUnit const fromLengthUnit,
360  EnergyUnit const fromEnergyUnit,
361  ChargeUnit const fromChargeUnit,
362  TemperatureUnit const fromTemperatureUnit,
363  TimeUnit const fromTimeUnit,
364  LengthUnit const toLengthUnit,
365  EnergyUnit const toEnergyUnit,
366  ChargeUnit const toChargeUnit,
367  TemperatureUnit const toTemperatureUnit,
368  TimeUnit const toTimeUnit,
369  double const lengthExponent,
370  double const energyExponent,
371  double const chargeExponent,
372  double const temperatureExponent,
373  double const timeExponent,
374  double * const conversionFactor);
375 
391  void LogEntry(LogVerbosity const logVerbosity,
392  std::string const & message,
393  int const lineNumber,
394  std::string const & fileName) const;
395 
397  void LogEntry(LogVerbosity const logVerbosity,
398  std::stringstream const & message,
399  int const lineNumber,
400  std::string const & fileName) const;
401 
412  std::string const & ToString() const;
413 
414  private:
415  // do not allow copy constructor or operator=
417  void operator=(ModelDriverCreate const &);
418 
421 
422  ModelDriverCreateImplementation * pimpl;
423 }; // class ModelDriverCreate
424 } // namespace KIM
425 
426 #endif // KIM_MODEL_DRIVER_CREATE_HPP_
int GetParameterFileBasename(int const index, std::string const **const parameterFileBasename) const
Get a particular parameter file basename. The file is located in the Model&#39;s parameter file directory...
std::string const & ToString() const
Get a string representing the internal state of the Model object.
An Extensible Enumeration for the TemperatureUnit&#39;s supported by the KIM API.
An Extensible Enumeration for the TimeUnit&#39;s supported by the KIM API.
An Extensible Enumeration for the ModelRoutineName&#39;s supported by the KIM API.
void GetNumberOfParameterFiles(int *const numberOfParameterFiles) const
Get the number of parameter files provided by the parameterized model.
void SetModelBufferPointer(void *const ptr)
Set the Model&#39;s buffer pointer within the Model object.
SupportStatus const required
The standard required status.
An Extensible Enumeration for the LengthUnit&#39;s supported by the KIM API.
void LogEntry(LogVerbosity const logVerbosity, std::string const &message, int const lineNumber, std::string const &fileName) const
Write a log entry into the log file.
void() Function(void)
Generic function type.
int SetModelNumbering(Numbering const numbering)
Set the Model&#39;s particle Numbering.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
An Extensible Enumeration for the LogVerbosity&#39;s supported by the KIM API.
An Extensible Enumeration for the LanguageName&#39;s supported by the KIM API.
An Extensible Enumeration for the Numbering&#39;s supported by the KIM API.
int GetParameterFileName(int const index, std::string const **const parameterFileName) const
Get a particular parameter file name.
int SetUnits(LengthUnit const lengthUnit, EnergyUnit const energyUnit, ChargeUnit const chargeUnit, TemperatureUnit const temperatureUnit, TimeUnit const timeUnit)
Set the Model&#39;s base unit values.
An Extensible Enumeration for the EnergyUnit&#39;s supported by the KIM API.
void SetNeighborListPointers(int const numberOfNeighborLists, double const *const cutoffs, int const *const modelWillNotRequestNeighborsOfNoncontributingParticles)
Set the Model&#39;s neighbor list data pointers.
int SetRoutinePointer(ModelRoutineName const modelRoutineName, LanguageName const languageName, int const required, Function *const fptr)
Set the function pointer for the ModelRoutineName of interest.
void GetParameterFileDirectoryName(std::string const **const directoryName) const
Get absolute path name of the temporary directory where parameter files provided by the model are wri...
int SetParameterPointer(int const extent, int *const ptr, std::string const &name, std::string const &description)
Set the next parameter data pointer to be provided by the model.
An Extensible Enumeration for the ChargeUnit&#39;s supported by the KIM API.
int SetSpeciesCode(SpeciesName const speciesName, int const code)
Set integer code for supported SpeciesName.
An Extensible Enumeration for the SpeciesName&#39;s supported by the KIM API.
void SetInfluenceDistancePointer(double const *const influenceDistance)
Set the Model&#39;s influence distance data pointer.
static int ConvertUnit(LengthUnit const fromLengthUnit, EnergyUnit const fromEnergyUnit, ChargeUnit const fromChargeUnit, TemperatureUnit const fromTemperatureUnit, TimeUnit const fromTimeUnit, LengthUnit const toLengthUnit, EnergyUnit const toEnergyUnit, ChargeUnit const toChargeUnit, TemperatureUnit const toTemperatureUnit, 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 ...