KIM API V2
KIM_EnergyUnit.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--2018, 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-v2.0.0-alpha.0 package.
31 //
32 
33 
34 #ifndef KIM_ENERGY_UNIT_HPP_
35 #define KIM_ENERGY_UNIT_HPP_
36 
37 #include <string>
38 
39 namespace KIM
40 {
41 
43 {
44  public:
46 
47  EnergyUnit();
48  EnergyUnit(int const id);
49  EnergyUnit(std::string const & str);
50  bool operator==(EnergyUnit const & rhs) const;
51  bool operator!=(EnergyUnit const & rhs) const;
52  std::string String() const;
53 };
54 
55 namespace ENERGY_UNIT
56 {
57 extern EnergyUnit const unused;
58 extern EnergyUnit const amu_A2_per_ps2;
59 extern EnergyUnit const erg;
60 extern EnergyUnit const eV;
61 extern EnergyUnit const Hartree;
62 extern EnergyUnit const J;
63 extern EnergyUnit const kcal_mol;
64 
65 void GetNumberOfEnergyUnits(int * const numberOfEnergyUnits);
66 int GetEnergyUnit(int const index, EnergyUnit * const energyUnit);
67 
68 struct Comparator
69 {
70  bool operator()(EnergyUnit const & a, EnergyUnit const & b) const
71  {
72  return a.energyUnitID < b.energyUnitID;
73  }
74 };
75 } // namespace ENERGY_UNIT
76 } // namespace KIM
77 #endif // KIM_ENERGY_UNIT_HPP_
void GetNumberOfEnergyUnits(int *const numberOfEnergyUnits)
EnergyUnit const J
EnergyUnit const Hartree
std::string String() const
EnergyUnit const amu_A2_per_ps2
EnergyUnit const kcal_mol
int GetEnergyUnit(int const index, EnergyUnit *const energyUnit)
EnergyUnit const unused
bool operator==(EnergyUnit const &rhs) const
EnergyUnit const eV
EnergyUnit const erg
bool operator()(EnergyUnit const &a, EnergyUnit const &b) const
bool operator!=(EnergyUnit const &rhs) const