MTK++ Latest version: 0.2.0

pdbParser.h
Go to the documentation of this file.
00001 
00036 #ifndef PDBPARSER_H
00037 #define PDBPARSER_H
00038 
00039 #include <map>
00040 #include <list>
00041 
00042 #include "StringManip.h"
00043 #include "baseParser.h"
00044 
00045 namespace MTKpp
00046 {
00047 
00048 class collection;
00049 class molecule;
00050 class submolecule;
00051 class atom;
00052 class metalCenter;
00053 class vector3d;
00054 struct Bond;
00055 
00062 struct pdbInfo {
00064     double resolution;
00065 
00067     std::string expTechnique;
00068     
00070     std::vector<std::string> remarks;
00071 };
00072 
00073 
00074 // ============================================================
00075 // Class : pdbParser()
00076 // ------------------------------------------------------------
00085 // ============================================================
00086 class pdbParser : public baseParser
00087 {
00088 
00089 public:
00093     pdbParser();
00094 
00096     ~pdbParser();
00097 
00103     void           Read(const std::string &i, collection* c);
00104 
00111     void           Read(const std::string &i, collection* c, molecule* m);
00112 
00118     void           updateMolCoords(const std::string &i, molecule* m);
00119 
00125     void           Write(const std::string &o, molecule* m);
00126 
00132     void           Write(const std::string &o, std::vector<molecule*> m);
00133 
00139     void           Write(const std::string &o, collection* c);
00140 
00147     void           Write(const std::string &o, collection* c, const double d);
00148 
00155     void            Write(const std::string &o, molecule* m, std::vector< vector3d > &coordinates);
00156 
00162     void            Write(const std::string &o, metalCenter* m);
00163 
00169     void            Write(std::ostream& os, collection* c);
00170 
00174     double getTotalCharge() {
00175       return totalCharge;
00176     };
00177 
00181     bool hasTotalCharge() {
00182       return hasTotalChargeRemark;
00183     };
00184 
00188     pdbInfo*       itsPdbInfo;
00189 
00193     double totalCharge;
00194     bool hasTotalChargeRemark;
00195 
00196 protected: // functions
00197 
00201     void           setInfo();
00202 
00208     std::string get1LCode(std::string s);
00209 
00223     std::string determineType(std::string s, std::string r, bool a, bool b);
00224 
00225 protected: // data
00226 
00228     // - pointers to the backbone objects - //
00230 
00232     collection*    pCollection;
00233 
00235     molecule*      pMolecule;
00236 
00238     submolecule*   pSubMolecule;
00239 
00241     atom*          pAtom;
00242 
00244     atom*          pAtom1;
00245 
00247     atom*          pAtom2;
00248 
00250     Bond*          pBond;
00251 
00253     std::map<int, int>  itsAtomMap;
00254 
00256     vector3d*      pCoord1;
00257 
00259     vector3d*      pCoord2;
00260 
00262     typedef std::vector<molecule*>::iterator moleculeIterator;
00263 
00265     typedef std::vector<atom*>::iterator atomIterator;
00266 
00268     typedef std::multimap<atom*,atom*> itsConectMMap_ptrs;
00269 
00271     std::list<atom*>    listConect_ptrs;
00272 
00274     std::map<std::string, std::string> res21l;
00275 
00277     typedef std::map<std::string, std::string>::iterator nameMapIterator;
00278 };
00279 
00280 } // MTKpp namespace
00281 
00282 #endif // PDBPARSER_H

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