00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __P_PROTEIN_H
00021 #define __P_PROTEIN_H
00022
00023 #include "PChain.h"
00024 #include "PProteinResidue.h"
00025
00026
00048 class PProtein: public PChain {
00049 public:
00050
00054 PProtein();
00055
00060 PProtein(const string &firstResidueName);
00061
00066 PProtein(const string &firstResidueName, PResidueSpec &firstResidueSpec);
00067
00073 PProtein(PProtein *protein, int resStartIndex, int resEndIndex);
00074
00079 PProtein(int numResidues);
00080
00085 PProtein *getParent() { return (PProtein *) PChain::getParent(); }
00086
00090 PProtein *getTopLevelProtein();
00091
00095 PProteinResidue *getResidue(int localIndex) { return (PProteinResidue *) PChain::getResidue(localIndex); }
00096
00100 int pdbIndexToLocalIndex(int pdb_index);
00101
00106 PProteinResidue *getResidueByPdbIndex(int pdbIndex);
00107
00114 PProtein *getSubchainByPdbIndices(int startPdbIndex, int endPdbIndex);
00115
00120 int NumBackboneDOFs() const;
00121
00126 int NumSidechainDOFs() const;
00127
00131 void RandomizeSidechainAtRes(int resIndex);
00132
00136 void RandomizeAllSidechains();
00137
00143 void GetEndEffectors(ProteinSide side, PAtom *&endAtom, PAtom *&endPriorAtom);
00144
00149 void GetAnchors(ProteinSide side, PAtom *&endAnchor, PAtom *&endPriorAnchor);
00150
00155 void DisableSidechains();
00156
00161 void DisableSidechains(int resIndex1, int resIndex2);
00162
00166 void EnableSidechains();
00167
00172 void EnableSidechains(int resIndex1, int resIndex2);
00173
00179 void RotateBackbone(int DOF_index, BondDirection dir, Real numDegrees);
00180
00185 void RotateSidechain(int DOF_index, float numDegrees);
00186
00192 PProtein *Clone();
00193
00197 void RandomizeBackbone();
00198
00203 PProtein *getChildProtein(unsigned int index) {
00204 return (PProtein *) getChild(index);
00205 }
00206
00210 void printCollision();
00211
00212 protected:
00213 virtual PResidue *CreateResidue(const string &name) {
00214 return new PProteinResidue(this, name);
00215 }
00216
00217 virtual PResidue *CreateResidue(const string &name, PResidueSpec &spec) {
00218 return new PProteinResidue(this, name, spec);
00219 }
00220
00221 virtual PResidue *CreateResidue(const string &name, PResidue *res) {
00222 return new PProteinResidue(this, name, res);
00223 }
00224
00225 virtual PResidue *CreateResidue(const string &name, PResidueSpec &spec, PResidue *res) {
00226 return new PProteinResidue(this, name, spec, res);
00227 }
00228
00229 };
00230
00231
00232
00233 #endif // __P_PROTEIN_H