PChainNavigator.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 PCHAIN_NAV
00021 #define PCHAIN_NAV
00022 
00023 #include "PBasic.h"
00024 #include "PResources.h"
00025 #include "PIKAlgorithms.h"
00026 #include "PLibraries.h"
00027 #include "PExtension.h"
00028 
00029 class PChainNavigator: public GLUINavigationProgram {
00030   public:
00031 
00035     PChainNavigator(PProtein *p);
00036  
00040    PChainNavigator(PProtein *protein, PProtein *subchain);
00041     
00046     ~PChainNavigator() {
00047       delete m_chain;
00048       PResources::FreeResources();
00049     }
00050 
00054     virtual bool Initialize();
00055 
00059     void RenderWorld();
00060 
00064     void Handle_Keypress(unsigned char key, int x, int y);
00065 
00066   private:
00067     void ConstructorHelper(PProtein *chain, PProtein *manipulate);
00068     void FindCenteringTranslate();
00069     void FindBoundingBox();
00070     
00071     /*
00072      * This method will move current atom path inward, so please press
00073      * 'I', 'O', 'R' first to see the effect.
00074      */
00075     void MovePathInward();
00076     
00077     /* Drawing helper methods. */
00078     void CenterWorld();
00079     void RenderLight();
00080     void RenderProtein();
00081     void RenderOccupancy();
00082 
00083     /* Private member variables. */
00084     GLUI *glui;
00085 
00086     PProtein *m_chain;
00087     PProtein *m_manipulate;
00088 
00089     pair<Vector3, Vector3> m_boundingBox;
00090     int m_curX, m_curY, m_curZ;
00091 
00092     bool m_onlyBackbone;
00093     bool m_noLoop;
00094     bool m_showProtein;
00095     int m_showOccupancy;
00096 
00097     bool m_residueHighlight;
00098     
00099     PProteinCCDSolver *m_ccd;
00100     Vector3 m_centeringTranslate;
00101     //backbone
00102     int m_index;
00103     //sidechain
00104     int m_side_index;
00105     //residue
00106     int m_residue_index;
00107     int m_autoTweakTimes;  
00108     int m_animateIndex;    
00109   
00110 };
00111 
00112 #endif

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