00001
00002
00003
00004
00005
00006
00007 #ifndef BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
00008 #define BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
00009
00010 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
00011 # include <BALL/VIEW/KERNEL/modularWidget.h>
00012 #endif
00013
00014 #ifndef BALL_MATHS_VECTOR3_H
00015 #include <BALL/MATHS/vector3.h>
00016 #endif
00017
00018 #ifndef BALL_VIEW_DIALOGS_AMBERCONFIGURATIONDIALOG_H
00019 #include <BALL/VIEW/DIALOGS/amberConfigurationDialog.h>
00020 #endif
00021
00022 #ifndef BALL_VIEW_DIALOGS_MINIMIZATIONDIALOG_H
00023 # include <BALL/VIEW/DIALOGS/minimizationDialog.h>
00024 #endif
00025
00026 #ifndef BALL_VIEW_DIALOGS_MOLECULARDYNAMICSDIALOG_H
00027 # include <BALL/VIEW/DIALOGS/molecularDynamicsDialog.h>
00028 #endif
00029
00030 #ifndef BALL_VIEW_DIALOGS_CHARMMCONFIGURATIONDIALOG_H
00031 # include <BALL/VIEW/DIALOGS/charmmConfigurationDialog.h>
00032 #endif
00033
00034 #ifndef BALL_VIEW_DIALOGS_MMFF94CONFIGURATIONDIALOG_H
00035 # include <BALL/VIEW/DIALOGS/MMFF94ConfigurationDialog.h>
00036 #endif
00037
00038 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERCONFIGURATIONDIALOG_H
00039 # include <BALL/VIEW/DIALOGS/assignBondOrderConfigurationDialog.h>
00040 #endif
00041
00042 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERRESULTSDIALOG_H
00043 # include <BALL/VIEW/DIALOGS/assignBondOrderResultsDialog.h>
00044 #endif
00045
00046 #ifndef BALL_MOLMEC_AMBER_AMBER_H
00047 # include <BALL/MOLMEC/AMBER/amber.h>
00048 #endif
00049
00050 #ifndef BALL_MOLMEC_CHARMM_CHARMM_H
00051 # include <BALL/MOLMEC/CHARMM/charmm.h>
00052 #endif
00053
00054 #ifndef BALL_MOLMEC_MMFF94_MMFF94
00055 # include <BALL/MOLMEC/MMFF94/MMFF94.h>
00056 #endif
00057
00058
00059 #include <QtGui/qwidget.h>
00060
00061 namespace BALL
00062 {
00063 class Composite;
00064
00065 namespace VIEW
00066 {
00067 class FDPBDialog;
00068
00088 class BALL_VIEW_EXPORT MolecularStructure
00089 : public QWidget,
00090 public ModularWidget
00091 {
00092 Q_OBJECT
00093
00094 public:
00095
00096 BALL_EMBEDDABLE(MolecularStructure, ModularWidget)
00097
00098
00099 enum
00100 {
00102 AMBER_FF = 0,
00103
00105 CHARMM_FF,
00106
00108 MMFF94_FF
00109 };
00110
00114
00119 MolecularStructure(QWidget* parent = 0, const char* name = 0);
00120
00122 MolecularStructure(const MolecularStructure& m);
00123
00125
00128
00131 virtual ~MolecularStructure();
00132
00134
00137
00148 virtual void onNotify(Message *message);
00149
00156 virtual void checkMenu(MainControl& main_control);
00157
00164 virtual void initializeWidget(MainControl& main_control);
00165
00170 ForceField& getForceField();
00171
00175 AmberFF& getAmberFF();
00176
00180 CharmmFF& getCharmmFF();
00181
00183 MMFF94& getMMFF94();
00184
00186 AmberConfigurationDialog& getAmberConfigurationDialog();
00187
00189 CharmmConfigurationDialog& getCharmmConfigurationDialog();
00190
00192 MMFF94ConfigurationDialog& getMMFF94ConfigurationDialog();
00193
00197 virtual void fetchPreferences(INIFile &inifile);
00198
00202 virtual void writePreferences(INIFile &inifile);
00203
00205 MolecularDynamicsDialog& getMDSimulationDialog() { return md_dialog_;}
00206
00208 MinimizationDialog& getMinimizationDialog() { return minimization_dialog_;}
00209
00211 FDPBDialog* getFDPBDialog() { return fdpb_dialog_;}
00212
00214 AssignBondOrderConfigurationDialog& getBondOrderDialog() { return bond_order_dialog_;}
00215
00217 const AssignBondOrderConfigurationDialog& getBondOrderDialog() const { return bond_order_dialog_;}
00218
00220 AssignBondOrderResultsDialog& getBondOrderResultsDialog() { return bond_order_results_dialog_;}
00221
00223 const AssignBondOrderResultsDialog& getBondOrderResultsDialog() const { return bond_order_results_dialog_;}
00224
00225
00226 public slots:
00227
00232 void centerCamera(Composite* composite = 0);
00233
00241 void buildBonds();
00242
00249 void runBondOrderAssignment(bool show_dialog = true);
00250
00251
00259 void showBondOrderAssignmentResults(AssignBondOrderProcessor& bop);
00260
00268 void addHydrogens();
00269
00272 virtual bool checkResidue();
00273
00275 virtual void createGridFromDistance();
00276
00278 virtual void createGridFromCameraDistance();
00279
00281 virtual void calculateSecondaryStructure();
00282
00284 virtual void mapProteins();
00285
00287 virtual void calculateRMSD();
00288
00290 void buildPeptide();
00291
00293 void calculateHBonds();
00294
00296 void calculateRamachandranPlot();
00297
00298
00299
00300
00302 void calculateForceFieldEnergy();
00303
00305 void runMinimization(bool show_dialog_ = true);
00306
00308 void MDSimulation(bool show_dialog_ = true);
00309
00311 void showAmberForceFieldOptions();
00312
00314 void showCharmmForceFieldOptions();
00315
00317 void showMMFF94ForceFieldOptions();
00318
00320 void chooseAmberFF();
00321
00323 void chooseCharmmFF();
00324
00326 void chooseMMFF94();
00327
00329 void chooseForceField(Position nr);
00330
00332 void setupForceField();
00333
00335 bool calculateFDPB(bool show = true);
00336
00338
00339 private:
00340
00341 virtual void addComposite_(Composite& composite, const String& name);
00342
00343 void applyForceFieldSettings_();
00344
00345 void selectUnassignedForceFieldAtoms_();
00346
00347 bool setupForceField_(System* system, bool disable_selection = false);
00348
00349 QAction* center_camera_id_;
00350 QAction* build_bonds_id_;
00351 QAction* assign_bond_orders_id_;
00352 QAction* add_hydrogens_id_;
00353 QAction* check_structure_id_;
00354 QAction* create_distance_grid_id_, *create_distance_grid_id2_;
00355 QAction* calculate_ss_id_;
00356 QAction* map_proteins_id_;
00357 QAction* calculate_RMSD_id_;
00358 QAction* assign_charges_id_;
00359 QAction* energy_id_;
00360 QAction* minimization_id_;
00361 QAction* mdsimulation_id_;
00362 QAction* build_peptide_id_;
00363 QAction* calculate_hbonds_id_;
00364 QAction* amber_ff_id_;
00365 QAction* charmm_ff_id_;
00366 QAction* mmff94_id_;
00367 QAction* setup_ff_;
00368 QAction* calculate_ramachandran_;
00369 QAction* menu_FPDB_;
00370
00371 AmberFF amber_;
00372 CharmmFF charmm_;
00373 MMFF94 mmff_;
00374 AmberConfigurationDialog amber_dialog_;
00375 CharmmConfigurationDialog charmm_dialog_;
00376 MMFF94ConfigurationDialog mmff94_dialog_;
00377 MinimizationDialog minimization_dialog_;
00378 MolecularDynamicsDialog md_dialog_;
00379 FDPBDialog* fdpb_dialog_;
00380 AssignBondOrderConfigurationDialog bond_order_dialog_;
00381 AssignBondOrderResultsDialog bond_order_results_dialog_;
00382 Position force_field_id_;
00383 };
00384
00385 }
00386 }
00387
00388 #endif // BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H