BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
protein.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_KERNEL_PROTEIN_H
6 #define BALL_KERNEL_PROTEIN_H
7 
8 #ifndef BALL_KERNEL_CHAINITERATOR_H
10 #endif
11 
12 #ifndef BALL_KERNEL_MOLECULE_H
13 # include <BALL/KERNEL/molecule.h>
14 #endif
15 
16 #define BALL_PROTEIN_DEFAULT_ID ""
17 
18 namespace BALL
19 {
29  : public Molecule
30  {
31  public:
32 
34 
35 
38 
39 
41  enum Property
42  {
43  NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES
44  };
45 
47 
50 
52  Protein();
53 
55  Protein(const Protein& protein, bool deep = true);
56 
58  Protein(const String& name, const String& id = BALL_PROTEIN_DEFAULT_ID);
59 
61  virtual ~Protein();
62 
64  virtual void clear();
65 
66  /* Clears the contents of the protein and removes it from all composite structures.
67  */
68  virtual void destroy();
69 
71 
74 
78  void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
79 
83  void persistentRead(PersistenceManager& pm);
84 
86 
89 
95  void set(const Protein& protein, bool deep = true);
96 
101  Protein& operator = (const Protein& protein);
102 
107  void get(Protein& protein, bool deep = true) const;
108 
112  void swap(Protein& protein);
113 
115 
120  bool operator == (const Protein& protein) const;
121 
125  bool operator != (const Protein& protein) const;
126 
130 
136  Chain* getChain(Position position);
137 
143  const Chain* getChain(Position position) const;
144 
150  SecondaryStructure* getSecondaryStructure(Position position);
151 
157  const SecondaryStructure* getSecondaryStructure(Position position) const;
158 
164  Residue* getResidue(Position position);
165 
171  const Residue* getResidue(Position position) const;
172 
178  Residue* getResidueByID(String residue_ID);
179 
185  const Residue* getResidueByID(String residue_ID) const;
186 
193 
199  const Residue* getNTerminal() const;
200 
207 
213  const Residue* getCTerminal() const;
214 
220  PDBAtom* getPDBAtom(Position position);
221 
227  const PDBAtom* getPDBAtom(Position position) const;
228 
232  void setID(const String& id);
233 
237  const String& getID() const;
238 
242  Size countChains() const;
243 
247  Size countSecondaryStructures() const;
248 
252  Size countResidues() const;
253 
257  Size countPDBAtoms() const;
258 
260 
261  using Molecule::prepend;
262  using Molecule::append;
263  using Molecule::insert;
265  using Molecule::insertAfter;
266  using Molecule::remove;
267  using Molecule::splice;
269  using Molecule::spliceAfter;
270 
274 
279  virtual bool isValid() const;
280 
287  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
288 
290 
291  // --- EXTERNAL ITERATORS
292 
297 
298 
299  private:
300 
301  // --- ATTRIBUTES
302 
303  String id_;
304  };
305 } // namespace BALL
306 
307 #endif // BALL_KERNEL_PROTEIN_H