PProteinResidue.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 __PPROTEIN_RESIDUE_H
00021 #define __PPROTEIN_RESIDUE_H
00022 
00023 #include "PResidue.h"
00024 #include "PBasic.h"
00025 
00026 using namespace std;
00027 class PProtein;
00028 
00029 
00038 class PProteinResidue: public PResidue {
00039  public:
00040   PProteinResidue(PProtein *loop, const string &shellName): PResidue((PChain *) loop,shellName) {currRot=0;}
00041 
00042   PProteinResidue(PProtein *loop, const string &shellName, PResidueSpec &spec): PResidue((PChain *) loop,shellName,spec) 
00043 {currRot=0;}
00044 
00045   PProteinResidue(PProtein *loop, const string &shellName, PResidue *toConnect): PResidue((PChain *) loop,shellName,toConnect) 
00046 {currRot=0;}
00047 
00048   PProteinResidue(PProtein *loop, const string &shellName, PResidueSpec &spec, PResidue *toConnect): PResidue((PChain *) 
00049 loop,shellName,spec,toConnect) 
00050 {currRot=0;}
00051 
00055   PProteinResidue *NextResidue() { return (PProteinResidue *) PResidue::NextResidue(); }
00056 
00060   PProteinResidue *PreviousResidue() { return (PProteinResidue *) PResidue::PreviousResidue(); }
00061 
00065   PProtein *getProtein() { return (PProtein *) PResidue::getChain(); } 
00066 
00071   void ResetSideChain();
00072 
00077   bool ApplyRotamer();
00078 
00083   bool ApplyRotamer(int index);
00084 
00088   void SaveSideChain();
00089 
00090 
00091 
00096   Real GetPhi();
00097 
00098 
00103   Real GetPsi();
00104 
00109   void SetChi(Real chi, int index);
00110 
00115   Real GetChi(int index);
00116 
00117  private:
00118 
00119   //given list of chi angles, rotate side chain and check for collision.
00120   bool TryApplyRotamer(const vector<Real> &rotamer);
00121 
00122   //use by rotamer
00123   unsigned currRot;
00124   vector<Real> originalAngle;
00125 
00126 };
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 #endif

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