Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AtomInfo.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_MOLASSEMBLER_ATOM_INFO_H
13 #define INCLUDE_MOLASSEMBLER_ATOM_INFO_H
14 
15 #include "boost/optional/optional_fwd.hpp"
17 
18 #include <array>
19 #include <map>
20 #include <vector>
21 
22 namespace Scine {
23 
24 namespace Molassembler {
25 
27 namespace AtomInfo {
28 
32 class ElementInfo {
33 public:
34 /* Special member functions */
36  double passVdwRadius,
37  unsigned sValenceElectrons = 0,
38  unsigned pValenceElectrons = 0,
39  unsigned dValenceElectrons = 0,
40  unsigned fValenceElectrons = 0
41  );
42 
43 /* Static functions */
44  static unsigned maxOccupancy(char shell);
45 
47  unsigned valenceElectrons(char shell) const;
48  unsigned valenceElectrons(const std::vector<char>& shells) const;
49 
50  bool shellFullOrEmpty(char shell) const;
51  bool shellsFullOrEmpty(const std::vector<char>& shells) const;
52 
54  unsigned valenceElectrons() const;
55 
56  double vdwRadius() const;
57 
58 private:
59  std::array<unsigned, 4> valenceElectrons_;
60  double vdwRadius_;
61 };
62 
70 extern const std::array<double, 110> bondRadii;
71 
72 double bondRadius(Utils::ElementType elementType);
73 
85 extern std::array<ElementInfo, 110> elementData;
86 
87 bool isMainGroupElement(Utils::ElementType elementType);
88 
93 boost::optional<unsigned> mainGroupVE(Utils::ElementType elementType);
94 
95 unsigned dElectronCount(Utils::ElementType elementType);
96 
98 double vdwRadius(Utils::ElementType elementType);
99 
100 } // namespace AtomInfo
101 
102 } // namespace Molassembler
103 
104 } // namespace Scine
105 
106 #endif
double vdwRadius(Utils::ElementType elementType)
Accessor function to fetch the vdw radius directly from elementData.
boost::optional< unsigned > mainGroupVE(Utils::ElementType elementType)
Stores information about an element.
Definition: AtomInfo.h:32
unsigned valenceElectrons() const
Returns the total valence electrons.
const std::array< double, 110 > bondRadii
std::array< ElementInfo, 110 > elementData