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 
00101   PProteinResidue *getResidueByPdbIndex(int pdbIndex);
00102 
00109   PProtein *getSubchainByPdbIndices(int startPdbIndex, int endPdbIndex);
00110 
00115   int NumBackboneDOFs() const;
00116 
00121   int NumSidechainDOFs() const;
00122 
00126   void RandomizeSidechainAtRes(int resIndex);
00127 
00131   void RandomizeAllSidechains();
00132 
00138   void GetEndEffectors(ProteinSide side, PAtom *&endAtom, PAtom *&endPriorAtom);
00139 
00144   void GetAnchors(ProteinSide side, PAtom *&endAnchor, PAtom *&endPriorAnchor);
00145   
00150   void DisableSidechains();
00151 
00156   void DisableSidechains(int resIndex1, int resIndex2);
00157   
00161   void EnableSidechains();
00162 
00167   void EnableSidechains(int resIndex1, int resIndex2);
00168 
00174   void RotateBackbone(int DOF_index, BondDirection dir, Real numDegrees);
00175 
00180   void RotateSidechain(int DOF_index, float numDegrees);
00181 
00187   PProtein *Clone();
00188 
00192   void RandomizeBackbone();
00193 
00194 protected:
00195   virtual PResidue *CreateResidue(const string &name) {
00196     return new PProteinResidue(this, name);
00197   }
00198 
00199   virtual PResidue *CreateResidue(const string &name, PResidueSpec &spec) {
00200     return new PProteinResidue(this, name, spec); 
00201   }
00202 
00203   virtual PResidue *CreateResidue(const string &name, PResidue *res) {
00204     return new PProteinResidue(this, name, res);
00205   }
00206 
00207   virtual PResidue *CreateResidue(const string &name, PResidueSpec &spec, PResidue *res) {
00208     return new PProteinResidue(this, name, spec, res);
00209   }
00210 };
00211 
00212 
00213 
00214 #endif  // __P_PROTEIN_H

Generated on Wed May 16 20:22:08 2007 for LoopTK: Protein Loop Kinematic Toolkit by  doxygen 1.5.1