BALL  1.4.79
 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 
273  virtual bool isProtein() const { return true; }
276 
280 
285  virtual bool isValid() const;
286 
293  virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
294 
296 
297  // --- EXTERNAL ITERATORS
298 
300  BALL_KERNEL_DEFINE_ITERATOR_CREATORS(SecondaryStructure)
303 
305  BALL_DECLARE_STD_ITERATOR_WRAPPER(Protein, SecondaryStructure, secondaryStructures)
307  BALL_DECLARE_STD_ITERATOR_WRAPPER(Protein, PDBAtom, pdbAtoms)
308 
309  private:
310 
311  // --- ATTRIBUTES
312 
313  String id_;
314  };
315 } // namespace BALL
316 
317 #endif // BALL_KERNEL_PROTEIN_H
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition: iterator.h:25
void spliceBefore(AtomContainer &atom_container)
void spliceAfter(AtomContainer &atom_container)
BALL_EXPORT SecondaryStructureList secondaryStructures(const AtomContainer &fragment, bool selected_only=false)
void splice(AtomContainer &atom_container)
const Residue * getNTerminal(const ResidueContainerType &residue_container)
Definition: residue.h:444
void insertBefore(Atom &atom, Composite &before)
void insertAfter(Atom &atom, Composite &after)
#define BALL_PROTEIN_DEFAULT_ID
Definition: protein.h:16
void insert(Atom &atom)
const Residue * getCTerminal(const ResidueContainerType &residue_container)
Definition: residue.h:459
Property
The number of predefined properties for AtomContainer.
Definition: atomContainer.h:42
BALL_EXPORT ChainList chains(const AtomContainer &fragment, bool selected_only=false)
BALL_EXPORT ResidueList residues(const AtomContainer &fragment, bool selected_only=false)
void append(Atom &atom)
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
#define BALL_CREATE_DEEP(name)
Definition: create.h:26
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
void prepend(Atom &atom)
BALL_SIZE_TYPE Size
BALL_EXPORT bool operator==(const String &s1, const String &s2)
#define BALL_EXPORT
Definition: COMMON/global.h:50
bool remove(Atom &atom)