PProtein.h

Go to the documentation of this file.
00001 /*
00002     LoopTK: Protein Loop Kinematic Toolkit
00003     Copyright (C) 2007 Stanford University
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License along
00016     with this program; if not, write to the Free Software Foundation, Inc.,
00017     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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

Generated on Tue Aug 26 16:06:04 2008 for LoopTK: Protein Loop Kinematic Toolkit by  doxygen 1.5.1