BALL  1.4.1
molecularStructure.h
Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
00006 #define BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
00007 
00008 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
00009 # include <BALL/VIEW/KERNEL/modularWidget.h>
00010 #endif
00011 
00012 #ifndef BALL_MATHS_VECTOR3_H
00013  #include <BALL/MATHS/vector3.h>
00014 #endif
00015 
00016 #ifndef BALL_VIEW_DIALOGS_AMBERCONFIGURATIONDIALOG_H
00017  #include <BALL/VIEW/DIALOGS/amberConfigurationDialog.h>
00018 #endif
00019 
00020 #ifndef BALL_VIEW_DIALOGS_MINIMIZATIONDIALOG_H
00021 # include <BALL/VIEW/DIALOGS/minimizationDialog.h>
00022 #endif
00023 
00024 #ifndef BALL_VIEW_DIALOGS_MOLECULARDYNAMICSDIALOG_H
00025 # include <BALL/VIEW/DIALOGS/molecularDynamicsDialog.h>
00026 #endif
00027 
00028 #ifndef BALL_VIEW_DIALOGS_CHARMMCONFIGURATIONDIALOG_H
00029 # include <BALL/VIEW/DIALOGS/charmmConfigurationDialog.h>
00030 #endif
00031 
00032 #ifndef BALL_VIEW_DIALOGS_MMFF94CONFIGURATIONDIALOG_H
00033 # include <BALL/VIEW/DIALOGS/MMFF94ConfigurationDialog.h>
00034 #endif
00035 
00036 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERCONFIGURATIONDIALOG_H
00037 # include <BALL/VIEW/DIALOGS/assignBondOrderConfigurationDialog.h>
00038 #endif
00039 
00040 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERRESULTSDIALOG_H
00041 # include <BALL/VIEW/DIALOGS/assignBondOrderResultsDialog.h>
00042 #endif
00043 
00044 #ifndef BALL_MOLMEC_AMBER_AMBER_H
00045 # include <BALL/MOLMEC/AMBER/amber.h>
00046 #endif
00047 
00048 #ifndef BALL_MOLMEC_CHARMM_CHARMM_H
00049 # include <BALL/MOLMEC/CHARMM/charmm.h>
00050 #endif
00051 
00052 #ifndef BALL_MOLMEC_MMFF94_MMFF94
00053 # include <BALL/MOLMEC/MMFF94/MMFF94.h>
00054 #endif
00055 
00056 
00057 #include <QtGui/QWidget>
00058 
00059 namespace BALL
00060 {
00061   class Composite;
00062 
00063   namespace VIEW
00064   {
00065     class FDPBDialog;
00066 
00086     class BALL_VIEW_EXPORT MolecularStructure
00087       : public QWidget, 
00088         public ModularWidget
00089     {
00090       Q_OBJECT
00091 
00092       public:
00093 
00094       BALL_EMBEDDABLE(MolecularStructure, ModularWidget)
00095 
00096       
00097       enum
00098       {
00100         AMBER_FF = 0,
00101 
00103         CHARMM_FF,
00104 
00106         MMFF94_FF
00107       };
00108       
00112 
00117       MolecularStructure(QWidget* parent = 0, const char* name = 0);
00118       
00120       MolecularStructure(const MolecularStructure& m);
00121       
00123 
00126 
00129       virtual ~MolecularStructure();
00130 
00132 
00135 
00146       virtual void onNotify(Message *message);
00147 
00154       virtual void checkMenu(MainControl& main_control);
00155 
00162       virtual void initializeWidget(MainControl& main_control);
00163     
00168       ForceField& getForceField();
00169 
00173       AmberFF& getAmberFF();
00174       
00178       CharmmFF& getCharmmFF();
00179 
00181       MMFF94& getMMFF94();
00182 
00184       AmberConfigurationDialog& getAmberConfigurationDialog();
00185       
00187       CharmmConfigurationDialog& getCharmmConfigurationDialog();
00188 
00190       MMFF94ConfigurationDialog& getMMFF94ConfigurationDialog();
00191 
00195       virtual void fetchPreferences(INIFile &inifile);
00196           
00200       virtual void writePreferences(INIFile &inifile);
00201 
00203       MolecularDynamicsDialog& getMDSimulationDialog() { return md_dialog_;}
00204 
00206       MinimizationDialog& getMinimizationDialog() { return minimization_dialog_;}
00207 
00209       FDPBDialog* getFDPBDialog() { return fdpb_dialog_;}
00210       
00212       AssignBondOrderConfigurationDialog& getBondOrderDialog() { return bond_order_dialog_;}
00213       
00215       const AssignBondOrderConfigurationDialog& getBondOrderDialog() const { return bond_order_dialog_;}
00216   
00218       AssignBondOrderResultsDialog& getBondOrderResultsDialog() { return bond_order_results_dialog_;}
00219       
00221       const AssignBondOrderResultsDialog& getBondOrderResultsDialog() const { return bond_order_results_dialog_;}
00222 
00223           
00224       public slots:
00225 
00230       void centerCamera(Composite* composite = 0);
00231 
00239       void buildBonds();
00240       
00245       void buildEndcaps();
00246 
00253       void runBondOrderAssignment(bool show_dialog = true);
00254       
00255 
00263     void showBondOrderAssignmentResults(AssignBondOrderProcessor& bop);
00264 
00272       void addHydrogens();
00273       
00276       virtual bool checkResidue();
00277 
00279       virtual void createGridFromDistance();
00280 
00282       virtual void createGridFromCameraDistance();
00283 
00285       virtual void calculateSecondaryStructure();
00286 
00288       virtual void mapProteins();
00289 
00291       virtual void calculateRMSD();
00292 
00294       void buildPeptide();
00295 
00297       void calculateHBonds();
00298 
00300       void calculateRamachandranPlot();
00301 
00302       // Calculate the charges for a Molecule
00303 //      void assignCharges();
00304 
00306       void calculateForceFieldEnergy();
00307 
00309       void runMinimization(bool show_dialog_ = true);
00310 
00312       void MDSimulation(bool show_dialog_ = true);
00313 
00315       void showAmberForceFieldOptions();
00316       
00318       void showCharmmForceFieldOptions();
00319 
00321       void showMMFF94ForceFieldOptions();
00322       
00324       void chooseAmberFF();
00325 
00327       void chooseCharmmFF();
00328         
00330       void chooseMMFF94();
00331 
00333       void chooseForceField(Position nr);
00334 
00336       void setupForceField();
00337 
00339       bool calculateFDPB(bool show = true);
00340         
00342       
00343       private:
00344 
00345       virtual void addComposite_(Composite& composite, const String& name);
00346 
00347       void applyForceFieldSettings_();
00348 
00349       void selectUnassignedForceFieldAtoms_();
00350 
00351       bool setupForceField_(System* system, bool disable_selection = false);
00352 
00353       QAction* center_camera_id_;
00354       QAction* build_bonds_id_;
00355       QAction* build_endcaps_id_;
00356       QAction* assign_bond_orders_id_;
00357       QAction* add_hydrogens_id_;
00358       QAction* check_structure_id_;
00359       QAction* create_distance_grid_id_, *create_distance_grid_id2_;
00360       QAction* calculate_ss_id_;
00361       QAction* map_proteins_id_;
00362       QAction* calculate_RMSD_id_;
00363       QAction* assign_charges_id_;
00364       QAction* energy_id_;
00365       QAction* minimization_id_;
00366       QAction* mdsimulation_id_;
00367       QAction* build_peptide_id_;
00368       QAction* calculate_hbonds_id_;
00369       QAction* amber_ff_id_;
00370       QAction* charmm_ff_id_;
00371       QAction* mmff94_id_;
00372       QAction* setup_ff_;
00373       QAction* calculate_ramachandran_;
00374       QAction* menu_FPDB_;
00375 
00376       AmberFF                     amber_;
00377       CharmmFF                    charmm_;
00378       MMFF94                      mmff_;
00379       AmberConfigurationDialog    amber_dialog_;
00380       CharmmConfigurationDialog   charmm_dialog_;
00381       MMFF94ConfigurationDialog   mmff94_dialog_;
00382       MinimizationDialog          minimization_dialog_;
00383       MolecularDynamicsDialog     md_dialog_;
00384       FDPBDialog*                         fdpb_dialog_;
00385       AssignBondOrderConfigurationDialog  bond_order_dialog_;
00386       AssignBondOrderResultsDialog        bond_order_results_dialog_;
00387       Position                            force_field_id_;
00388     };
00389 
00390   } // namespace VIEW
00391 } // namespace BALL
00392 
00393 #endif // BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines