BALL  1.5.0
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 
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 
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 
151 
158 
165 
171  const Residue* getResidue(Position position) const;
172 
179 
185  const Residue* getResidueByID(String residue_ID) const;
186 
193 
199  const Residue* getNTerminal() const;
200 
207 
213  const Residue* getCTerminal() const;
214 
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 
248 
253 
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 
303 
308 
309  private:
310 
311  // --- ATTRIBUTES
312 
313  String id_;
314  };
315 } // namespace BALL
316 
317 #endif // BALL_KERNEL_PROTEIN_H
BALL::Protein::swap
void swap(Protein &protein)
BALL::Protein::getSecondaryStructure
const SecondaryStructure * getSecondaryStructure(Position position) const
BALL::chains
BALL_EXPORT ChainList chains(const AtomContainer &fragment, bool selected_only=false)
BALL_EXPORT
#define BALL_EXPORT
Definition: COMMON/global.h:50
BALL::Molecule::prepend
void prepend(Atom &atom)
BALL::Protein::countSecondaryStructures
Size countSecondaryStructures() const
BALL::Molecule::insertBefore
void insertBefore(Atom &atom, Composite &before)
BALL::Chain
Definition: chain.h:32
BALL::Protein::countResidues
Size countResidues() const
BALL::Protein::Protein
Protein(const Protein &protein, bool deep=true)
Copy constructor.
BALL_PROTEIN_DEFAULT_ID
#define BALL_PROTEIN_DEFAULT_ID
Definition: protein.h:16
BALL::Molecule::spliceBefore
void spliceBefore(AtomContainer &atom_container)
BALL::Molecule::spliceAfter
void spliceAfter(AtomContainer &atom_container)
BALL::Protein::getSecondaryStructure
SecondaryStructure * getSecondaryStructure(Position position)
BALL::operator!=
BALL_EXPORT bool operator!=(const String &s1, const String &s2)
BALL::Protein::getCTerminal
Residue * getCTerminal()
BALL::Molecule
Definition: molecule.h:31
BALL::SecondaryStructure
Definition: secondaryStructure.h:31
BALL::Protein::getResidueByID
const Residue * getResidueByID(String residue_ID) const
BALL_DECLARE_STD_ITERATOR_WRAPPER
#define BALL_DECLARE_STD_ITERATOR_WRAPPER(container, type, method_name)
Definition: stdIteratorWrapper.h:30
BALL_KERNEL_DEFINE_ITERATOR_CREATORS
#define BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Type)
Definition: iterator.h:25
BALL::Protein::persistentWrite
void persistentWrite(PersistenceManager &pm, const char *name=0) const
BALL_CREATE_DEEP
#define BALL_CREATE_DEEP(name)
Definition: create.h:26
BALL::PersistenceManager
Definition: persistenceManager.h:73
BALL::PDBAtom
Definition: PDBAtom.h:40
BALL::residues
BALL_EXPORT ResidueList residues(const AtomContainer &fragment, bool selected_only=false)
BALL::Residue
Definition: residue.h:38
BALL::Protein::dump
virtual void dump(std::ostream &s=std::cout, Size depth=0) const
BALL::Protein::countPDBAtoms
Size countPDBAtoms() const
BALL::String
Definition: string.h:57
BALL::Protein
Definition: protein.h:30
BALL::Protein::get
void get(Protein &protein, bool deep=true) const
BALL::Protein::~Protein
virtual ~Protein()
Destructor.
BALL
Definition: constants.h:13
BALL::Molecule::insertAfter
void insertAfter(Atom &atom, Composite &after)
BALL::Protein::getPDBAtom
const PDBAtom * getPDBAtom(Position position) const
BALL::Protein::getID
const String & getID() const
BALL::secondaryStructures
BALL_EXPORT SecondaryStructureList secondaryStructures(const AtomContainer &fragment, bool selected_only=false)
BALL::Protein::destroy
virtual void destroy()
BALL::Molecule::splice
void splice(AtomContainer &atom_container)
BALL::Protein::Protein
Protein(const String &name, const String &id=BALL_PROTEIN_DEFAULT_ID)
Detailled constructor.
BALL::Protein::getNTerminal
const Residue * getNTerminal() const
chainIterator.h
BALL::Protein::getNTerminal
Residue * getNTerminal()
BALL::Protein::persistentRead
void persistentRead(PersistenceManager &pm)
BALL_SIZE_TYPE
BALL::Protein::getChain
Chain * getChain(Position position)
BALL::Protein::getChain
const Chain * getChain(Position position) const
BALL::Protein::setID
void setID(const String &id)
BALL::Molecule::remove
bool remove(Atom &atom)
BALL::operator==
BALL_EXPORT bool operator==(const String &s1, const String &s2)
BALL::Protein::set
void set(const Protein &protein, bool deep=true)
BALL::Protein::getResidue
Residue * getResidue(Position position)
BALL::AtomContainer::Property
Property
The number of predefined properties for AtomContainer.
Definition: atomContainer.h:43
BALL::Protein::isValid
virtual bool isValid() const
BALL::Molecule::insert
void insert(Atom &atom)
BALL::Molecule::append
void append(Atom &atom)
BALL::Protein::getPDBAtom
PDBAtom * getPDBAtom(Position position)
BALL::Protein::getCTerminal
const Residue * getCTerminal() const
BALL::Protein::Protein
Protein()
Default constructor.
BALL::Protein::countChains
Size countChains() const
BALL::Protein::clear
virtual void clear()
Clears the contents of the protein.
BALL::Protein::getResidue
const Residue * getResidue(Position position) const
molecule.h
BALL::Protein::getResidueByID
Residue * getResidueByID(String residue_ID)
BALL::Molecule::NUMBER_OF_PROPERTIES
@ NUMBER_OF_PROPERTIES
Definition: molecule.h:45