BALL 1.5.0
Loading...
Searching...
No Matches
chain.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_CHAIN_H
6#define BALL_KERNEL_CHAIN_H
7
8#ifndef BALL_KERNEL_RESIDUE_H
9# include <BALL/KERNEL/residue.h>
10#endif
11
12#ifndef BALL_KERNEL_SECONDARYSTRUCTUREITERATOR_H
14#endif
15
16
17#define BALL_CHAIN_DEFAULT_NAME ' '
18
19namespace BALL
20{
21 class Protein;
22
31 : public AtomContainer
32 {
33 public:
34
36
37
40
41
44 {
45 NUMBER_OF_PROPERTIES = AtomContainer::NUMBER_OF_PROPERTIES
46 };
47
49
52
55
57 Chain(const Chain& chain, bool deep = true);
58
60 Chain(const String& name);
61
63 virtual ~Chain();
64
66
69
73 void persistentWrite(PersistenceManager& pm, const char* name = 0) const;
74
79
81
84
90 void set(const Chain& chain, bool deep = true);
91
98 Chain& operator = (const Chain& chain);
99
105 void get(Chain& chain, bool deep = true) const;
106
110 void swap(Chain& chain);
111
113
118 bool operator == (const Chain& chain) const;
119
123 bool operator != (const Chain& chain) const;
124
125
129
135
140 const Protein* getProtein() const;
141
149
157
164
170 const Residue* getResidue(Position position) const;
171
178
184 const Residue* getNTerminal() const;
185
192
198 const Residue* getCTerminal() const;
199
206
212 const PDBAtom* getPDBAtom(Position position) const;
213
218
223
228
232 void prepend(SecondaryStructure& secondary_structure);
233
237 void append(SecondaryStructure& secondary_structure);
238
242 void insert(SecondaryStructure& secondary_structure);
243
248 void insertBefore(SecondaryStructure& secondary_structure, Composite& before);
249
254 void insertAfter(SecondaryStructure& secondary_structure, Composite& after);
255
259 bool remove(SecondaryStructure& secondary_structure);
260
264 void prepend(Residue& residue);
265
269 void append(Residue& residue);
270
274 void insert(Residue& residue);
275
280 void insertBefore(Residue& residue, Composite& before);
281
286 void insertAfter(Residue& residue, Composite& after);
287
291 bool remove(Residue& residue);
292
296 void spliceBefore(Chain& chain);
297
301 void spliceAfter(Chain &chain);
302
306 void splice(Chain &chain);
307
309
313 virtual bool isChain() const { return true; }
315
319
326 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const
327;
328
330
331 // --- EXTERNAL ITERATORS
332
336
340
341 protected:
342
343 private:
344 AtomContainer* getAtomContainer(Position position);
345
346 const AtomContainer* getAtomContainer(Position position) const;
347
348 Atom* getAtom(Position position);
349
350 const Atom* getAtom(Position position) const;
351
352 void prepend(Atom& atom);
353
354 void append(Atom& atom);
355
356 void insert(Atom& atom);
357
358 void insertBefore(Atom& atom, Composite& before);
359
360 void insertAfter(Atom& atom, Composite& after);
361
362 bool remove(Atom& atom);
363
364 void prepend(AtomContainer& atom_container);
365
366 void append(AtomContainer& atom_container);
367
368 void insert(AtomContainer& atom_container);
369
370 void insertBefore(AtomContainer& atom_container, Composite& before);
371
372 void insertAfter(AtomContainer& atom_container, Composite& after);
373
374 void spliceBefore(AtomContainer& atom_container);
375
376 void spliceAfter(AtomContainer& atom_container);
377
378 void splice(AtomContainer& atom_container);
379
380 bool remove(AtomContainer& atom_container);
381
384 };
385} // namespace BALL
386
387#endif // BALL_KERNEL_CHAIN_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
void insert(SecondaryStructure &secondary_structure)
bool remove(SecondaryStructure &secondary_structure)
void insertAfter(SecondaryStructure &secondary_structure, Composite &after)
void insertBefore(SecondaryStructure &secondary_structure, Composite &before)
void set(const Chain &chain, bool deep=true)
virtual bool isChain() const
Definition chain.h:313
Chain(const Chain &chain, bool deep=true)
Copy constructor.
void spliceAfter(Chain &chain)
Size countPDBAtoms() const
Residue * getCTerminal()
PDBAtom * getPDBAtom(Position position)
void splice(Chain &chain)
void persistentRead(PersistenceManager &pm)
void append(SecondaryStructure &secondary_structure)
void insertBefore(Residue &residue, Composite &before)
const Protein * getProtein() const
void append(Residue &residue)
bool remove(Residue &residue)
void insert(Residue &residue)
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
SecondaryStructure * getSecondaryStructure(Position position)
Size countResidues() const
virtual ~Chain()
Destructor.
void prepend(Residue &residue)
void swap(Chain &chain)
void spliceBefore(Chain &chain)
Residue * getNTerminal()
void get(Chain &chain, bool deep=true) const
void persistentWrite(PersistenceManager &pm, const char *name=0) const
const SecondaryStructure * getSecondaryStructure(Position position) const
const PDBAtom * getPDBAtom(Position position) const
void insertAfter(Residue &residue, Composite &after)
void prepend(SecondaryStructure &secondary_structure)
const Residue * getResidue(Position position) const
const Residue * getCTerminal() const
Chain(const String &name)
Detailled constructor.
const Residue * getNTerminal() const
Chain()
Default constrcutor.
Protein * getProtein()
Size countSecondaryStructures() const
Residue * getResidue(Position position)
#define BALL_EXPORT