BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
BALL::VIEW::DockingController Class Reference

#include <BALL/VIEW/WIDGETS/dockingController.h>

Inheritance diagram for BALL::VIEW::DockingController:
QWidget BALL::VIEW::ModularWidget BALL::Embeddable BALL::VIEW::ConnectionObject

Public Types

Enumerations
enum  Algorithm { GEOMETRIC_FIT = 1 }
 
enum  ScoringFunction {
  DEFAULT = 0, AMBER_FF, MMFF94_FF, SELECTED_FF,
  RANDOM
}
 

Public Slots

void startDocking ()
 

Public Member Functions

virtual void runDocking (bool is_redock)
 
DockDialoggetDockDialog ()
 Get docking dialog. More...
 
virtual EnergeticEvaluationcreateEvaluationMethod (Index method)
 
Constructors, Destructors, and Assignment
 DockingController (QWidget *parent=0, const char *name=0)
 Default Constructor. More...
 
virtual ~DockingController ()
 Destructor. More...
 
const DockingControlleroperator= (const DockingController &dock_controller)
 Assignment operator. More...
 
ModularWidget methods
virtual void initializeWidget (MainControl &main_control)
 
virtual void fetchPreferences (INIFile &file)
 
virtual void writePreferences (INIFile &file)
 
virtual void checkMenu (MainControl &main_control)
 
virtual void onNotify (Message *message)
 
- Public Member Functions inherited from BALL::VIEW::ModularWidget
void setWorkingDirFromFilename_ (String filename)
 
virtual void showHelp (const String &url)
 
 ModularWidget (const char *name="<ModularWidget>")
 
 ModularWidget (const ModularWidget &widget)
 
virtual ~ModularWidget ()
 
virtual void destroy ()
 
virtual void clear ()
 
QAction * insertMenuEntry (Position parent_id, const String &name, const QObject *receiver=0, const char *slot=0, const String &description="", QKeySequence accel=QKeySequence())
 
void setMenuHint (const String &hint)
 
void setMenuHelp (const String &url)
 
virtual void registerForHelpSystem (const QObject *object, const String &url)
 
virtual void addToolBarEntries (QToolBar *main_tb)
 
void setIcon (const String &filename, bool add_to_main_toolbar=true)
 
virtual void initializePreferencesTab (Preferences &preferences)
 
virtual void finalizePreferencesTab (Preferences &preferences)
 
virtual void applyPreferences ()
 
bool lockComposites ()
 
bool unlockComposites ()
 Unlock the Composites. More...
 
MainControlgetMainControl () const
 
virtual void setStatusbarText (const String &text, bool important=false)
 
virtual void setStatusbarText (const QString &text, bool important=false)
  More...
 
String getWorkingDir ()
 Implemented for convenience. More...
 
void setWorkingDir (const String &dir)
 Implemented for convenience. More...
 
FragmentDBgetFragmentDB () const
 
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
 
virtual void finalizeWidget (MainControl &main_control)
 
virtual bool canHandle (const String &) const
 
virtual bool openFile (const String &)
 
- Public Member Functions inherited from BALL::Embeddable
 Embeddable (const String &identifier="<Embeddable>")
 
 Embeddable (const Embeddable &embeddable)
 
virtual ~Embeddable ()
 
void setIdentifier (const String &identifier)
 
const StringgetIdentifier () const
 
void unregisterThis ()
 
virtual void registerThis ()
 
- Public Member Functions inherited from BALL::VIEW::ConnectionObject
 ConnectionObject ()
 
virtual ~ConnectionObject ()
 
void registerConnectionObject (ConnectionObject &object)
 
void unregisterConnectionObject (ConnectionObject &object)
 
bool isConnectionObjectRegistered (const ConnectionObject &object)
 
ConnectionObjectgetParent () const
 
ConnectionObjectgetRoot ()
 
virtual bool isValid () const
 

Protected Member Functions

bool runScoring_ (ConformationSet *conformation_set)
 

Private Member Functions

 DockingController (const DockingController &dock_controller)
 

Private Attributes

DockDialog dock_dialog_
 
DockResultDialogdock_result_dialog_
 
DockProgressDialogprogress_dialog_
 
DockingAlgorithmdock_alg_
 Pointer to docking algorithm. More...
 
QAction * action_
 Menu entry. More...
 
DockingThreadthread_
 

Additional Inherited Members

- Static Public Member Functions inherited from BALL::VIEW::ModularWidget
static void registerWidget (ModularWidget *mwidget) throw (Exception::NullPointer)
 
- Static Protected Member Functions inherited from BALL::Embeddable
static void registerInstance_ (const std::type_info &type, const Embeddable *instance)
 
static void unregisterInstance_ (const Embeddable *instance)
 
static Size countInstances_ (const std::type_info &type)
 
static EmbeddablegetInstance_ (const std::type_info &type, Position index)
 
static EmbeddablegetInstance_ (const std::type_info &type, const String &identifier)
 
- Protected Attributes inherited from BALL::VIEW::ModularWidget
QAction * window_menu_entry_
 
bool show_window_enty_
 
bool default_visible_
 
QAction * last_action_
 
QList< QAction * > main_toolbar_actions_
 

Detailed Description

Class for docking two systems. It is responsible to show the docking dialog and start a docking caluclation with the options of the dialog. If BALLView was compiled with multithreading support it simultaneously shows the progress dialog. Finally it shows the result dialog.

Definition at line 37 of file dockingController.h.

Member Enumeration Documentation

Enumeration which contains the docking algorithms. The numbering corresponds to the order in the combobox of dock_dialog_ . If you want to add a new docking algorithm extend enumeration (0 corresponds to <select> item in ComboBox)

Enumerator
GEOMETRIC_FIT 

Definition at line 59 of file dockingController.h.

Enumeration which contains the scoring functions. The numbering corresponds to the order in the combobox of dock_dialog_ . If you want to add a new scoring function extend enumeration

Enumerator
DEFAULT 
AMBER_FF 
MMFF94_FF 
SELECTED_FF 
RANDOM 

Definition at line 69 of file dockingController.h.

Constructor & Destructor Documentation

BALL::VIEW::DockingController::DockingController ( QWidget parent = 0,
const char *  name = 0 
)

Default Constructor.

virtual BALL::VIEW::DockingController::~DockingController ( )
virtual

Destructor.

BALL::VIEW::DockingController::DockingController ( const DockingController dock_controller)
private

Copy constructor Remark: Copy contructor is private because it is not completed. The copy constuctor of the QT widgets is private and cannot be called.

Member Function Documentation

virtual void BALL::VIEW::DockingController::checkMenu ( MainControl main_control)
virtual

Updates the state of menu entry Docking in the popup menu Molecular Mechanics . Enables the menu entry if more than two composites are loaded. Disables the menu entry if less composites are loaded or if a simulation / calculation is running.

Reimplemented from BALL::VIEW::ModularWidget.

virtual EnergeticEvaluation* BALL::VIEW::DockingController::createEvaluationMethod ( Index  method)
virtual
virtual void BALL::VIEW::DockingController::fetchPreferences ( INIFile file)
virtual

Fetches the preferences from the INIFile. Calls DockDialog::fetchPreferences . This method will be called inside the method MainControl::show .

See Also
writePreferences

Reimplemented from BALL::VIEW::ModularWidget.

DockDialog& BALL::VIEW::DockingController::getDockDialog ( )

Get docking dialog.

virtual void BALL::VIEW::DockingController::initializeWidget ( MainControl main_control)
virtual

Initializes the popup menu Molecular Mechanics with its checkable submenu Docking . Calls DockDialog::initializeWidget . It is called automatically immediately before the main application is started.

Parameters
main_controlthe MainControl object to be initialized
See Also
openDialog
finalizeWidget
insertMenuEntry

Reimplemented from BALL::VIEW::ModularWidget.

virtual void BALL::VIEW::DockingController::onNotify ( Message message)
virtual

Message handling method. Catches DockingFinishedMessage and ShowDockResultMessage .

Parameters
messagethe pointer to the message that should be processed

Reimplemented from BALL::VIEW::ConnectionObject.

const DockingController& BALL::VIEW::DockingController::operator= ( const DockingController dock_controller)

Assignment operator.

virtual void BALL::VIEW::DockingController::runDocking ( bool  is_redock)
virtual

Shows docking dialog, checks which algorithm is chosen and creates new DockingAlgorithm object. Starts new Thread and fills/shows progress_dialog_ .

Parameters
is_redockflag that indicates if a docking or redocking should be run
bool BALL::VIEW::DockingController::runScoring_ ( ConformationSet conformation_set)
protected

Applies scoring function which user has chosen. Then, creates new DockResult and adds new scoring to it. At the end, adds the docked system to BALLView structures and sends a NewDockResultMessage to insert the DockResult in DatasetControl. Is called in onNotify .

Parameters
conformation_setconformation set that contains the result of the docking algorithm
Returns
true if scoring function was succesfully applied
false if scoring function was not succesfully applied
void BALL::VIEW::DockingController::startDocking ( )
slot

Is called when docking is started by clicking on menu entry Docking . Calls runDocking(false) .

virtual void BALL::VIEW::DockingController::writePreferences ( INIFile file)
virtual

Writes the preferences to the INIFile. Calls DockDialog::writePreferences . This method will be called inside the method MainControl::aboutToExit .

See Also
fetchPreferences

Reimplemented from BALL::VIEW::ModularWidget.

Member Data Documentation

QAction* BALL::VIEW::DockingController::action_
private

Menu entry.

Definition at line 185 of file dockingController.h.

DockingAlgorithm* BALL::VIEW::DockingController::dock_alg_
private

Pointer to docking algorithm.

Definition at line 182 of file dockingController.h.

DockDialog BALL::VIEW::DockingController::dock_dialog_
private

Dialog for docking and redocking

Definition at line 177 of file dockingController.h.

DockResultDialog* BALL::VIEW::DockingController::dock_result_dialog_
private

Definition at line 178 of file dockingController.h.

DockProgressDialog* BALL::VIEW::DockingController::progress_dialog_
private

Definition at line 179 of file dockingController.h.

DockingThread* BALL::VIEW::DockingController::thread_
private

Definition at line 187 of file dockingController.h.