00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00020
00021 #ifndef BRABOBASE_H
00022 #define BRABOBASE_H
00023
00025
00026
00027 #include <vector>
00028 using std::vector;
00029
00030
00031 class QDomElement;
00032 class QPixmap;
00033 class QString;
00034
00035
00036 class AtomSet;
00037
00038
00039 #include "brabowidget.h"
00040
00041
00043 class BraboBase : public BraboWidget
00044 {
00045 Q_OBJECT
00046
00047 public:
00049 BraboBase(AtomSet* atoms, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
00050 ~BraboBase();
00051
00053 enum Programs{BRABO, STOCK};
00054
00056 void setForces(const bool state);
00057 void setDescription(const QString description);
00058 void setName(const QString name);
00059 void setExtendedFormat(const bool state);
00060 void setPVMHosts(const QStringList& hosts);
00061
00063 QString method() const;
00064
00066 QStringList basissets(bool& ok);
00067 QString startVector(bool& prefer, unsigned int& size1, unsigned int& size2);
00068 unsigned int maxIterations() const;
00069
00071 QStringList generateInput(unsigned int program);
00072 QString generateAtdens(bool& ok);
00073 void loadCML(const QDomElement* root);
00074 void saveCML(QDomElement* root);
00075
00077 static void setPreferredBasisset(const unsigned int basisset);
00078
00079 public slots:
00080 void reset();
00081
00082 protected slots:
00083 void accept();
00084 void reject();
00085
00086 private slots:
00088 void showPreview();
00089 void readInputFile();
00091 void changed();
00092 void selectWidget(QListViewItem*);
00094 void updateSCFMethodWidgets(int index);
00095 void updateSCFTypeWidgets(int index);
00096 void selectStartvector();
00098 void oneBasisset(bool on);
00099 void addBasisset();
00100 void removeBasisset();
00102 void toggleDIIS(bool on);
00104 void addPVMHost();
00105 void removePVMHost();
00107 void adjustPrintSCF();
00109 void checkOverflowMain(int row, int col);
00110 void checkOverflowPVM(int row, int col);
00111 void checkOverflowINTE(int row, int col);
00112 void checkOverflowSCF(int row, int col);
00113 void checkOverflowFORC(int row, int col);
00114 void addRowMain();
00115 void addRowPVM();
00116 void addRowINTE();
00117 void addRowSCF();
00118 void addRowFORC();
00119 void removeRowMain();
00120 void removeRowPVM();
00121 void removeRowINTE();
00122 void removeRowSCF();
00123 void removeRowFORC();
00124 void clearSelectionMain();
00125 void clearSelectionPVM();
00126 void clearSelectionINTE();
00127 void clearSelectionSCF();
00128 void clearSelectionFORC();
00129
00130 private:
00132 enum Categories{BASIC = 0, ADVANCED, PROPERTIES, SCFCONVERGENCE, PVM, DEBUG1, EXTRA,
00133 ADVANCED_METHOD, ADVANCED_SYMMETRY, ADVANCED_OTHER,
00134 PROPERTIES_CHARGES, PROPERTIES_OTHER,
00135 EXTRA_MAIN, EXTRA_PVM, EXTRA_INTE, EXTRA_SCF, EXTRA_FORC};
00136
00138 void makeConnections();
00139 void init();
00140 void fillComboBoxes();
00141 void saveWidgets();
00142 void restoreWidgets();
00143 QStringList parsedNUCLlines();
00144 void buildAtdens();
00145
00147 struct WidgetData
00150 {
00151
00153 unsigned int SCFMethod;
00154 unsigned int SCFType;
00155 bool useStartvector;
00156 QString startvector;
00157 bool preferStartvector;
00158 int charge;
00159
00161 bool useOneBasisset;
00162 unsigned int basisset1;
00163 unsigned int basissetAtom;
00164 unsigned int basisset2;
00165 vector<unsigned int> listAtoms;
00166 vector<unsigned int> listBasissets;
00167
00169 unsigned int MP2Type;
00170 unsigned int MP2ExcludeOcc;
00171 unsigned int MP2ExcludeVirt;
00172 bool MP2Density;
00173 bool useField;
00174 QString fieldX;
00175 QString fieldY;
00176 QString fieldZ;
00177 bool useSCRF;
00178 QString SCRFEpsilon;
00179 QString SCRFRadius;
00180
00182 bool useSymmetry;
00183 bool useSymmAuto;
00184 bool useSymmX;
00185 bool useSymmY;
00186 bool useSymmZ;
00187 bool useSymmXY;
00188 bool useSymmYZ;
00189 bool useSymmXZ;
00190 bool useSymmXYZ;
00191
00193 QString valueIpol;
00194 bool useSkpc;
00195 bool printGeop;
00196 bool printWF;
00197 bool printDM;
00198 bool useDST;
00199 bool useACD;
00200 bool saveF11;
00201 bool useFato;
00202 unsigned int numFato;
00203 bool useMIAForce;
00204
00206 bool useMulliken;
00207 bool MullikenNoOverlap;
00208 bool MullikenEachIter;
00209 bool useStock;
00210 unsigned int stockType;
00211 bool stockTotalDensity;
00212 unsigned int stockTransition1;
00213 unsigned int stockTransition2;
00214 bool useStockElmo;
00215 bool useStockEpar;
00216
00218 bool useBoys;
00219 unsigned int numBoysIter;
00220 QString BoysThreshold;
00221 QString listNucl;
00222 bool useElmo;
00223 bool useExit;
00224 bool useJab;
00225
00227 int numIter;
00228 bool useJacobi;
00229 bool useDIIS;
00230 QString DIISThre;
00231 int numDIISCoeff;
00232 QString valueLvsh;
00233 bool useDlvs;
00234 QString thresholdINTEa;
00235 QString thresholdINTEb;
00236 QString thresholdMIAa;
00237 QString thresholdMIAb;
00238 QString thresholdSCFa;
00239 QString thresholdSCFb;
00240 QString thresholdOverlapa;
00241 QString thresholdOverlapb;
00242 bool useVarThreMIA;
00243
00245 bool usePVM;
00246 QStringList PVMExcludeHosts;
00247 unsigned int PVMNumShells;
00248 unsigned int PVMNumTasks;
00249 bool notOnMaster;
00250 int valueNice;
00251 bool usePacked;
00252
00254 bool printDebugPVM;
00255 bool printDebugFORC;
00256 bool goonINTE;
00257 bool goonSCF;
00258 bool printIntegrals;
00259 bool printShells;
00260 unsigned int levelPrintSCF;
00261 unsigned int numVirtual;
00262
00264 unsigned int numLinesExtraMain;
00265 unsigned int numLinesExtraPVM;
00266 unsigned int numLinesExtraINTE;
00267 unsigned int numLinesExtraSCF;
00268 unsigned int numLinesExtraFORC;
00269 vector<unsigned int> hPosExtraMain;
00270 vector<unsigned int> hPosExtraPVM;
00271 vector<unsigned int> hPosExtraINTE;
00272 vector<unsigned int> hPosExtraSCF;
00273 vector<unsigned int> hPosExtraFORC;
00274 vector<unsigned int> vPosExtraMain;
00275 vector<unsigned int> vPosExtraPVM;
00276 vector<unsigned int> vPosExtraINTE;
00277 vector<unsigned int> vPosExtraSCF;
00278 vector<unsigned int> vPosExtraFORC;
00279 QStringList contentsExtraMain;
00280 QStringList contentsExtraPVM;
00281 QStringList contentsExtraINTE;
00282 QStringList contentsExtraSCF;
00283 QStringList contentsExtraFORC;
00284 };
00285 struct XMLData
00288 {
00290 QString SCFMethod;
00291 QString SCFType;
00292 QString useStartvector;
00293 QString startvector;
00294 QString preferStartvector;
00295 QString charge;
00297 QString useOneBasisset;
00298 QString basisset1;
00299 QString basissetAtom;
00300 QString basisset2;
00301 QString listAtoms;
00302 QString listBasissets;
00304 QString MP2Type;
00305 QString MP2ExcludeOcc;
00306 QString MP2ExcludeVirt;
00307 QString MP2Density;
00308 QString useField;
00309 QString fieldX;
00310 QString fieldY;
00311 QString fieldZ;
00312 QString useSCRF;
00313 QString SCRFEpsilon;
00314 QString SCRFRadius;
00316 QString useSymmetry;
00317 QString useSymmAuto;
00318 QString useSymmX;
00319 QString useSymmY;
00320 QString useSymmZ;
00321 QString useSymmXY;
00322 QString useSymmYZ;
00323 QString useSymmXZ;
00324 QString useSymmXYZ;
00326 QString valueIpol;
00327 QString useSkpc;
00328 QString printGeop;
00329 QString printWF;
00330 QString printDM;
00331 QString useDST;
00332 QString useACD;
00333 QString saveF11;
00334 QString useFato;
00335 QString numFato;
00336 QString useMIAForce;
00338 QString useMulliken;
00339 QString MullikenNoOverlap;
00340 QString MullikenEachIter;
00341 QString useStock;
00342 QString stockType;
00343 QString stockTotalDensity;
00344 QString stockTransition1;
00345 QString stockTransition2;
00346 QString useStockElmo;
00347 QString useStockEpar;
00349 QString useBoys;
00350 QString numBoysIter;
00351 QString BoysThreshold;
00352 QString listNucl;
00353 QString useElmo;
00354 QString useExit;
00355 QString useJab;
00357 QString numIter;
00358 QString useJacobi;
00359 QString useDIIS;
00360 QString DIISThre;
00361 QString numDIISCoeff;
00362 QString valueLvsh;
00363 QString useDlvs;
00364 QString thresholdINTEa;
00365 QString thresholdINTEb;
00366 QString thresholdMIAa;
00367 QString thresholdMIAb;
00368 QString thresholdSCFa;
00369 QString thresholdSCFb;
00370 QString thresholdOverlapa;
00371 QString thresholdOverlapb;
00372 QString useVarThreMIA;
00374 QString usePVM;
00375 QString PVMExcludeHosts;
00376 QString PVMNumShells;
00377 QString PVMNumTasks;
00378 QString notOnMaster;
00379 QString valueNice;
00380 QString usePacked;
00382 QString printDebugPVM;
00383 QString printDebugFORC;
00384 QString goonINTE;
00385 QString goonSCF;
00386 QString printIntegrals;
00387 QString printShells;
00388 QString levelPrintSCF;
00389 QString numVirtual;
00391 QString numLinesExtraMain;
00392 QString numLinesExtraPVM;
00393 QString numLinesExtraINTE;
00394 QString numLinesExtraSCF;
00395 QString numLinesExtraFORC;
00396 QString hPosExtraMain;
00397 QString hPosExtraPVM;
00398 QString hPosExtraINTE;
00399 QString hPosExtraSCF;
00400 QString hPosExtraFORC;
00401 QString vPosExtraMain;
00402 QString vPosExtraPVM;
00403 QString vPosExtraINTE;
00404 QString vPosExtraSCF;
00405 QString vPosExtraFORC;
00406 QString contentsExtraMain;
00407 QString contentsExtraPVM;
00408 QString contentsExtraINTE;
00409 QString contentsExtraSCF;
00410 QString contentsExtraFORC;
00411 };
00412
00414
00415 bool calcForces;
00416 QString calcDescription;
00417 QString calcName;
00418
00419 bool calcXF;
00420
00421 WidgetData data;
00422 bool widgetChanged;
00423 vector<QString> category;
00424 AtomSet* atoms;
00425
00427 static QStringList pvmHosts;
00428 static unsigned int preferredBasisset;
00429 static const XMLData xml;
00430 };
00431
00432 #endif
00433