#include <brabobase.h>
A dialog is presented with all options for Brabo classified in different categories. Options for the Stockholder program are also available. All data are stored in the class itself using the private struct WidgetData. This class is a subclass of BraboWidget, a class generated from brabowidget.ui.
Definition at line 43 of file brabobase.h.
Public Types | |
enum | Programs { BRABO, STOCK } |
Public Slots | |
void | reset () |
Resets all widgets to their default values determined by calcForces = TRUE / FALSE. | |
Public Member Functions | |
BraboBase (AtomSet *atoms, QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0) | |
~BraboBase () | |
The default destructor. | |
void | setForces (const bool state) |
Sets whether forces should be calculated and updates the status of related widgets. | |
void | setDescription (const QString description) |
Sets the description of the calculation. | |
void | setName (const QString name) |
Sets the filename prefix of the calculation. | |
void | setExtendedFormat (const bool state) |
Sets the format of the coordinates (normal/extended). | |
void | setPVMHosts (const QStringList &hosts) |
Sets the available PVM hosts. | |
QString | method () const |
Returns the method in the form Type(Method)//Basisset. | |
QStringList | basissets (bool &ok) |
Checks whether every atom has a basisset assigned (status returned by ok ) and returns a list of basisset files. | |
QString | startVector (bool &prefer, unsigned int &size1, unsigned int &size2) |
Returns the starting vector file name. | |
unsigned int | maxIterations () const |
Returns the maximum number of SCF-iterations. | |
QStringList | generateInput (unsigned int program) |
Generates an input file in a stringlist from the contents of the widgets. | |
QString | generateAtdens (bool &ok) |
Returns a custom built atdens file for running STOCK for the provided atoms. | |
void | loadCML (const QDomElement *root) |
Reads the widgetdata from a QDomElement. | |
void | saveCML (QDomElement *root) |
Saves the widgetdata to a QDomElement. | |
Static Public Member Functions | |
static void | setPreferredBasisset (const unsigned int basisset) |
Sets the preferred basisset. | |
Protected Slots | |
void | accept () |
Overridden from BraboWidget::accept(). | |
void | reject () |
Overridden from BraboWidget::reject(). | |
Private Types | |
enum | Categories { BASIC = 0, ADVANCED, PROPERTIES, SCFCONVERGENCE, PVM, DEBUG1, EXTRA, ADVANCED_METHOD, ADVANCED_SYMMETRY, ADVANCED_OTHER, PROPERTIES_CHARGES, PROPERTIES_OTHER, EXTRA_MAIN, EXTRA_PVM, EXTRA_INTE, EXTRA_SCF, EXTRA_FORC } |
Private Slots | |
void | showPreview () |
Shows a preview from the widgets. | |
void | readInputFile () |
Reads a Brabo input file into the widgets. | |
void | changed () |
Indicates at least one widget was altered. | |
void | selectWidget (QListViewItem *) |
Shows a widget from WidgetStackCategory depending on newItem. | |
void | updateSCFMethodWidgets (int index) |
Updates widgets according to the currently selected SCF method. | |
void | updateSCFTypeWidgets (int index) |
Updates widgets according to the currently selected SCF type. | |
void | selectStartvector () |
Selects a file containing a startvector to be used in the calculation. | |
void | oneBasisset (bool on) |
Enables/disables certain widgets depending on the selection of 1 basisset (true) or multiple basissets (false). | |
void | addBasisset () |
Adds a basisset/atom combination to ListViewBAS, but only if the atom type isn't listed yet. | |
void | removeBasisset () |
Removes the currently selected line from ListViewBAS. | |
void | toggleDIIS (bool on) |
Enables/disables the DIIS options. | |
void | addPVMHost () |
Adds the currently selected host from ListBoxNOTH2 to ListBoxNOTH1. | |
void | removePVMHost () |
Removes the currently selected host from ListBoxNOTH1. | |
void | adjustPrintSCF () |
Adjusts the Print SCF Level checkboxes. | |
void | checkOverflowMain (int row, int col) |
Spans cell(row, col) over multiple columns if it contains more than 10 characters. | |
void | checkOverflowPVM (int row, int col) |
Spans cell(row, col) over multiple columns if it contains more than 10 characters. | |
void | checkOverflowINTE (int row, int col) |
Spans cell(row, col) over multiple columns if it contains more than 10 characters. | |
void | checkOverflowSCF (int row, int col) |
Spans cell(row, col) over multiple columns if it contains more than 10 characters. | |
void | checkOverflowFORC (int row, int col) |
Spans cell(row, col) over multiple columns if it contains more than 10 characters. | |
void | addRowMain () |
If a row is selected, inserts a row before the selection. | |
void | addRowPVM () |
If a row is selected, inserts a row before the selection. | |
void | addRowINTE () |
If a row is selected, inserts a row before the selection. | |
void | addRowSCF () |
If a row is selected, inserts a row before the selection. | |
void | addRowFORC () |
If a row is selected, inserts a row before the selection. | |
void | removeRowMain () |
Removes the selected rows from TableMain. | |
void | removeRowPVM () |
Removes the selected rows from TablePVM. | |
void | removeRowINTE () |
Removes the selected rows from TableINTE. | |
void | removeRowSCF () |
Removes the selected rows from TableSCF. | |
void | removeRowFORC () |
Removes the selected rows from TableFORC. | |
void | clearSelectionMain () |
Clears the selected cells in TableMain. | |
void | clearSelectionPVM () |
Clears the selected cells in TablePVM. | |
void | clearSelectionINTE () |
Clears the selected cells in TableINTE. | |
void | clearSelectionSCF () |
Clears the selected cells in TableSCF. | |
void | clearSelectionFORC () |
Clears the selected cells in TableFORC. | |
Private Member Functions | |
void | makeConnections () |
Sets up the permanent connections. Called once from the constructor. | |
void | init () |
Initializes the dialog. | |
void | fillComboBoxes () |
Fills the comboboxes with available basissets and atom types. Called once from init. | |
void | saveWidgets () |
Saves the status of the widgets to a WidgetData struct. | |
void | restoreWidgets () |
Restores the status of the widgets from a WidgetData struct. | |
QStringList | parsedNUCLlines () |
Returns a stringlist containing input lines for Brabo constructed from the NUCL options. | |
void | buildAtdens () |
Generates atomic density basis set files for each atom of each basis set using atomic SCF. | |
Private Attributes | |
bool | calcForces |
= true if forces should be calculated | |
QString | calcDescription |
contains the description | |
QString | calcName |
contains the filename prefix | |
bool | calcXF |
= true if extended format is to be used | |
WidgetData | data |
contains the status of all widgets | |
bool | widgetChanged |
is set when any of the widgets change | |
vector< QString > | category |
Contains translatable names for the items in ListViewCategories. | |
AtomSet * | atoms |
A pointer to the AtomSet. | |
Static Private Attributes | |
static QStringList | pvmHosts = QStringList() |
The list of available PVM hosts. | |
static unsigned int | preferredBasisset = 0 |
The preferred basisset. | |
static const XMLData | xml |
Contains the XML dictRef values for all WidgetData. | |
Classes | |
struct | WidgetData |
A struct for saving the contents of all BraboWidget widgets. More... | |
struct | XMLData |
A struct representing the XML dictRef values for all the data from WidgetData. More... |
|
Definition at line 53 of file brabobase.h. |
|
Definition at line 132 of file brabobase.h. |
|
Definition at line 79 of file brabobase.cpp. |
|
The default destructor.
Definition at line 89 of file brabobase.cpp. |
|
Sets whether forces should be calculated and updates the status of related widgets.
Definition at line 96 of file brabobase.cpp. |
|
Sets the description of the calculation.
Definition at line 127 of file brabobase.cpp. |
|
Sets the filename prefix of the calculation.
Definition at line 134 of file brabobase.cpp. |
|
Sets the format of the coordinates (normal/extended).
Definition at line 141 of file brabobase.cpp. |
|
Sets the available PVM hosts.
Definition at line 148 of file brabobase.cpp. |
|
Returns the method in the form Type(Method)//Basisset.
Definition at line 156 of file brabobase.cpp. |
|
Checks whether every atom has a basisset assigned (status returned by This list can then be checked by Calculation as the check might have to be done remotely. Definition at line 174 of file brabobase.cpp. |
|
Returns the starting vector file name.
Definition at line 227 of file brabobase.cpp. |
|
Returns the maximum number of SCF-iterations.
Definition at line 304 of file brabobase.cpp. |
|
Generates an input file in a stringlist from the contents of the widgets.
Values for the argument
Definition at line 314 of file brabobase.cpp. |
|
Returns a custom built atdens file for running STOCK for the provided atoms. It works similarly to basissets(). It does not check for missing basis set assignment, which should be handled by basissets(). It still quietly returns false in that case. If the result is an empty string, Stock should not be run (similarly to generateInput with BraboBase::STOCK as argument). Definition at line 706 of file brabobase.cpp. |
|
Reads the widgetdata from a QDomElement.
Definition at line 768 of file brabobase.cpp. |
|
Saves the widgetdata to a QDomElement.
Definition at line 1035 of file brabobase.cpp. |
|
Sets the preferred basisset.
Definition at line 1178 of file brabobase.cpp. |
|
Resets all widgets to their default values determined by calcForces = TRUE / FALSE.
Definition at line 1190 of file brabobase.cpp. |
|
Overridden from BraboWidget::accept(). Saves the current status of the widgets to the WidgetData struct. Definition at line 1322 of file brabobase.cpp. |
|
Overridden from BraboWidget::reject(). Restores the widgets from the WidgetData struct. Definition at line 1345 of file brabobase.cpp. |
|
Shows a preview from the widgets.
Definition at line 1363 of file brabobase.cpp. |
|
Reads a Brabo input file into the widgets.
Definition at line 1393 of file brabobase.cpp. |
|
Indicates at least one widget was altered.
Definition at line 1744 of file brabobase.cpp. |
|
Shows a widget from WidgetStackCategory depending on newItem.
Definition at line 1751 of file brabobase.cpp. |
|
Updates widgets according to the currently selected SCF method.
Definition at line 1818 of file brabobase.cpp. |
|
Updates widgets according to the currently selected SCF type.
Definition at line 1856 of file brabobase.cpp. |
|
Selects a file containing a startvector to be used in the calculation.
Definition at line 1909 of file brabobase.cpp. |
|
Enables/disables certain widgets depending on the selection of 1 basisset (true) or multiple basissets (false).
Definition at line 1918 of file brabobase.cpp. |
|
Adds a basisset/atom combination to ListViewBAS, but only if the atom type isn't listed yet.
Definition at line 1933 of file brabobase.cpp. |
|
Removes the currently selected line from ListViewBAS.
Definition at line 1957 of file brabobase.cpp. |
|
Enables/disables the DIIS options.
Definition at line 1968 of file brabobase.cpp. |
|
Adds the currently selected host from ListBoxNOTH2 to ListBoxNOTH1. Checks for duplicates. ListBoxNOTH2 is never changed. Definition at line 1978 of file brabobase.cpp. |
|
Removes the currently selected host from ListBoxNOTH1.
Definition at line 1996 of file brabobase.cpp. |
|
Adjusts the Print SCF Level checkboxes. Checking a level should check all lower levels too. Definition at line 2003 of file brabobase.cpp. |
|
Spans cell(row, col) over multiple columns if it contains more than 10 characters. => For TableMain Definition at line 2024 of file brabobase.cpp. |
|
Spans cell(row, col) over multiple columns if it contains more than 10 characters. => For TablePVM Definition at line 2033 of file brabobase.cpp. |
|
Spans cell(row, col) over multiple columns if it contains more than 10 characters. => For TableINTE Definition at line 2042 of file brabobase.cpp. |
|
Spans cell(row, col) over multiple columns if it contains more than 10 characters. => For TableINTE Definition at line 2051 of file brabobase.cpp. |
|
Spans cell(row, col) over multiple columns if it contains more than 10 characters. => For TableFORC Definition at line 2060 of file brabobase.cpp. |
|
If a row is selected, inserts a row before the selection. If no row is selected, adds a row at the end. => For TableMain Definition at line 2069 of file brabobase.cpp. |
|
If a row is selected, inserts a row before the selection. If no row is selected, adds a row at the end. => For TablePVM Definition at line 2078 of file brabobase.cpp. |
|
If a row is selected, inserts a row before the selection. If no row is selected, adds a row at the end. => For TableINTE Definition at line 2087 of file brabobase.cpp. |
|
If a row is selected, inserts a row before the selection. If no row is selected, adds a row at the end. => For TableSCF Definition at line 2096 of file brabobase.cpp. |
|
If a row is selected, inserts a row before the selection. If no row is selected, adds a row at the end. => For TableFORC Definition at line 2105 of file brabobase.cpp. |
|
Removes the selected rows from TableMain.
Definition at line 2114 of file brabobase.cpp. |
|
Removes the selected rows from TablePVM.
Definition at line 2122 of file brabobase.cpp. |
|
Removes the selected rows from TableINTE.
Definition at line 2130 of file brabobase.cpp. |
|
Removes the selected rows from TableSCF.
Definition at line 2138 of file brabobase.cpp. |
|
Removes the selected rows from TableFORC.
Definition at line 2146 of file brabobase.cpp. |
|
Clears the selected cells in TableMain.
Definition at line 2154 of file brabobase.cpp. |
|
Clears the selected cells in TablePVM.
Definition at line 2162 of file brabobase.cpp. |
|
Clears the selected cells in TableINTE.
Definition at line 2170 of file brabobase.cpp. |
|
Clears the selected cells in TableSCF.
Definition at line 2178 of file brabobase.cpp. |
|
Clears the selected cells in TableFORC.
Definition at line 2186 of file brabobase.cpp. |
|
Sets up the permanent connections. Called once from the constructor.
Definition at line 2199 of file brabobase.cpp. |
|
Initializes the dialog. Called once from the constructor. Connections should be up. Definition at line 2418 of file brabobase.cpp. |
|
Fills the comboboxes with available basissets and atom types. Called once from init.
Definition at line 2573 of file brabobase.cpp. |
|
Saves the status of the widgets to a WidgetData struct.
Definition at line 2591 of file brabobase.cpp. |
|
Restores the status of the widgets from a WidgetData struct.
Definition at line 2744 of file brabobase.cpp. |
|
Returns a stringlist containing input lines for Brabo constructed from the NUCL options.
Definition at line 2894 of file brabobase.cpp. |
|
Generates atomic density basis set files for each atom of each basis set using atomic SCF.
Definition at line 2928 of file brabobase.cpp. |
|
= true if forces should be calculated
Definition at line 415 of file brabobase.h. |
|
contains the description
Definition at line 416 of file brabobase.h. |
|
contains the filename prefix
Definition at line 417 of file brabobase.h. |
|
= true if extended format is to be used
Definition at line 419 of file brabobase.h. |
|
contains the status of all widgets
Definition at line 421 of file brabobase.h. |
|
is set when any of the widgets change
Definition at line 422 of file brabobase.h. |
|
Contains translatable names for the items in ListViewCategories.
Definition at line 423 of file brabobase.h. |
|
A pointer to the AtomSet.
Definition at line 424 of file brabobase.h. |
|
The list of available PVM hosts.
Definition at line 427 of file brabobase.h. |
|
The preferred basisset.
Definition at line 428 of file brabobase.h. |
|
Contains the XML dictRef values for all WidgetData.
Definition at line 429 of file brabobase.h. |