MTK++ Latest version: 0.2.0

hybridize.h
Go to the documentation of this file.
00001 
00033 #ifndef HYBRIDIZE_H
00034 #define HYBRIDIZE_H
00035 
00036 #include <iostream>
00037 #include <string>
00038 #include <vector>
00039 #include <map>
00040 #include <algorithm>
00041 #include <cmath>
00042 #include <math.h>
00043 #include "Utils/constants.h"
00044 
00045 // - BOOST - //
00046 /*
00047 #include <boost/numeric/ublas/symmetric.hpp>
00048 #include <boost/numeric/ublas/matrix.hpp>
00049 #include <boost/numeric/ublas/io.hpp>
00050 #include <boost/numeric/ublas/banded.hpp> // for diagonal matrix
00051 #include <boost/numeric/bindings/blas/blas3.hpp>
00052 #include "boost/numeric/bindings/traits/ublas_matrix.hpp"
00053 #include "boost/numeric/bindings/traits/ublas_vector.hpp"
00054 
00055 namespace ublas  = boost::numeric::ublas;
00056 namespace blas   = boost::numeric::bindings::blas;
00057 */
00058 namespace MTKpp
00059 {
00060 
00061 class collection;
00062 class molecule;
00063 class submolecule;
00064 class atom;
00065 struct Bond;
00066 class vector3d;
00067 
00068 // ============================================================
00069 // Class : hybridize()
00070 // ------------------------------------------------------------
00255 // ============================================================
00256 class hybridize
00257 {
00258 public:
00264     hybridize(molecule *parent, std::string paramFile);
00265 
00267     virtual ~hybridize();
00268 
00274     int run();
00275 
00283     int runMeng();
00284 
00292     int runLabute();
00293 
00294 protected: // FUNCTIONS
00295 
00297     int readParameters();
00298 
00300     void lSplitString(std::string& s, const std::string s2, std::vector<std::string>& v, int i);
00301 
00303     int runLabute1();
00304 
00306     int runLabute2();
00307 
00309     int runLabute3();
00310 
00312     void COM(std::vector<atom*> atoms, vector3d* c);
00313 
00315     void setHybridizations();
00316 
00318     void setFormalCharges();
00319 
00320 protected: // DATA
00321 
00322     //---------------//
00323     // -  POINTERS - //
00324     //---------------//
00325 
00327     molecule*                pParent;
00328 
00330     std::string              parameterFile;
00331 
00333     double                   smallOutOfPlaneDihedral;
00334 
00336     std::map<std::string, double> singleBonds;
00337 
00339     typedef std::map<std::string, double>::iterator mapIterator;
00340 
00342     std::map<std::string, std::vector<double> > logLikelihoodRatios;
00343 
00345     typedef std::map<std::string, std::vector<double> >::iterator logLikelihoodRatiosIterator;
00346 
00348     double                   edgeWeightSingle;
00349 
00351     double                   edgeWeightDouble;
00352 
00354     double                   tripleBondParameter;
00355 
00357     atom*                    pAtom;
00358 
00360     Bond*                    pBond;
00361 
00363     std::vector<atom*> atomList;
00364 
00366     unsigned int nAtoms;
00367 
00369     std::vector<int> dim;
00370 
00372     std::vector<int> B;
00373 
00375     std::vector<int> Q;
00376 
00378     std::vector<int> atNumbers;
00379 
00381     std::vector<int> atGroups;
00382 
00384     std::vector<int> atPeriods;
00385 
00387     std::vector<int> formalCharges;
00388 
00390     std::vector<std::string> atSymbols;
00391 
00393     std::vector<double> atENs;
00394 
00396     std::vector<int> planarFlags;
00397 
00399     std::vector<int> hybridizations;
00400 
00402     std::map<int, Bond*> bonds;
00403 
00405     typedef std::map<int, Bond*>::iterator BondMapIterator;
00406 
00408     std::vector<std::vector<int> > bdAtoms;
00409 
00411     std::string errorMessage;
00412 };
00413 
00414 } // MTKpp namespace
00415 
00416 #endif // HYBRIDIZE_H
00417 

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