MTK++ Latest version: 0.2.0

gaussianParser.h
Go to the documentation of this file.
00001 
00035 #ifndef GAUSSIANPARSER_H
00036 #define GAUSSIANPARSER_H
00037 
00038 #include <map>
00039 #include <vector>
00040 #include <iostream>
00041 #include <string>
00042 #include <fstream>
00043 #include <iomanip>
00044 #include <algorithm>
00045 
00046 #include "baseParser.h"
00047 
00048 #include "Statistics/sheet.h"
00049 #include "Statistics/table.h"
00050 
00051 namespace MTKpp
00052 {
00053 
00054 class collection;
00055 class molecule;
00056 class submolecule;
00057 class atom;
00058 class element;
00059 class connections;
00060 struct Bond;
00061 struct Angle;
00062 struct Torsion;
00063 struct Improper;
00064 class vector3d;
00065 class zmatParser;
00066 
00067 // ============================================================
00068 // Class : gaussianParser()
00069 // ------------------------------------------------------------
00077 // ============================================================
00078 class gaussianParser : public baseParser
00079 
00080 {
00081 public:
00082 
00086     gaussianParser();
00087 
00089     ~gaussianParser();
00090 
00096     void           Read(const std::string &i, sheet* pSheet = 0);
00097 
00104     void           Write(const std::string &o, molecule* m);
00105 
00113     void           Write(const std::string &o, molecule* m, std::vector< vector3d > &coordinates);
00114 
00122     void           Write(const std::string &o, collection* c, const int &molID);
00123 
00128     int            generateZMatrix(molecule* m);
00129 
00134     void           readMappingFile(std::string f);
00135 
00140     void           writeMappingFile(std::string m);
00141 
00146     void           addCommandOption(const std::string &c);
00147 
00153     void           addCommandOption(const std::string &c, const std::string &o);
00154 
00160     void           addCommandOption(const std::string &c, std::vector<std::string> &o);
00161 
00166     std::vector<std::string> getCommandOption(const std::string &c);
00167 
00172     void           removeCommandOption(const std::string &c);
00173 
00178     void           addIop(const std::string &i);
00179 
00183     void           clearIop();
00184 
00189     void           setChkPt(const std::string &c);
00190 
00195     void           setMem(const std::string &m);
00196 
00201     void           setNProc(const std::string &n);
00202 
00207     void           setTheory(const std::string &t);
00208 
00213     void           setBasisSet(const std::string &b);
00214 
00219     void           setBasisSetFile(const std::string &b);
00220 
00225     void           setPseudoPotentialFile(const std::string &b);
00226 
00231     void           setModRedundantFile(const std::string &b);
00232 
00237     void           setCharge(const int &i);
00238 
00243     void           setMultiplicity(const int &i);
00244 
00249     void           setVerbosity(const std::string &i);
00250 
00255     void           setInternal(int i);
00256 
00261     void           setCartesian(int i);
00262 
00266     void           setNoCoords();
00267 
00272     void           setWriteMoleculeName(int i);
00273 
00278     void           setWriteChargeAndMult(int i);
00279 
00285     void           setMKRadii(std::string e, double d);
00286 
00292     void           readFormattedChkPtFile(std::string fchkPtFile, sheet* pSheet);
00293 
00303     int            getForceConstant(sheet* pSheet, int i, int j, double& r, double& fc);
00304 
00315     int            getForceConstant(sheet* pSheet, int i, int j, int k, double& a, double& fc);
00316 
00325     int            getForceConstantZMAT(int i, int j, double& r, double& fc);
00326 
00336     int            getForceConstantZMAT(int i, int j, int k, double& a, double& fc);
00337 
00341     std::vector<double> getFrequencies();
00342 
00343 protected:
00345     std::string    itsChkPtFile;
00346 
00348     bool           bChkPt;
00349 
00351     std::string    itsMem;
00352 
00354     bool           bMem;
00355 
00357     std::string    itsNProc;
00358 
00360     bool           bNProc;
00361 
00363     bool           bWriteInternalCoords;
00364 
00366     bool           bWriteCartCoords;
00367 
00369     bool           bWriteMoleculeName;
00370 
00372     bool           bWriteChargeAndMult;
00373 
00375     std::string    itsTheory;
00376 
00378     std::string    itsBasisSet;
00379 
00381     std::string    itsBasisSetFile;
00382 
00384     std::string    itsPseudoPotentialFile;
00385 
00387     std::string    itsModRedundantFile;
00388 
00390     int            itsCharge;
00391 
00393     int            itsMultiplicity;
00394 
00396     std::string    itsVerbosity;
00397 
00399     std::map<std::string, std::vector<std::string> > itsCommandOptions;
00400 
00402     std::map<std::string, double> itsMKRadii;
00403 
00405     typedef std::map<std::string, std::vector<std::string> >::iterator mapIterator;
00406 
00408     typedef std::map<std::string, double>::iterator dMapIterator;
00409 
00411     std::vector<std::string> iops;
00412 
00413     // Z-MATRIX
00415     zmatParser* pZmatParser;
00416 
00418     bool bZMatrixGenerated;
00419 
00421     std::vector<std::vector<std::string> >  zmatrix;
00422 
00424     std::vector<std::vector<int> >          zmatrixBonds;
00425 
00427     std::vector<std::vector<int> >          zmatrixAngles;
00428 
00430     std::vector<std::vector<int> >          zmatrixTorsions;
00431 
00433     std::map<std::string, double>           zmatData;
00434 
00436     std::vector<std::string>                zmatDataAngles;
00437 
00439     std::vector<std::string>                zmatDataTorsions;
00440 
00442     std::vector<std::string>                zmatDataNames;
00443 
00445     std::map<std::string, int>              zmatDataType;
00446 
00448     std::map<std::string, double>           forceConstants;
00449 
00451     std::vector<double>                     frequencies;
00452 
00454     std::map<int, int>                      atomMap;
00455 
00457     typedef std::map<int, int>::iterator    iMapIterator;
00458 
00460     bool                                    bModRedundant;
00461 
00463     std::map<int, std::string>              modRedBonds;
00464 
00466     std::map<ULONG_KIND, std::string>       modRedAngles;
00467 
00469     std::map<int, std::string>              modRedDihedrals;
00470 
00472     std::vector<std::string>                atomLabels;
00473 
00475     std::vector<vector3d*>                  molCoords;
00476 
00478     //ublas::matrix<double, ublas::column_major> eigenvectors;
00479     Eigen::Matrix<double, Dynamic, Dynamic> eigenvectors;
00480 
00482     table<std::string>*                     pGaussAtoms;
00483 
00485     table<double>*                          pGaussCoords;
00486 
00488     table<double>*                          pGaussEValues;
00489 
00491     table<double>*                          pGaussEVectors;
00492 };
00493 
00494 } // MTKpp namespace
00495 
00496 #endif // GAUSSIANPARSER_H

Generated on Fri Dec 23 2011 09:28:50 for MTK++ by Doxygen 1.7.5.1