00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_KERNEL_PROTEIN_H
00008 #define BALL_KERNEL_PROTEIN_H
00009
00010 #ifndef BALL_KERNEL_CHAINITERATOR_H
00011 # include <BALL/KERNEL/chainIterator.h>
00012 #endif
00013
00014 #ifndef BALL_KERNEL_MOLECULE_H
00015 # include <BALL/KERNEL/molecule.h>
00016 #endif
00017
00018 #define BALL_PROTEIN_DEFAULT_ID ""
00019
00020 namespace BALL
00021 {
00030 class BALL_EXPORT Protein
00031 : public Molecule
00032 {
00033 public:
00034
00035 BALL_CREATE_DEEP(Protein)
00036
00037
00040
00041
00043 enum Property
00044 {
00045 NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES
00046 };
00047
00049
00052
00054 Protein();
00055
00057 Protein(const Protein& protein, bool deep = true);
00058
00060 Protein(const String& name, const String& id = BALL_PROTEIN_DEFAULT_ID);
00061
00063 virtual ~Protein();
00064
00066 virtual void clear();
00067
00068
00069
00070 virtual void destroy();
00071
00073
00076
00080 void persistentWrite(PersistenceManager& pm, const char* name = 0) const
00081 throw(Exception::GeneralException);
00082
00086 void persistentRead(PersistenceManager& pm)
00087 throw(Exception::GeneralException);
00088
00090
00093
00099 void set(const Protein& protein, bool deep = true);
00100
00105 Protein& operator = (const Protein& protein);
00106
00111 void get(Protein& protein, bool deep = true) const;
00112
00116 void swap(Protein& protein);
00117
00119
00124 bool operator == (const Protein& protein) const;
00125
00129 bool operator != (const Protein& protein) const;
00130
00134
00140 Chain* getChain(Position position);
00141
00147 const Chain* getChain(Position position) const;
00148
00154 SecondaryStructure* getSecondaryStructure(Position position);
00155
00161 const SecondaryStructure* getSecondaryStructure(Position position) const;
00162
00168 Residue* getResidue(Position position);
00169
00175 const Residue* getResidue(Position position) const;
00176
00182 Residue* getNTerminal();
00183
00189 const Residue* getNTerminal() const;
00190
00196 Residue* getCTerminal();
00197
00203 const Residue* getCTerminal() const;
00204
00210 PDBAtom* getPDBAtom(Position position);
00211
00217 const PDBAtom* getPDBAtom(Position position) const;
00218
00222 void setID(const String& id);
00223
00227 const String& getID() const;
00228
00232 Size countChains() const;
00233
00237 Size countSecondaryStructures() const;
00238
00242 Size countResidues() const;
00243
00247 Size countPDBAtoms() const;
00248
00250
00251 #ifdef BALL_CFG_USING_METHOD_DIRECTIVE
00252 using Molecule::prepend;
00253 using Molecule::append;
00254 using Molecule::insert;
00255 using Molecule::insertBefore;
00256 using Molecule::insertAfter;
00257 using Molecule::remove;
00258 using Molecule::splice;
00259 using Molecule::spliceBefore;
00260 using Molecule::spliceAfter;
00261 #else
00262 Molecule::prepend;
00263 Molecule::append;
00264 Molecule::insert;
00265 Molecule::insertBefore;
00266 Molecule::insertAfter;
00267 Molecule::remove;
00268 Molecule::splice;
00269 Molecule::spliceBefore;
00270 Molecule::spliceAfter;
00271 #endif
00272
00276
00281 virtual bool isValid() const;
00282
00289 virtual void dump(std::ostream& s = std::cout, Size depth = 0) const;
00290
00292
00293
00294
00295 BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Chain)
00296 BALL_KERNEL_DEFINE_ITERATOR_CREATORS(SecondaryStructure)
00297 BALL_KERNEL_DEFINE_ITERATOR_CREATORS(Residue)
00298 BALL_KERNEL_DEFINE_ITERATOR_CREATORS(PDBAtom)
00299
00300
00301 private:
00302
00303
00304
00305 String id_;
00306 };
00307 }
00308
00309 #endif // BALL_KERNEL_PROTEIN_H