MTK++ Latest version: 0.2.0

metalCenter.h
Go to the documentation of this file.
00001 
00035 #ifndef METALCENTER_H
00036 #define METALCENTER_H
00037 
00038 #include "Utils/constants.h"
00039 
00040 #include <iostream>
00041 #include <string>
00042 #include <vector>
00043 #include <map>
00044 #include <algorithm>
00045 #include <fstream>
00046 #include <iomanip>
00047 #include <stdlib.h>
00048 #include <sstream>
00049 
00050 namespace MTKpp
00051 {
00052 class collection;
00053 class molecule;
00054 class submolecule;
00055 class atom;
00056 class Bond;
00057 class Angle;
00058 class Torsion;
00059 class vector3d;
00060 class stdLibrary;
00061 class stdGroup;
00062 class stdFrag;
00063 struct stdAtom;
00064 struct bondParam;
00065 struct angleParam;
00066 struct torsionParam;
00067 
00068 // ============================================================
00069 // Class : metalCenter()
00070 // ------------------------------------------------------------
00075 // ============================================================
00076 class metalCenter
00077 {
00078 public:
00079 
00083     metalCenter(atom* metal, std::map<std::string, double> m_d);
00084 
00088     virtual ~metalCenter();
00089 
00093     void setName(std::string n) {itsName = n;}
00094 
00098     std::string getName() {return itsName;}
00099 
00103     atom* getMetalAtom();
00104 
00108     void setPdb(std::string f);
00109 
00113     void setError(int e);
00114 
00118     int getError();
00119 
00123     void addAtom(atom* a);
00124 
00128     void addLabel(std::string s);
00129 
00133     std::string getPrimaryShell();
00134 
00139     void getPrimaryShellAtoms(std::vector<atom*>& vSA);
00140 
00144     std::string getSecondaryShell();
00145 
00150     void getSecondaryShellAtoms(std::vector<atom*>& vSA);
00151 
00155     std::string getGeometry();
00156 
00160     double getGeometryRMS();
00161 
00165     void checkBidentate(int at1, int at2);
00166 
00170     void assignBondType();
00171 
00175     void writeEnvironment(std::string file_name);
00176 
00180     void assignGeometry();
00181 
00185     void print(std::ostream& os);
00186 
00190     std::string getInfo();
00191 
00195     void test4Coord(std::vector<atom*> atoms);
00196 
00200     void test5Coord(std::vector<atom*> atoms);
00201 
00205     void test6Coord(std::vector<atom*> atoms);
00206 
00211     void setStdGroup(stdGroup* pStdG);
00212 
00217     stdGroup* getStdGroup();
00218 
00229     Bond*                    addBond(atom* at1, atom* at2,
00230                                      const int& type = 1,
00231                                      const int& stereo = 0,
00232                                      const int& topology = 0,
00233                                      const double& size = 0.0);
00234 
00241     bool                     hasBond(atom* at1, atom* at2);
00242 
00247     std::map<int, Bond*>     getBondMap();
00248 
00253     int                      numBonds();
00254 
00263     Angle*                   addAngle(atom* at1, atom* at2, atom* at3,
00264                                       const double& ang = 0.0);
00265 
00273     bool                     hasAngle(atom* at1,atom* at2,atom* at3);
00274 
00279     std::map<ULONG_KIND, Angle*>    getAngleMap();
00280 
00285     int                      numAngles();
00286 
00296     Torsion*                 addTorsion(atom* at1,atom* at2,
00297                                         atom* at3,atom* at4,
00298                                         const double& tor);
00299 
00308     bool                     hasTorsion(atom* at1,atom* at2,
00309                                         atom* at3,atom* at4);
00310 
00315     std::map<ULONG_KIND, Torsion*>     getTorsionMap();
00316 
00321     int                                numTorsions();
00322 
00323 protected:
00324 
00326     std::string              itsName;
00327 
00329     atom*                    metalAtom;
00330 
00332     molecule*                pMolecule;
00333 
00335     collection*              pCollection;
00336 
00338     stdLibrary*              pStdLibrary;
00339 
00341     vector3d*                metalCoords;
00342 
00344     std::vector<atom*>       itsBondedAtoms;
00345 
00347     std::vector<std::string> itsLabels;
00348 
00350     std::vector<std::string> itsResNames;
00351 
00353     std::vector<int>         itsResNums;
00354 
00356     std::map<std::string, double> metal_donors;
00357 
00359     std::vector<std::string> coordinationType;
00360 
00362     std::vector<bool>        assigned;
00363 
00365     std::string              primaryShell;
00366 
00368     std::string              secondaryShell;
00369 
00371     std::string              pdbFile;
00372 
00382     std::string              geometry1;
00383 
00393     std::string              geometry2;
00394 
00398     double                   geometry1RMS;
00399 
00403     double                   geometry2RMS;
00404 
00406     int                      error;
00407 
00409     stdGroup*                pStdGroup;
00410 
00412     typedef std::map<std::string, double>::iterator strDbMapIterator;
00413 
00415     typedef std::map<std::string, int>::iterator strIntMapIterator;
00416 
00418     typedef std::map<std::string, std::string>::iterator strStrMapIterator;
00419 
00421     typedef std::vector<unsigned int>::iterator intVectorIterator;
00422 
00424     typedef std::map<int, Bond*>::iterator BondMapIterator;
00425 
00427     typedef std::map<ULONG_KIND, Angle*>::iterator AngleMapIterator;
00428 
00430     typedef std::map<ULONG_KIND, Torsion*>::iterator TorsionMapIterator;
00431 
00433     Bond*                    pBond;
00434 
00436     Angle*                   pAngle;
00437 
00439     Torsion*                 pTorsion;
00440 
00442     bondParam*               pBondParam;
00443 
00445     angleParam*              pAngleParam;
00446 
00448     torsionParam*            pTorsionParam;
00449 
00451     std::map<int, Bond*>     itsBondMap;
00452 
00454     std::map<ULONG_KIND, Angle*>    itsAngleMap;
00455 
00457     std::map<ULONG_KIND, Torsion*> itsTorsionMap;
00458 };
00459 
00460 // ============================================================
00461 // Class : metalGroup()
00462 // ------------------------------------------------------------
00468 // ============================================================
00469 class metalGroup
00470 {
00471 public:
00472 
00476     metalGroup();
00477 
00481     virtual ~metalGroup();
00482 
00486     void addMetalCenter(metalCenter* m);
00487 
00491     std::vector<metalCenter*> getMetalCenters();
00492 
00493 private:
00495     std::vector<metalCenter*> metalCenters;
00496 };
00497 
00498 } // MTKpp namespace
00499 
00500 #endif // METALCENTER_H

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