Molassembler  3.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 namespace Molassembler {
24 
26 namespace AtomInfo {
27 
31 class ElementInfo {
32 public:
33 /* Special member functions */
35  double passVdwRadius,
36  unsigned sValenceElectrons = 0,
37  unsigned pValenceElectrons = 0,
38  unsigned dValenceElectrons = 0,
39  unsigned fValenceElectrons = 0
40  );
41 
42 /* Static functions */
43  static unsigned maxOccupancy(char shell);
44 
46  unsigned valenceElectrons(char shell) const;
47  unsigned valenceElectrons(const std::vector<char>& shells) const;
48 
49  bool shellFullOrEmpty(char shell) const;
50  bool shellsFullOrEmpty(const std::vector<char>& shells) const;
51 
53  unsigned valenceElectrons() const;
54 
55  double vdwRadius() const;
56 
57 private:
58  std::array<unsigned, 4> valenceElectrons_;
59  double vdwRadius_;
60 };
61 
69 const std::array<double, 110>& bondRadii();
70 
71 double bondRadius(Utils::ElementType elementType);
72 
84 const std::array<ElementInfo, 110>& elementData();
85 
86 bool isMainGroupElement(Utils::ElementType elementType);
87 
92 boost::optional<unsigned> mainGroupVE(Utils::ElementType elementType);
93 
94 unsigned dElectronCount(Utils::ElementType elementType);
95 
97 double vdwRadius(Utils::ElementType elementType);
98 
99 } // namespace AtomInfo
100 } // namespace Molassembler
101 } // namespace Scine
102 
103 #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:31
unsigned valenceElectrons() const
Returns the total valence electrons.
const std::array< ElementInfo, 110 > & elementData()
const std::array< double, 110 > & bondRadii()