Scine::Sparrow  5.0.0
Library for fast and agile quantum chemical calculations with semiempirical methods.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
SkfParser.h
Go to the documentation of this file.
1 
8 #ifndef INCLUDE_SPARROW_IMPLEMENTATIONS_DFTB_UTILS_SKF_PARSER_H
9 #define INCLUDE_SPARROW_IMPLEMENTATIONS_DFTB_UTILS_SKF_PARSER_H
10 
12 #include "boost/optional.hpp"
13 #include <array>
14 #include <string>
15 #include <unordered_map>
16 
17 namespace Scine {
18 namespace Sparrow {
19 namespace dftb {
20 
21 struct SkfData {
22  struct SameElementLine {
23  // On-site energies for angular momenta d, p, s
24  double Ed;
25  double Ep;
26  double Es;
27  // spin polarisation error for calculating formation energies
28  double SPE;
29  // Hubbard U values for appropriate angular momenta
30  double Ud;
31  double Up;
32  double Us;
33  // Occupations for the neutral atom
34  unsigned fd;
35  unsigned fp;
36  unsigned fs;
37  };
38 
39  using DoublesList = std::vector<double>;
40  using IntegralTable = std::array<DoublesList, 28>;
41 
46  static SkfData read(const std::string& filename);
47 
48  double gridDistance;
49  boost::optional<SameElementLine> atomicParameters;
50  IntegralTable integralTable;
51  RepulsionParameters repulsion;
52 };
53 
55  using MatrixType = std::array<std::array<double, 3>, 3>;
56  using MapType = std::unordered_map<int, MatrixType>;
57  MapType map;
58 
59  static SkfSpinConstants read(const std::string& filename);
60 
61  void patch(SkfSpinConstants other);
62 };
63 
65  using MapType = std::unordered_map<int, double>;
66  MapType map;
67 
68  static SkfHubbardDerivatives read(const std::string& filename);
69 
70  void patch(SkfHubbardDerivatives other);
71 };
72 
73 } // namespace dftb
74 } // namespace Sparrow
75 } // namespace Scine
76 
77 #endif
Definition: SkfParser.h:54
Definition: SkfParser.h:21
static SkfData read(const std::string &filename)
Parses a SKF file.
Definition: SkfParser.cpp:201
Definition: RepulsionParameters.h:20