MTK++ Latest version: 0.2.0

dcParser.h
Go to the documentation of this file.
00001 
00035 #ifndef DCPARSER_H
00036 #define DCPARSER_H
00037 
00038 #include <map>
00039 #include <vector>
00040 #include <iostream>
00041 #include <string>
00042 #include <fstream>
00043 #include <iomanip>
00044 
00045 #include "baseParser.h"
00046 
00047 namespace MTKpp
00048 {
00049 
00050 class collection;
00051 class molecule;
00052 class submolecule;
00053 class atom;
00054 class bond;
00055 class vector3d;
00056 
00057 // ============================================================
00058 // Class : dcParser()
00059 // ------------------------------------------------------------
00198 // ============================================================
00199 class dcParser : public baseParser
00200 {
00201 public:
00202 
00206     dcParser();
00207 
00209     virtual ~dcParser();
00210 
00216     void Read(const std::string &i, molecule* m);
00217 
00224     //void Read(const std::string &i, collection* c, const int &m);
00225 
00231     double ReadHOF(const std::string &i);
00232 
00238     double ReadElecEnergy(const std::string &i);
00239 
00249     void setHamiltonian(std::string ham) {
00250       hamiltonian = ham;
00251     }
00252 
00260     void setOptimizer(std::string opt) {
00261       bOpt = true;
00262       optimizer = opt;
00263     }
00264 
00273     void setMaxOpt(int i) {
00274       bMaxOpt = true;
00275       maxopt = i;
00276     }
00277 
00278     //void setSnapGeom(int i) snapGeom = i;
00279     // void setLSearch();
00280     // void setDiagTerm();
00281     // void setForceIt();
00282 
00291     //void setTransitionStateOptimization(std::string ts) tsOpt = ts;
00292 
00328     void setChargeModel(std::string chg) {
00329       bChargeModel = true;
00330       chargeModel = chg;
00331     }
00332 
00336     void setFrequency() {
00337       bFreq = true;
00338     }
00339 
00343     void setThermo() {
00344       bThermo = true;
00345     }
00346 
00366     void setCluster(int i) {
00367       if (i) {
00368         bCluster = true;
00369         bStandard = false;
00370       }
00371       else {
00372         bCluster = false;
00373       }
00374     }
00375 
00376     void setDBuff1(double d) {
00377       setCluster(1);
00378       dBuff1 = d;
00379     }
00380 
00381     void setDBuff2(double d) {
00382       setCluster(1);
00383       dBuff2 = d;
00384     }
00385 
00386     void setNoOverlap() {
00387       bNoOverlap = true;
00388     }
00389 
00390     void setStandard() {
00391       bStandard = true;
00392       bCluster = false;
00393     }
00394 
00411     void doScrf() {
00412       bScrf = true;
00413     }
00414 
00415     void setScrfScale(double i) {
00416       scrfScale = i;
00417     }
00418 
00422     void setDirect(int i) {
00423       if (i) {
00424         bDirect = true;
00425       }
00426       else {
00427         bDirect = false;
00428       }
00429     }
00430 
00434     void setResidue(int i) {
00435       if (i) {
00436         bResidue = true;
00437       }
00438       else {
00439         bResidue = false;
00440       }
00441     }
00442 
00446     void setPDump(int i) {
00447       bPDump = true;
00448       pDump = i;
00449     }
00450 
00454     void setDump(int i) {
00455       bDump = true;
00456       dump = i;
00457     }
00458 
00462     void setShift(double d) {
00463       if (d > -1) {
00464         bShift = true;
00465         shift = d;
00466       }
00467       else {
00468         bShift = false;
00469       }
00470     }
00471 
00475     //void setTrajectory(int i);
00476 
00480     void setCutBond(double d) {
00481       bCutBond = true;
00482       cutbond = d;
00483     }
00484 
00488     //void set1Scf();
00489 
00493     void setGuess() {
00494       bGuess = true;
00495     }
00496 
00500     //void setVdw();
00501 
00506     void setNMR() {
00507       bNMR = true;
00508     }
00509 
00515     void setCalNuc(unsigned int i) {
00516       calnum = i;
00517       this->setNMR();
00518     }
00519 
00524     void setPWD() {
00525       bPwd = true;
00526     }
00527 
00532     void setPWDatom() {
00533       bPwdAtom = true;
00534     }
00535 
00540     void setPWDresidue() {
00541       bPwdResidue = true;
00542     }
00543 
00548     void setPrtSub() {
00549       bPrtSub = true;
00550     }
00551 
00556     void setPrtVec() {
00557       bPrtVec = true;
00558     }
00559 
00564     void setPrtCoords() {
00565       bPrtCoords = true;
00566     }
00567 
00572     void setPrtPar() {
00573       bPrtPar = true;
00574     }
00575 
00580     void setPrtVdw() {
00581       bPrtVdw = true;
00582     }
00583 
00587     void setAddMM() {
00588       bAddMM = true;
00589     }
00590 
00594     void setNoMM() {
00595       bNoMM = true;
00596     }
00597 
00603     void setCoord(std::string coordSystem) {
00604       coord = coordSystem;
00605     }
00606 
00610     void setFullSCF() {
00611       bFullSCF = true;
00612     }
00613 
00617     void setMaxIt(int i) {
00618       bMaxIt = true;
00619       maxIt = i;
00620     }
00621 
00625     void setDouble(int d) {
00626       bDouble = true;
00627       iDouble = d;
00628     }
00629 
00633     void setIntegrals(std::string s) {
00634       bIntegrals = true;
00635       integrals = s;
00636     }
00637 
00641     void setTempK(double k) {
00642       bTempK = true;
00643       tempK = k;
00644     }
00645 
00649     void setMaxTime(int s) {
00650       bMaxTime = true;
00651       maxTime = s;
00652     }
00653 
00657     void setMinR(double d) {
00658       bMinR = true;
00659       minR = d;
00660     }
00661 
00665     void setCutRepul(double d) {
00666       bCutRepul = true;
00667       cutRepul = d;
00668     }
00669 
00673     void setChkRes() {
00674       bChkRes = true;
00675     }
00676 
00680     void setDos() {
00681       bDOS = true;
00682     }
00683 
00687     void setDipole() {
00688       bDipole = true;
00689     }
00690 
00694     void setIP() {
00695       bIP = true;
00696     }
00697 
00701     void setHomoLumo() {
00702       bHomoLumo = true;
00703     }
00704 
00708     void setScreen() {
00709       bScreen = true;
00710     }
00711 
00715     void setZMake() {
00716       bZmake = true;
00717     }
00718 
00722     void setQMAlign() {
00723       bQMAlign = true;
00724       this->setIntegrals("stewart");
00725     }
00726 
00730     void setImult(int i) {
00731       imult = i;
00732     }
00733 
00737     void setUhf(int i) {
00738       if (i) {
00739         bUhf = true;
00740       }
00741       else {
00742         bUhf = false;
00743       }
00744     }
00745 
00749     void setExternal(int i) {
00750       if (i) {
00751         bExternal = true;
00752       }
00753       else {
00754         bExternal = false;
00755       }
00756     }
00757 
00761     //void setRotate();
00762 
00766     //void setPush();
00767 
00774     void Write(const std::string &i, collection* c, bool &success);
00775 
00782     void Write(const std::string &i, molecule* m, bool &success);
00783 
00791     void Write(const std::string &i, molecule* m,
00792          std::vector< vector3d > &coordinates, bool &success);
00793 
00794 protected: // functions
00795 
00801     void readCoordinates(std::ifstream &idc, molecule* m);
00802 
00808     void readQMQSAR(std::ifstream &idc, molecule* m);
00809 
00815     void readNMR(std::ifstream &idc, molecule* m);
00816 
00820     bool check();
00821 
00825     void openInputFile(const std::string &i);
00826 
00830     void writeHead();
00831 
00835     void writeCoords();
00836 
00840     void writeCoords(std::vector< vector3d > &coordinates);
00841 
00845     void writeTail();
00846 
00847 protected: // data
00848  
00850     collection*        pCollection;
00851 
00853     molecule*          pMolecule;
00854 
00856     submolecule*       pSubMolecule;
00857 
00859     atom*              pAtom;
00860 
00862     typedef std::vector<molecule*>::iterator molIterator;
00863 
00865     typedef std::vector<submolecule*>::iterator sMolIterator;
00866 
00868     typedef std::vector<atom*>::iterator AtomIterator;
00869 
00871     typedef std::vector<std::string>::iterator strIterator;
00872 
00874     std::string        inputFileName;
00875 
00877     std::string        outputFileName;
00878 
00880     std::ofstream                 inputFileStream;
00881 
00883     std::string coord;
00884 
00886     bool bStandard;
00887 
00889     bool bCluster;
00890 
00892     double dBuff1;
00893 
00895     double dBuff2;
00896 
00898     bool bResidue;
00899 
00901     bool bDirect;
00902 
00904     std::string hamiltonian;
00905 
00907     bool bChargeModel;
00908 
00910     std::string chargeModel;
00911 
00913     bool bCutBond;
00914 
00916     double cutbond;
00917 
00919     bool bShift;
00920 
00922     double shift;
00923 
00925     bool bGuess;
00926 
00928     bool bPDump;
00929 
00931     int pDump;
00932 
00934     bool bDump;
00935 
00937     int dump;
00938 
00940     bool bDouble;
00941 
00943     int iDouble;
00944 
00946     bool bMaxOpt;
00947 
00949     unsigned int maxopt;
00950 
00952     bool bOpt;
00953 
00955     std::string optimizer;
00956 
00958     bool bScrf;
00959 
00961     double scrfScale;
00962 
00964     bool bWater;
00965 
00967     bool bOctanol;
00968 
00970     bool bNoOverlap;
00971 
00973     bool bScreen;
00974 
00976     bool bVdw;
00977 
00979     bool bDipole;
00980 
00982     bool bFreq;
00983 
00985     bool bThermo;
00986 
00988     bool bNMR;
00989 
00991     int calnum;
00992 
00994     bool bPwd;
00995 
00997     bool bPwdAtom;
00998 
01000     bool bPwdResidue;
01001 
01003     bool bPrtSub;
01004 
01006     bool bPrtVec;
01007 
01009     bool bPrtCoords;
01010 
01012     bool bPrtPar;
01013 
01015     bool bPrtVdw;
01016 
01018     bool bAddMM;
01019 
01021     bool bNoMM;
01022 
01024     bool bFullSCF;
01025 
01027     bool bMaxIt;
01028 
01030     int  maxIt;
01031 
01033     bool bCutRepul;
01034 
01036     double cutRepul;
01037 
01039     bool bIntegrals;
01040 
01042     std::string integrals;
01043 
01045     bool bTempK;
01046 
01048     double tempK;
01049 
01051     bool bMaxTime;
01052 
01054     int maxTime;
01055 
01057     bool bMinR;
01058 
01060     double minR;
01061 
01063     bool bQMAlign;
01064 
01066     bool bChkRes;
01067 
01069     bool bDOS;
01070 
01072     bool bIP;
01073 
01075     bool bHomoLumo;
01076 
01078     bool bZmake;
01079 
01081     int imult;
01082 
01084     bool bUhf;
01085 
01087     bool bExternal;
01088 };
01089 
01090 } // MTKpp namespace
01091 
01092 #endif // DCPARSER_H
01093 

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