DFT-EFE
 
Loading...
Searching...
No Matches
AtomTCIASpline.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef dftefeAtomTCIASpline_h
27#define dftefeAtomTCIASpline_h
28
29#include <string>
30#include <unordered_map>
31#include <utils/Spline.h>
32#include <unordered_map>
33#include <list>
34#include <memory>
35#include <string>
36#include <vector>
37#include <stdexcept>
38#include <utils/TypeConfig.h>
39namespace dftefe
40{
41 namespace atoms
42 {
44 {
45 std::string folderName;
46 std::string outFilePrefix;
47 };
48
50 {
51 public:
52 AtomTCIASpline(const std::string & fieldName,
53 const TCIADataParams & params,
54 const std::vector<std::string> atomSymbols,
55 const std::vector<std::string> tciTypes = {"S"},
56 const size_type maxPairs = 1000);
57
61 ~AtomTCIASpline() = default;
62
64 getSpline(const std::string &atomCombination, const std::string tciType);
65
66 double
68
69 double
71
72 double
74
75 std::string
76 getVLocInfo(std::string atomSymbol, std::string paramName);
77
78 private:
79 bool
80 loadAtomCombination(const std::string & atomCombination,
81 std::vector<std::vector<double>> &values);
82 void
84 void
85 touch(const std::string &key);
86
87 std::unordered_map<std::string, int> d_tciTypeToIndex;
88
89 std::unordered_map<std::string,
90 std::vector<std::unique_ptr<utils::Spline>>>
93 std::vector<double> d_dgrid;
95 std::string d_fieldName;
96 const std::vector<std::string> d_tciTypes;
97 double d_rcSmear;
99 std::unordered_map<std::string,
100 std::unordered_map<std::string, std::string>>
102
103 // LRU bookkeeping
104 std::list<std::string> d_lruList; // front = most recent, back = least
105 std::unordered_map<std::string, std::list<std::string>::iterator>
107
108 }; // end of class AtomTCIASpline
109 } // end of namespace atoms
110} // end of namespace dftefe
111#endif // dftefeAtomTCIASpline_h
Definition: AtomTCIASpline.h:50
void touch(const std::string &key)
Definition: AtomTCIASpline.cpp:89
double d_rcSmear
Definition: AtomTCIASpline.h:97
double smearedChargeRadiusZZCorr()
Definition: AtomTCIASpline.cpp:392
std::string d_fieldName
Definition: AtomTCIASpline.h:95
std::vector< double > d_dgrid
Definition: AtomTCIASpline.h:93
std::unordered_map< std::string, std::unordered_map< std::string, std::string > > d_vLocParams
Definition: AtomTCIASpline.h:101
~AtomTCIASpline()=default
Destructor.
void evictIfNeeded()
Definition: AtomTCIASpline.cpp:101
std::string getVLocInfo(std::string atomSymbol, std::string paramName)
Definition: AtomTCIASpline.cpp:398
std::unordered_map< std::string, std::vector< std::unique_ptr< utils::Spline > > > d_cache
Definition: AtomTCIASpline.h:91
double smearedChargeRadius()
Definition: AtomTCIASpline.cpp:386
const std::vector< std::string > d_tciTypes
Definition: AtomTCIASpline.h:96
std::unordered_map< std::string, std::list< std::string >::iterator > d_keyToIter
Definition: AtomTCIASpline.h:106
bool loadAtomCombination(const std::string &atomCombination, std::vector< std::vector< double > > &values)
Definition: AtomTCIASpline.cpp:113
const TCIADataParams d_tciaparams
Definition: AtomTCIASpline.h:92
double d_rcSmearZZCorr
Definition: AtomTCIASpline.h:98
std::list< std::string > d_lruList
Definition: AtomTCIASpline.h:104
utils::Spline * getSpline(const std::string &atomCombination, const std::string tciType)
Definition: AtomTCIASpline.cpp:335
std::unordered_map< std::string, int > d_tciTypeToIndex
Definition: AtomTCIASpline.h:87
double maxRadialGrid()
Definition: AtomTCIASpline.cpp:380
size_type d_maxSize
Definition: AtomTCIASpline.h:94
Definition: Spline.h:46
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
Definition: AtomTCIASpline.h:44
std::string folderName
Definition: AtomTCIASpline.h:45
std::string outFilePrefix
Definition: AtomTCIASpline.h:46