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 
00098   void SetPhi(Real phi);
00099 
00104   Real GetPhi();
00105 
00113   void SetPsi(Real psi);
00114 
00119   Real GetPsi();
00120 
00125   void SetChi(Real chi, int index);
00126 
00131   Real GetChi(int index);
00132 
00133  private:
00134 
00135   //given list of chi angles, rotate side chain and check for collision.
00136   bool TryApplyRotamer(const vector<Real> &rotamer);
00137 
00138   //use by rotamer
00139   unsigned currRot;
00140   vector<Real> originalAngle;
00141 
00142 };
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00151 
00152 
00153 
00154 
00155 
00156 
00157 
00158 
00159 #endif

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