kim-api  2.3.0+v2.3.0.GNU.GNU.
An Application Programming Interface (API) for the Knowledgebase of Interatomic Models (KIM).
LennardJones612.hpp
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 // Andrew Akerson
9 //
10 // SPDX-License-Identifier: LGPL-2.1-or-later
11 //
12 // This library is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU Lesser General Public
14 // License as published by the Free Software Foundation; either
15 // version 2.1 of the License, or (at your option) any later version.
16 //
17 // This library is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 // Lesser General Public License for more details.
21 //
22 // You should have received a copy of the GNU Lesser General Public License
23 // along with this library; if not, write to the Free Software Foundation,
24 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 //
26 
27 
28 #ifndef LENNARD_JONES_612_HPP_
29 #define LENNARD_JONES_612_HPP_
30 
32 
33 extern "C" {
34 int model_driver_create(KIM::ModelDriverCreate * const modelDriverCreate,
35  KIM::LengthUnit const requestedLengthUnit,
36  KIM::EnergyUnit const requestedEnergyUnit,
37  KIM::ChargeUnit const requestedChargeUnit,
38  KIM::TemperatureUnit const requestedTemperatureUnit,
39  KIM::TimeUnit const requestedTimeUnit);
40 }
41 
43 
45 {
46  public:
47  LennardJones612(KIM::ModelDriverCreate * const modelDriverCreate,
48  KIM::LengthUnit const requestedLengthUnit,
49  KIM::EnergyUnit const requestedEnergyUnit,
50  KIM::ChargeUnit const requestedChargeUnit,
51  KIM::TemperatureUnit const requestedTemperatureUnit,
52  KIM::TimeUnit const requestedTimeUnit,
53  int * const ier);
55 
56  // no need to make these "extern" since KIM will only access them
57  // via function pointers. "static" is required so that there is not
58  // an implicit this pointer added to the prototype by the C++ compiler
59  static int Destroy(KIM::ModelDestroy * const modelDestroy);
60  static int Refresh(KIM::ModelRefresh * const modelRefresh);
61  static int
62  Compute(KIM::ModelCompute const * const modelCompute,
63  KIM::ModelComputeArguments const * const modelComputeArguments);
64  static int ComputeArgumentsCreate(
65  KIM::ModelCompute const * const modelCompute,
66  KIM::ModelComputeArgumentsCreate * const modelComputeArgumentsCreate);
67  static int ComputeArgumentsDestroy(
68  KIM::ModelCompute const * const modelCompute,
69  KIM::ModelComputeArgumentsDestroy * const modelComputeArgumentsDestroy);
70 
71  private:
72  LennardJones612Implementation * implementation_;
73 };
74 
75 #endif // LENNARD_JONES_612_HPP_
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::R...
An Extensible Enumeration for the TemperatureUnit's supported by the KIM API.
static int Refresh(KIM::ModelRefresh *const modelRefresh)
An Extensible Enumeration for the TimeUnit's supported by the KIM API.
An Extensible Enumeration for the LengthUnit's supported by the KIM API.
LennardJones612(KIM::ModelDriverCreate *const modelDriverCreate, KIM::LengthUnit const requestedLengthUnit, KIM::EnergyUnit const requestedEnergyUnit, KIM::ChargeUnit const requestedChargeUnit, KIM::TemperatureUnit const requestedTemperatureUnit, KIM::TimeUnit const requestedTimeUnit, int *const ier)
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::D...
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
static int ComputeArgumentsCreate(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
static int Destroy(KIM::ModelDestroy *const modelDestroy)
An Extensible Enumeration for the EnergyUnit's supported by the KIM API.
int model_driver_create(KIM::ModelDriverCreate *const modelDriverCreate, KIM::LengthUnit const requestedLengthUnit, KIM::EnergyUnit const requestedEnergyUnit, KIM::ChargeUnit const requestedChargeUnit, KIM::TemperatureUnit const requestedTemperatureUnit, KIM::TimeUnit const requestedTimeUnit)
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
static int ComputeArgumentsDestroy(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
An Extensible Enumeration for the ChargeUnit's supported by the KIM API.
static int Compute(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArguments const *const modelComputeArguments)