#include <relaxbase.h>
It provides the functionality to RelaxWidget.
Definition at line 43 of file relaxbase.h.
Public Types | |
enum | Input { AFF, MAFF } |
Public Slots | |
void | reset () |
Resets all widgets to their default values. | |
Public Member Functions | |
RelaxBase (AtomSet *atomset, QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0) | |
~RelaxBase () | |
The default destructor. | |
void | setName (const QString name) |
Sets the filename prefix of the calculation. | |
void | setDescription (const QString description) |
Sets the description of the calculation. | |
void | setDir (const QString dir) |
Sets the directory of the calculation. | |
void | setExtendedFormat (const bool state) |
Sets the format of the coordinates (normal/extended). | |
unsigned int | inputGenerationFrequency () |
Returns the frequency with which the internal coordinates should be regenerated. | |
unsigned int | maxSteps () |
Returns the maximum number of optimization steps to be done. | |
void | scaleFactors (vector< unsigned int > &steps, vector< double > &factors) |
Returns the scalefactors. | |
QStringList | generateInput (const Input type) |
Generates input for a specific program. | |
void | loadCML (const QDomElement *root) |
Reads the widgetdata from a QDomElement. | |
void | saveCML (QDomElement *root) |
Saves the widgetdata to a QDomElement. | |
Protected Slots | |
void | accept () |
Overridden from RelaxWidget::accept(). | |
void | reject () |
Overridden from RelaxWidget::reject(). | |
Protected Member Functions | |
void | showEvent (QShowEvent *e) |
Overridden from RelaxWidget::showEvent(). | |
Private Types | |
enum | Categories { BASIC = 0, INTERNAL = 1, CARTESIAN = 2, ADVANCED = 3, DEBUG1 = 4, EXTRA = 5, CARTESIAN_SYMMETRY = 6, CARTESIAN_OTHER = 7, ADVANCED_THRESHOLDS = 8, ADVANCED_OTHER = 9 } |
enum | Type { PreviewAFF, ICListAFF } |
Private Slots | |
void | showPreview () |
Shows a preview from the widgets. | |
void | showPreview2 () |
Shows a preview from the widgets. | |
void | readInputFile () |
Reads a Relax AFF file into the widgets. | |
void | setChanged (bool state=true) |
Sets the 'changed' property of the widget. | |
void | selectWidget (QListViewItem *) |
Shows a widget from WidgetStackCategory depending on newItem. | |
void | enableAutogenWidgets () |
Enabled/disables the widgets for configuring the (re)generation of the internal coordinates. | |
void | enableSFACWidgets (bool state=true) |
Enabled/disables the widgets for configuring the scale factor depending on RadioButtonSFAC{1|2}. | |
void | newScaleFactor () |
Adds a new scale factor to the list. | |
void | deleteScaleFactor () |
Deletes the currently selected scale factor from the list. | |
void | updateICEdit () |
Updates the widgets for changing an IC with the contents of the currently selected IC in ListViewIC. | |
void | updateICList () |
Updates ListViewIC with the contents of the widgets for changing an IC. | |
void | updateICSpecifics () |
Updates the widgets for the specific data. | |
void | updateICType () |
Does the necessary updating of all parts of an internal. | |
void | newIC () |
Creates a new internal coordinate at the bottom of ListViewIC. | |
void | newICPart () |
Creates a new part of an internal coordinate. | |
void | deleteIC () |
Deletes the currently selected internal coordinate. | |
void | clearIC () |
Deletes all internal coordinates. | |
void | genIC () |
Fills the internal coordinates list with (non)redundant internal coordinates. | |
void | genIC2 () |
Fills the internal coordinates list with (non)redundant internal coordinates. | |
void | moveICUp () |
Moves the selected internal coordinate one place up in the list. | |
void | moveICDown () |
Moves the selected internal coordinate one place down in the list. | |
void | newFixedAtom () |
Adds a new atom to the list of fixed atoms. | |
void | deleteFixedAtom () |
Deletes the selected atom from the list of fixed atoms. | |
void | checkFIXABoxes () |
Makes sure at least 1 box stays checked for the fixed atoms. | |
void | enableTROTWidgets (bool state=true) |
Enables/disables the widgets for configuring the optimization of the external coordinates depending on CheckBoxTROT. | |
void | newExtraBond () |
Adds a new bond to the XBON list. | |
void | deleteExtraBond () |
Deletes the selected bond from the XBON list. | |
void | enableUPDTWidgets (bool state=true) |
Enables/disables the widgets for configuring the update of the force constants depending on CheckBoxUPDT. | |
void | enableSHRTWidgets (bool state=true) |
Enables/disables the widgets for configuring the short output depending on CheckBoxSHRT. | |
void | checkOverflow (int row, int col) |
Spans cell(row, col) over multiple columns if it contains more than 10 characters. | |
void | addExtraRow () |
If a row is selected, inserts a row before the selection. | |
void | removeExtraRow () |
Removes the selected rows. | |
void | clearSelection () |
Clears the selected cells. | |
Private Member Functions | |
void | makeConnections () |
Sets up the permanent connections. Called once from the constructor. | |
void | init () |
Initializes the dialog. | |
void | saveWidgets () |
Saves the status of the widgets to a data struct. | |
void | restoreWidgets () |
Restores the status of the widgets from a data struct. | |
QString | icRepresentation (const unsigned int atom1, const unsigned int atom2, const unsigned int atom3=0, const int atom4=0) |
Returns a QString containing a representation of an internal coordinate from the 4 atom indices. | |
void | getAtomsFromIC (const QString textIC, unsigned int &atom1, unsigned int &atom2, unsigned int &atom3, int &atom4) |
Returns the atom numbers from a textual representation of an internal coordinate. | |
void | renumberICs () |
Renumbers the internal coordinates. | |
QStringList | generateAFFHeader () |
Generates input for the first part of an .aff file. | |
QStringList | generateBmatInput () |
Generates input for Maff to generate non-redundant internal coordinates. | |
bool | makeDirCurrent (const QString dir, const QString title) |
Makes dir the current directory. | |
void | fillICListFromAFF (const QStringList aff) |
Adds the internal coordinates found in the latest generated aff to the IC list widget. | |
bool | startMAFF (const unsigned int slot) |
Initiates the generation of an AFF file using MAFF. | |
QStringList | readMAFFGeneratedICs () |
Returns the internal coordinates generated by the latest MAFF run. | |
Private Attributes | |
WidgetData | data |
Contains the status of all widgets. | |
AtomSet * | atoms |
Pointer to the AtomSet passed in through the constructor. | |
vector< QString > | category |
Contains translatable names for the items in ListViewCategory. | |
bool | widgetChanged |
= TRUE if the dialog has been changed and needs saving. | |
QString | calcName |
Contains the filename prefix (maybe change to pointer to XbraboView QString. | |
QString | calcDescription |
Contains the description. | |
QString | calcDir |
Contains the directory. | |
bool | calcXF |
= TRUE if the calculation is to be done in extended format. | |
QProcess * | maffProcess |
The process for running MAFF. | |
Static Private Attributes | |
static const XMLData | xml |
Contains the XML dictRef values for all WidgetData. | |
Classes | |
struct | ICData |
A utility struct containing all data to reconstruct an internal coordinate. More... | |
struct | WidgetData |
A struct representing the data from all widgets. More... | |
struct | XMLData |
A struct representing the XML dictRef values for all the data from WidgetData. More... |
|
Definition at line 53 of file relaxbase.h. |
|
Definition at line 126 of file relaxbase.h. |
|
Definition at line 129 of file relaxbase.h. |
|
Definition at line 77 of file relaxbase.cpp. |
|
The default destructor.
Definition at line 88 of file relaxbase.cpp. |
|
Sets the filename prefix of the calculation. This is the basename from which all input and output files will be named. Definition at line 95 of file relaxbase.cpp. |
|
Sets the description of the calculation.
Definition at line 103 of file relaxbase.cpp. |
|
Sets the directory of the calculation.
Definition at line 110 of file relaxbase.cpp. |
|
Sets the format of the coordinates (normal/extended).
Definition at line 117 of file relaxbase.cpp. |
|
Returns the frequency with which the internal coordinates should be regenerated. 0 means just once at the beginning. Definition at line 124 of file relaxbase.cpp. |
|
Returns the maximum number of optimization steps to be done. 0 means no limit. Definition at line 137 of file relaxbase.cpp. |
|
Returns the scalefactors. Get it from the data struct (easier). Definition at line 145 of file relaxbase.cpp. |
|
Generates input for a specific program.
Definition at line 171 of file relaxbase.cpp. |
|
Reads the widgetdata from a QDomElement.
Definition at line 214 of file relaxbase.cpp. |
|
Saves the widgetdata to a QDomElement.
Definition at line 485 of file relaxbase.cpp. |
|
Resets all widgets to their default values.
Definition at line 629 of file relaxbase.cpp. |
|
Overridden from RelaxWidget::showEvent().
Definition at line 746 of file relaxbase.cpp. |
|
Overridden from RelaxWidget::accept().
Definition at line 834 of file relaxbase.cpp. |
|
Overridden from RelaxWidget::reject().
Definition at line 848 of file relaxbase.cpp. |
|
Shows a preview from the widgets. This function only starts MAFF if needed. The actual showing is done by showPreview2. Definition at line 865 of file relaxbase.cpp. |
|
Shows a preview from the widgets. This function is either called directly by showPreview if IC's are not generated or as a slot when the MAFF process is finished. Definition at line 884 of file relaxbase.cpp. |
|
Reads a Relax AFF file into the widgets.
Definition at line 921 of file relaxbase.cpp. |
|
Sets the 'changed' property of the widget.
Definition at line 1163 of file relaxbase.cpp. |
|
Shows a widget from WidgetStackCategory depending on newItem.
Definition at line 1170 of file relaxbase.cpp. |
|
Enabled/disables the widgets for configuring the (re)generation of the internal coordinates.
Definition at line 1215 of file relaxbase.cpp. |
|
Enabled/disables the widgets for configuring the scale factor depending on RadioButtonSFAC{1|2}.
Definition at line 1225 of file relaxbase.cpp. |
|
Adds a new scale factor to the list.
Definition at line 1240 of file relaxbase.cpp. |
|
Deletes the currently selected scale factor from the list.
Definition at line 1253 of file relaxbase.cpp. |
|
Updates the widgets for changing an IC with the contents of the currently selected IC in ListViewIC.
Definition at line 1263 of file relaxbase.cpp. |
|
Updates ListViewIC with the contents of the widgets for changing an IC. It blocks calls to updateICEdit to prevent infinite recursion. Definition at line 1351 of file relaxbase.cpp. |
|
Updates the widgets for the specific data.
Definition at line 1408 of file relaxbase.cpp. |
|
Does the necessary updating of all parts of an internal.
Definition at line 1479 of file relaxbase.cpp. |
|
Creates a new internal coordinate at the bottom of ListViewIC.
Definition at line 1610 of file relaxbase.cpp. |
|
Creates a new part of an internal coordinate.
Definition at line 1645 of file relaxbase.cpp. |
|
Deletes the currently selected internal coordinate.
Definition at line 1685 of file relaxbase.cpp. |
|
Deletes all internal coordinates.
Definition at line 1728 of file relaxbase.cpp. |
|
Fills the internal coordinates list with (non)redundant internal coordinates. This function only starts MAFF. The reuslting file is parsed in genIC2. Definition at line 1737 of file relaxbase.cpp. |
|
Fills the internal coordinates list with (non)redundant internal coordinates. It is only called when a MAFF run has ended. Definition at line 1749 of file relaxbase.cpp. |
|
Moves the selected internal coordinate one place up in the list.
Definition at line 1765 of file relaxbase.cpp. |
|
Moves the selected internal coordinate one place down in the list.
Definition at line 1798 of file relaxbase.cpp. |
|
Adds a new atom to the list of fixed atoms.
Definition at line 1819 of file relaxbase.cpp. |
|
Deletes the selected atom from the list of fixed atoms.
Definition at line 1865 of file relaxbase.cpp. |
|
Makes sure at least 1 box stays checked for the fixed atoms. Otherwise nothing would be actually fixed. Definition at line 1877 of file relaxbase.cpp. |
|
Enables/disables the widgets for configuring the optimization of the external coordinates depending on CheckBoxTROT.
Definition at line 1910 of file relaxbase.cpp. |
|
Adds a new bond to the XBON list.
Definition at line 1924 of file relaxbase.cpp. |
|
Deletes the selected bond from the XBON list.
Definition at line 1947 of file relaxbase.cpp. |
|
Enables/disables the widgets for configuring the update of the force constants depending on CheckBoxUPDT.
Definition at line 1958 of file relaxbase.cpp. |
|
Enables/disables the widgets for configuring the short output depending on CheckBoxSHRT.
Definition at line 1967 of file relaxbase.cpp. |
|
Spans cell(row, col) over multiple columns if it contains more than 10 characters.
Definition at line 1983 of file relaxbase.cpp. |
|
If a row is selected, inserts a row before the selection. If no row is selected, adds a row at the end. Definition at line 1991 of file relaxbase.cpp. |
|
Removes the selected rows.
Definition at line 1999 of file relaxbase.cpp. |
|
Clears the selected cells.
Definition at line 2007 of file relaxbase.cpp. |
|
Sets up the permanent connections. Called once from the constructor.
Definition at line 2020 of file relaxbase.cpp. |
|
Initializes the dialog. Called once from the constructor. Connections should be up. Definition at line 2188 of file relaxbase.cpp. |
|
Saves the status of the widgets to a data struct.
Definition at line 2322 of file relaxbase.cpp. |
|
Restores the status of the widgets from a data struct.
Definition at line 2465 of file relaxbase.cpp. |
|
Returns a QString containing a representation of an internal coordinate from the 4 atom indices. A zero value will not be added. Definition at line 2590 of file relaxbase.cpp. |
|
Returns the atom numbers from a textual representation of an internal coordinate.
Definition at line 2614 of file relaxbase.cpp. |
|
Renumbers the internal coordinates.
Definition at line 2638 of file relaxbase.cpp. |
|
Generates input for the first part of an .aff file.
Definition at line 2654 of file relaxbase.cpp. |
|
Generates input for Maff to generate non-redundant internal coordinates. Only generates the actual input for the IC definitions. The input for the initial questions is generated in generateICs. Definition at line 2957 of file relaxbase.cpp. |
|
Makes
Shows a messagebox with the error and Definition at line 3224 of file relaxbase.cpp. |
|
Adds the internal coordinates found in the latest generated aff to the IC list widget.
Definition at line 3246 of file relaxbase.cpp. |
|
Initiates the generation of an AFF file using MAFF. Upon completion a specific slot will be called. Definition at line 3420 of file relaxbase.cpp. |
|
Returns the internal coordinates generated by the latest MAFF run.
Definition at line 3495 of file relaxbase.cpp. |
|
Contains the status of all widgets.
Definition at line 357 of file relaxbase.h. |
|
Contains the XML dictRef values for all WidgetData.
Definition at line 358 of file relaxbase.h. |
|
Pointer to the AtomSet passed in through the constructor.
Definition at line 359 of file relaxbase.h. |
|
Contains translatable names for the items in ListViewCategory.
Definition at line 360 of file relaxbase.h. |
|
= TRUE if the dialog has been changed and needs saving.
Definition at line 361 of file relaxbase.h. |
|
Contains the filename prefix (maybe change to pointer to XbraboView QString.
Definition at line 362 of file relaxbase.h. |
|
Contains the description.
Definition at line 363 of file relaxbase.h. |
|
Contains the directory.
Definition at line 364 of file relaxbase.h. |
|
= TRUE if the calculation is to be done in extended format.
Definition at line 365 of file relaxbase.h. |
|
The process for running MAFF.
Definition at line 366 of file relaxbase.h. |