BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
molecularStructure.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
6 #define BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H
7 
8 #ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
10 #endif
11 
12 #ifndef BALL_MATHS_VECTOR3_H
13  #include <BALL/MATHS/vector3.h>
14 #endif
15 
16 #ifndef BALL_VIEW_DIALOGS_AMBERCONFIGURATIONDIALOG_H
18 #endif
19 
20 #ifndef BALL_VIEW_DIALOGS_MINIMIZATIONDIALOG_H
22 #endif
23 
24 #ifndef BALL_VIEW_DIALOGS_MOLECULARDYNAMICSDIALOG_H
26 #endif
27 
28 #ifndef BALL_VIEW_DIALOGS_CHARMMCONFIGURATIONDIALOG_H
30 #endif
31 
32 #ifndef BALL_VIEW_DIALOGS_MMFF94CONFIGURATIONDIALOG_H
34 #endif
35 
36 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERCONFIGURATIONDIALOG_H
38 #endif
39 
40 #ifndef BALL_VIEW_DIALOGS_ASSIGNBONDORDERRESULTSDIALOG_H
42 #endif
43 
44 #ifndef BALL_MOLMEC_AMBER_AMBER_H
45 # include <BALL/MOLMEC/AMBER/amber.h>
46 #endif
47 
48 #ifndef BALL_MOLMEC_CHARMM_CHARMM_H
50 #endif
51 
52 #ifndef BALL_MOLMEC_MMFF94_MMFF94
54 #endif
55 
56 
57 #include <QtGui/QWidget>
58 
59 namespace BALL
60 {
61  class Composite;
62 
63  namespace VIEW
64  {
65  class FDPBDialog;
66 
87  : public QWidget,
88  public ModularWidget
89  {
90  Q_OBJECT
91 
92  public:
93 
95 
96 
97  enum
98  {
100  AMBER_FF = 0,
101 
104 
106  MMFF94_FF
107  };
108 
112 
117  MolecularStructure(QWidget* parent = 0, const char* name = 0);
118 
121 
123 
126 
129  virtual ~MolecularStructure();
130 
132 
135 
146  virtual void onNotify(Message *message);
147 
154  virtual void checkMenu(MainControl& main_control);
155 
162  virtual void initializeWidget(MainControl& main_control);
163 
168  ForceField& getForceField();
169 
173  AmberFF& getAmberFF();
174 
178  CharmmFF& getCharmmFF();
179 
181  MMFF94& getMMFF94();
182 
184  AmberConfigurationDialog& getAmberConfigurationDialog();
185 
187  CharmmConfigurationDialog& getCharmmConfigurationDialog();
188 
190  MMFF94ConfigurationDialog& getMMFF94ConfigurationDialog();
191 
195  virtual void fetchPreferences(INIFile &inifile);
196 
200  virtual void writePreferences(INIFile &inifile);
201 
204 
206  MinimizationDialog& getMinimizationDialog() { return minimization_dialog_;}
207 
209  FDPBDialog* getFDPBDialog() { return fdpb_dialog_;}
210 
213 
215  const AssignBondOrderConfigurationDialog& getBondOrderDialog() const { return bond_order_dialog_;}
216 
218  AssignBondOrderResultsDialog& getBondOrderResultsDialog() { return bond_order_results_dialog_;}
219 
221  const AssignBondOrderResultsDialog& getBondOrderResultsDialog() const { return bond_order_results_dialog_;}
222 
223 
224  public slots:
225 
230  void centerCamera(Composite* composite = 0);
231 
239  void buildBonds();
240 
245  void buildEndcaps();
246 
253  void runBondOrderAssignment(bool show_dialog = true);
254 
255 
263  void showBondOrderAssignmentResults(AssignBondOrderProcessor& bop);
264 
272  void addHydrogens();
273 
276  virtual bool checkResidue();
277 
279  virtual void createGridFromDistance();
280 
282  virtual void createGridFromCameraDistance();
283 
285  virtual void calculateSecondaryStructure();
286 
288  virtual void mapProteins();
289 
291  virtual void calculateRMSD();
292 
294  void buildPeptide();
295 
297  void calculateHBonds();
298 
300  void calculateRamachandranPlot();
301 
302  // Calculate the charges for a Molecule
303 // void assignCharges();
304 
306  void calculateForceFieldEnergy();
307 
309  void runMinimization(bool show_dialog_ = true);
310 
312  void MDSimulation(bool show_dialog_ = true);
313 
315  void showAmberForceFieldOptions();
316 
318  void showCharmmForceFieldOptions();
319 
321  void showMMFF94ForceFieldOptions();
322 
324  void chooseAmberFF();
325 
327  void chooseCharmmFF();
328 
330  void chooseMMFF94();
331 
333  void chooseForceField(Position nr);
334 
336  void setupForceField();
337 
339  bool calculateFDPB(bool show = true);
340 
342 
343  private:
344 
345  virtual void addComposite_(Composite& composite, const String& name);
346 
347  void applyForceFieldSettings_();
348 
349  void selectUnassignedForceFieldAtoms_();
350 
351  bool setupForceField_(System* system, bool disable_selection = false);
352 
354  QAction* build_bonds_id_;
359  QAction* create_distance_grid_id_, *create_distance_grid_id2_;
364  QAction* energy_id_;
369  QAction* amber_ff_id_;
370  QAction* charmm_ff_id_;
371  QAction* mmff94_id_;
372  QAction* setup_ff_;
374  QAction* menu_FPDB_;
375 
388  };
389 
390  } // namespace VIEW
391 } // namespace BALL
392 
393 #endif // BALL_VIEW_WIDGETS_MOLECULARSTRUCTURE_H