BALL 1.5.0
Loading...
Searching...
No Matches
secondaryStructure.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_SECONDARYSTRUCTURE_H
6#define BALL_KERNEL_SECONDARYSTRUCTURE_H
7
8#ifndef BALL_KERNEL_RESIDUE_H
9# include <BALL/KERNEL/residue.h>
10#endif
11
12#ifndef BALL_KERNEL_RESIDUEITERATOR_H
14#endif
15
16#ifndef BALL_KERNEL_ATOMCONTAINER_H
18#endif
19
20namespace BALL
21{
30 : public AtomContainer
31 {
32 public:
33
35
36
39
40
42 enum Type
43 {
55 NUMBER_OF_TYPES
56 };
57
59
60
64
67
69 SecondaryStructure(const SecondaryStructure& secondary_structure, bool deep = true);
70
73
76
78 virtual void clear();
79
81 virtual void destroy();
83
91 bool operator == (const SecondaryStructure& secondary_structure) const;
92
96 bool operator != (const SecondaryStructure& secondary_structure) const;
98
102
106 void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
107
113
117
123 void set(const SecondaryStructure& secondary_structure, bool deep = true);
124
130 SecondaryStructure& operator = (const SecondaryStructure& secondary_structure);
131
137 void get(SecondaryStructure& secondary_structure, bool deep = true) const;
138
142 void swap(SecondaryStructure& secondary_structure);
144
148
150 Type getType() const { return type_; }
151
153 void setType(Type type) { type_ = type; }
154
160
165 const Protein* getProtein() const;
166
172
177 const Chain* getChain() const;
178
185
191 const Residue* getResidue(Position position) const;
192
199
205 const Residue* getNTerminal() const;
206
213
219 const Residue* getCTerminal() const;
220
227
233 const PDBAtom* getPDBAtom(Position position) const;
234
239
244
248 void prepend(Residue& residue);
249
253 void append(Residue& residue);
254
258 void insert(Residue& residue);
259
264 void insertBefore(Residue& residue, Composite& before);
265
270 void insertAfter(Residue& residue, Composite& after);
271
275 bool remove(Residue& residue);
276
281 void spliceBefore(SecondaryStructure& secondary_structure);
282
287 void spliceAfter(SecondaryStructure& secondary_structure);
288
292 void splice(SecondaryStructure& secondary_structure);
294
298
303 virtual bool isValid() const;
304
311 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
312
314
315 // --- EXTERNAL ITERATORS
316
319
322
323 protected:
324
327
328 private:
329
330 Fragment* getFragment(Position position);
331
332 const Fragment* getFragment(Position position) const;
333
334 Atom* getAtom(Position position);
335
336 const Atom* getAtom(Position position) const;
337
338 void prepend(Atom& atom);
339
340 void append(Atom& atom);
341
342 void insert(Atom& atom);
343
344 void insertBefore(Atom& atom, Composite& before);
345
346 void insertAfter(Atom& atom, Composite& after);
347
348 bool remove(Atom& atom);
349
350 void prepend(AtomContainer& atom_container);
351
352 void append(AtomContainer& atom_container);
353
354 void insert(AtomContainer& atom_container);
355
356 void insertBefore(AtomContainer& atom_container, Composite& before);
357
358 void insertAfter(AtomContainer& atom_container, Composite& after);
359
360 void spliceBefore(AtomContainer& atom_container);
361
362 void spliceAfter(AtomContainer& atom_container);
363
364 void splice(AtomContainer& atom_container);
365
366 bool remove(AtomContainer& atom_container);
367
370 };
371
372} // namespace BALL
373
374#endif // BALL_KERNEL_SECONDARYSTRUCTURE_H
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition iterator.h:25
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
#define BALL_CREATE_DEEP(name)
Definition create.h:26
SecondaryStructure(const SecondaryStructure &secondary_structure, bool deep=true)
Copy constructor.
void spliceAfter(SecondaryStructure &secondary_structure)
const Chain * getChain() const
void append(Residue &residue)
Type type_
The secondary structure type (helix, strand, coil, turn)
virtual ~SecondaryStructure()
Destructor.
Type getType() const
Return the type of secondary structure.
void splice(SecondaryStructure &secondary_structure)
virtual void destroy()
Clear the contents of the secondary structure and remove it from all composite structures.
Size countPDBAtoms() const
void persistentRead(PersistenceManager &pm)
bool remove(Residue &residue)
PDBAtom * getPDBAtom(Position position)
void insertAfter(Residue &residue, Composite &after)
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
const PDBAtom * getPDBAtom(Position position) const
SecondaryStructure(const String &name)
const Residue * getNTerminal() const
Residue * getResidue(Position position)
void swap(SecondaryStructure &secondary_structure)
void spliceBefore(SecondaryStructure &secondary_structure)
void set(const SecondaryStructure &secondary_structure, bool deep=true)
const Residue * getCTerminal() const
virtual void clear()
Clear the contents of the secondary structure.
void prepend(Residue &residue)
Size countResidues() const
void insertBefore(Residue &residue, Composite &before)
const Protein * getProtein() const
const Residue * getResidue(Position position) const
void persistentWrite(PersistenceManager &pm, const char *name=0) const
void insert(Residue &residue)
SecondaryStructure()
Default constructor.
void setType(Type type)
Set the type of secondary structure.
virtual bool isValid() const
void get(SecondaryStructure &secondary_structure, bool deep=true) const
#define BALL_EXPORT