votca 2024-dev
Loading...
Searching...
No Matches
elements.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#ifndef VOTCA_TOOLS_ELEMENTS_H
21#define VOTCA_TOOLS_ELEMENTS_H
22
23// Standard includes
24#include <map>
25#include <string>
26
27// Local VOTCA includes
28#include "constants.h"
29
30namespace votca {
31namespace tools {
32
42class Elements {
43 public:
45 bool isElement(std::string name);
46
53 double getVdWChelpG(std::string name);
54
61 double getVdWMK(std::string name);
62
64 Index getNucCrg(std::string name);
65
68 Index getEleNum(std::string name);
69
71 double getMass(std::string name);
72
74 // All polarizabilities in nm**3
75 // Isotropic polarizability volume is evaluated from the tensor
76 // as (a_xx * a_yy * a_zz )^(1/3) for eigenvalues of the polarizability tensor
77 double getPolarizability(std::string name);
78
80 double getCovRad(std::string name, std::string unit);
81
84 std::string getEleName(Index elenum);
85
88 std::string getEleShort(std::string elefull);
89
91 bool isEleShort(std::string shortname);
92
94 bool isEleFull(std::string fullname);
95
96 bool isMassAssociatedWithElement(double mass, double tolerance);
97
101 std::string getEleShortClosestInMass(double mass, double tolerance);
102
105 std::string getEleFull(std::string eleshort);
106
107 private:
108 // cache variables
109 bool filled_VdWChelpG_ = false;
110 bool filled_VdWMK_ = false;
111 bool filled_NucCrg_ = false;
112 bool filled_CovRad_ = false;
113 bool filled_Mass_ = false;
114 bool filled_EleNum_ = false;
115 bool filled_EleName_ = false;
117 bool filled_EleShort_ = false;
118 bool filled_EleFull_ = false;
119
120 std::map<std::string, double> VdWChelpG_;
121 std::map<std::string, double> VdWMK_;
122 std::map<std::string, Index> NucCrg_;
123 std::map<std::string, double> CovRad_;
124 std::map<std::string, double> Mass_;
125 std::map<std::string, Index> EleNum_;
126 std::map<Index, std::string> EleName_;
127
128 std::map<std::string, double> ElPolarizability_;
129
130 std::map<std::string, std::string> EleShort_;
131 std::map<std::string, std::string> EleFull_;
132
135 std::pair<std::string, double> findShortNameOfElementClosestInMass(
136 double mass);
137
138 void FillMass();
139 void FillVdWChelpG();
140 void FillNucCrg();
141 void FillCovRad();
142 void FillEleNum();
143 void FillEleName();
144 void FillEleShort();
145 void FillEleFull();
146 void FillVdWMK();
147 void FillPolarizability();
148};
149} // namespace tools
150} // namespace votca
151
152#endif // VOTCA_TOOLS_ELEMENTS_H
information about an element
Definition elements.h:42
bool isEleFull(std::string fullname)
Is elefull recognized as an element name i.e. Carbon, HYDROGEN, suphur.
Definition elements.cc:153
bool isMassAssociatedWithElement(double mass, double tolerance)
Definition elements.cc:170
std::pair< std::string, double > findShortNameOfElementClosestInMass(double mass)
Definition elements.cc:192
std::map< std::string, Index > EleNum_
Definition elements.h:125
double getPolarizability(std::string name)
Returns the atomic polarisability of atom.
Definition elements.cc:97
std::string getEleShortClosestInMass(double mass, double tolerance)
Definition elements.cc:178
std::string getEleName(Index elenum)
Definition elements.cc:129
Index getNucCrg(std::string name)
Return the Nuclear charges of each atom. H - 1, He - 2, Na - 3 etc...
Definition elements.cc:36
double getVdWChelpG(std::string name)
Definition elements.cc:75
std::map< std::string, std::string > EleShort_
Definition elements.h:130
std::map< Index, std::string > EleName_
Definition elements.h:126
std::map< std::string, double > ElPolarizability_
Definition elements.h:128
std::string getEleShort(std::string elefull)
Definition elements.cc:145
std::map< std::string, double > VdWMK_
Definition elements.h:121
double getVdWMK(std::string name)
Definition elements.cc:86
std::string getEleFull(std::string eleshort)
Definition elements.cc:137
std::map< std::string, double > Mass_
Definition elements.h:124
std::map< std::string, double > VdWChelpG_
Definition elements.h:120
bool isEleShort(std::string shortname)
Is eleshort recognized an element symbol i.e. H, C, He, Ne etc.
Definition elements.cc:162
double getCovRad(std::string name, std::string unit)
Returns the covalent Radii of the atom.
Definition elements.cc:109
std::map< std::string, double > CovRad_
Definition elements.h:123
Index getEleNum(std::string name)
Definition elements.cc:49
double getMass(std::string name)
Returns the mass of each atom in a.u.
Definition elements.cc:62
bool isElement(std::string name)
Determine if the name is a recognized element symbol or name.
Definition elements.cc:32
std::map< std::string, std::string > EleFull_
Definition elements.h:131
std::map< std::string, Index > NucCrg_
Definition elements.h:122
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26