Victor
 All Data Structures Functions Variables Friends Pages
Ligand.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 
18 #ifndef _Ligand_H_
19 #define _Ligand_H_
20 
21 
22 // Includes:
23 #include <Bond.h>
24 #include <Polymer.h>
25 #include <Group.h>
26 #include <Visitor.h>
27 #include <AminoAcidCode.h>
28 #include <NucleotideCode.h>
29 
30 // Global constants, typedefs, etc. (to avoid):
31 
32 namespace Victor { namespace Biopool {
33 
38  class Ligand : public Group {
39  public:
40 
41  // CONSTRUCTORS/DESTRUCTOR:
42  Ligand();
43  Ligand(const Ligand& orig);
44  virtual ~Ligand();
45 
46  virtual string getClassName() const {
47  return "Ligand";
48  }
49 
50  // PREDICATES:
51  bool isMetalCompound();
52  bool isCommonMetal();
53 
54  bool isSimpleMetalIon(); //so I introduced thoose to distinguish between
55  bool isWater(); //water, metal ions and other cofactors
56  bool isCofactor();
57  virtual void save(Saver& s); // data saver
58 
59 
60  // MODIFIERS:
61  void copy(const Ligand& orig);
62 
63  virtual void load(Loader& l); // data loader
64 
65  // OPERATORS:
66  Ligand& operator=(const Ligand& orig);
67  virtual Atom& operator[](unsigned int n);
68  virtual const Atom& operator[](unsigned int n) const;
69 
70 
71  protected:
72  // HELPERS:
73 
74  // ATTRIBUTES:
75 
76  private:
77  };
78 
79  // ---------------------------------------------------------------------------
80  // Ligand
81  // -----------------x-------------------x-------------------x-----------------
82 
83  // PREDICATES:
84 
85  inline void
86  Ligand::save(Saver& s) {
87  s.saveLigand(*this);
88  }
89 
90  // MODIFIERS:
91 
92  inline void
93  Ligand::load(Loader& l) {
94  l.loadLigand(*this);
96  }
97 
98 
99  // OPERATORS:
100 
101  inline Atom&
102  Ligand::operator[](unsigned int n) {
103  return Group::operator[](n);
104  }
105 
106  inline const Atom&
107  Ligand::operator[](unsigned int n) const {
108  return Group::operator[](n);
109  }
110 
111 
112 }} //namespace
113 #endif //_Ligand_H_
114 
Base class for saving components (Atoms, Groups, etc.).
Definition: Saver.h:39
bool isSimpleMetalIon()
Definition: Ligand.cc:194
Ligand & operator=(const Ligand &orig)
Definition: Ligand.cc:243
This class implements a simple chemical group.
Definition: Group.h:35
void resetBoundaries()
Definition: Group.cc:50
Base class for loading components (Atoms, Groups, etc.).
Definition: Loader.h:39
void copy(const Ligand &orig)
Definition: Ligand.cc:232
bool isWater()
Definition: Ligand.cc:178
Implements a simple atom type.
Definition: Atom.h:39
Implements methods to verify the ligand properties.
Definition: Ligand.h:38
bool isCofactor()
Definition: Ligand.cc:186
bool isMetalCompound()
Definition: Ligand.cc:47