indigoX
residue.hpp
Go to the documentation of this file.
1 
2 #include "../utils/fwd_declares.hpp"
3 
4 #include <EASTL/vector_set.h>
5 #include <vector>
6 
7 #ifndef INDIGOX_CLASSES_RESIDUE_HPP
8 #define INDIGOX_CLASSES_RESIDUE_HPP
9 
10 namespace indigox {
11  class Residue {
12  friend class cereal::access;
13  friend class Molecule;
14 
15  public:
16  using ResidueAtoms = eastl::vector_set<Atom>;
17 
18  public:
19  enum class Type {
21  AminoAcid,
23  Sugar,
24  Lipid,
26  };
27 
28  private:
29  template <typename Archive>
30  void serialise(Archive &archive, const uint32_t version);
31 
32  private:
33  Residue(const std::vector<Atom> &atoms, const Molecule &mol);
34 
35  public:
38 
39  public:
40  bool HasAtom(const Atom &atom) const;
47  Type GetType();
48 
65  bool IsAminoAcid();
66  bool IsAlphaAminoAcid();
67  bool IsBetaAminoAcid();
68  bool IsGammaAminoAcid();
69  bool IsDeltaAminoAcid();
70  bool IsSugar();
71  bool IsLipid();
72  bool IsNucleicAcid();
73  const ResidueAtoms &GetAtoms() const;
74 
75  private:
76  struct Impl;
77  std::shared_ptr<Impl> m_data;
78  };
79 
81 } // namespace indigox
82 
83 /*
84  struct Residue::Impl {
85  ResidueType type;
86  ResidueAtoms atoms;
87  Molecule molecule;
88  graph::MolecularGraph residue_graph;
89 
90  template <typename Archive>
91  void serialise(Archive &archive, const uint32_t version);
92 
93  Impl() = default;
94  Impl(const std::vector<Atom> &atms, const Molecule &mol);
95  };
96  */
97 
98 #endif /* INDIGOX_CLASSES_RESIDUE_HPP */
#define INDIGOX_GENERIC_PIMPL_CLASS_DEFAULTS(class_name)
Definition: fwd_declares.hpp:18
Definition: atom.hpp:13
Type
Definition: residue.hpp:19
Definition: residue.hpp:11
Residue()=default
bool HasAtom(const Atom &atom) const
Definition: molecule_impl.hpp:113
bool IsAminoAcid()
Determine if the residue is an amino acid.
bool IsDeltaAminoAcid()
Namespace for all graph related functionality.
Definition: access.hpp:7
friend class cereal::access
Definition: residue.hpp:12
bool IsAlphaAminoAcid()
const ResidueAtoms & GetAtoms() const
Definition: molecule.hpp:15
#define INDIGOX_GENERIC_PIMPL_CLASS_OPERATORS(class_name, short_name)
Definition: fwd_declares.hpp:26
bool IsGammaAminoAcid()
bool IsBetaAminoAcid()
eastl::vector_set< Atom > ResidueAtoms
Definition: residue.hpp:16
Type GetType()
Determine the type of the residue.