indigoX
angle.hpp
Go to the documentation of this file.
1 
3 #include "../utils/fwd_declares.hpp"
4 
5 #include <array>
6 #include <memory>
7 
8 #ifndef INDIGOX_CLASSES_ANGLE_HPP
9 #define INDIGOX_CLASSES_ANGLE_HPP
10 
11 namespace indigox {
12  class Angle {
14  friend class indigox::Molecule;
16  friend class cereal::access;
17 
18  public:
20  using AngleAtoms = std::array<Atom, 3>;
21 
22  private:
23  template <typename Archive>
24  void serialise(Archive &archive, const uint32_t version);
25 
26  public:
29 
30  private:
36  Angle(const Atom &a, const Atom &b, const Atom &c, const Molecule &m);
37 
38  public:
41  bool HasType() const;
42 
45  constexpr int64_t NumAtoms() const { return 3; }
46 
52  int64_t GetTag() const;
53 
54  int64_t GetID() const;
55 
60  const Molecule &GetMolecule() const;
61 
64  const AngleAtoms &GetAtoms() const;
65 
71  int64_t GetIndex() const;
72 
75  const FFAngle &GetType() const;
76 
79  void SetType(const FFAngle &type);
80 
81  private:
82  void Reset();
83 
84  private:
85  struct Impl;
86  std::shared_ptr<Impl> m_data;
87  };
88 } // namespace indigox
89 
90 #endif /* INDIGOX_CLASSES_ANGLE_HPP */
#define INDIGOX_GENERIC_PIMPL_CLASS_DEFAULTS(class_name)
Definition: fwd_declares.hpp:18
Angle()=default
bool HasType() const
Check if the angle has associated parameters.
friend class cereal::access
Friendship allows serialisation.
Definition: angle.hpp:16
Definition: atom.hpp:13
int64_t GetID() const
const FFAngle & GetType() const
Get the assigned type.
const Molecule & GetMolecule() const
Molecule this angle is associated with.
Namespace for all graph related functionality.
Definition: access.hpp:7
Definition: angle.hpp:12
constexpr int64_t NumAtoms() const
Number of atoms this angle contains.
Definition: angle.hpp:45
const AngleAtoms & GetAtoms() const
Get the atoms of the angle.
std::array< Atom, 3 > AngleAtoms
Container for storing Atom reference assigned to an Angle.
Definition: angle.hpp:20
int64_t GetIndex() const
Get the index from the molecule.
void SetType(const FFAngle &type)
Assign an FFAngle type.
Definition: molecule.hpp:15
int64_t GetTag() const
Tag of the angle.
#define INDIGOX_GENERIC_PIMPL_CLASS_OPERATORS(class_name, short_name)
Definition: fwd_declares.hpp:26
Definition: forcefield.hpp:151