DFT-EFE
 
Loading...
Searching...
No Matches
AtomSphericalDataEnrichmentJSON.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 Bikash Kanungo
24 */
25
26#ifndef dftefeAtomSphericalDataEnrichment_h
27#define dftefeAtomSphericalDataEnrichment_h
28
29#include <utils/TypeConfig.h>
30#include <atoms/SphericalData.h>
32#include <memory>
33#include <unordered_map>
34#include <map>
35#include <vector>
36#include <string>
37namespace dftefe
38{
39 namespace atoms
40 {
56 class AtomSphericalDataEnrichmentJSON : public AtomSphericalData
57 {
58 public:
59 AtomSphericalDataEnrichmentJSON(
60 const std::string fileName,
61 const std::vector<std::string> & fieldNames,
62 const std::vector<std::string> & metadataNames,
63 const SphericalHarmonicFunctions & sphericalHarmonicFunc,
64 const std::map<std::string, std::string> additionalParams =
65 std::map<std::string, std::string>());
66
67 ~AtomSphericalDataEnrichmentJSON() = default;
68
69 void
70 addFieldName(const std::string fieldName) override;
71
72 std::string
73 getFileName() const override;
74
75 std::vector<std::string>
76 getFieldNames() const override;
77
78 std::vector<std::string>
79 getMetadataNames() const override;
80
81 const std::vector<std::shared_ptr<SphericalData>> &
82 getSphericalData(const std::string fieldName) const override;
83
84 const std::shared_ptr<SphericalData>
85 getSphericalData(const std::string fieldName,
86 const std::vector<int> &qNumbers) const override;
87
88 std::string
89 getMetadata(const std::string metadataName) const override;
90
92 getQNumberID(const std::string fieldName,
93 const std::vector<int> &qNumbers) const override;
94
96 nSphericalData(std::string fieldName) const override;
97
98 private:
99 void
100 getSphericalDataFromJSON(
101 std::vector<std::vector<double>> &radialValuesVec,
102 std::vector<std::vector<int>> & qNumVec,
103 const std::vector<double> & radialPoints,
104 const std::string & fieldName,
105 const std::string & fileName,
106 std::vector<std::pair<int, int>> &nlPairs);
107
108 void
109 getCutoffs(std::vector<std::pair<double, double>> &cutOffInfoVec,
110 std::vector<std::vector<double>> & radialValuesVec,
111 std::vector<std::vector<int>> & qNumVec,
112 const std::vector<double> & radialPoints,
113 const std::string & fieldName,
114 const std::string & fileName,
115 std::vector<std::pair<int, int>> & nlPairs);
116
117 std::vector<std::vector<double>> d_occupancies;
118 std::vector<std::vector<double>> d_eigenValues;
119
120 double d_atomCharge;
121 double d_smearedCharge;
122 std::string d_PSPorAE;
123
124 std::string d_fileName;
125 std::vector<std::string> d_fieldNames;
126 std::vector<std::string> d_metadataNames;
127 std::unordered_map<std::string,
128 std::vector<std::shared_ptr<SphericalData>>>
129 d_sphericalData;
130 std::unordered_map<std::string, std::map<std::vector<int>, size_type>>
131 d_qNumbersToIdMap;
132 std::unordered_map<std::string, std::string> d_metadata;
133 };
134 } // end of namespace atoms
135} // end of namespace dftefe
136#endif // dftefeAtomSphericalDataEnrichment_h
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8