00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OB_TYPER_H
00021 #define OB_TYPER_H
00022
00023 #include "parsmart.h"
00024 #include "data.h"
00025
00026 namespace OpenBabel
00027 {
00028
00029
00030 class OBAPI OBAtomTyper : public OBGlobalDataBase
00031 {
00032
00033 std::vector<std::vector<int> > _mlist;
00034 std::vector<std::pair<OBSmartsPattern*,int> > _vinthyb;
00035 std::vector<std::pair<OBSmartsPattern*,int> > _vimpval;
00036 std::vector<std::pair<OBSmartsPattern*,std::string> > _vexttyp;
00037
00038 public:
00039 OBAtomTyper();
00040 ~OBAtomTyper();
00041
00042 void ParseLine(const char*);
00044 unsigned int GetSize() { return _vimpval.size();}
00045
00047 void AssignHyb(OBMol&);
00049 void AssignTypes(OBMol&);
00052 void AssignImplicitValence(OBMol&);
00054 void CorrectAromaticNitrogens(OBMol&);
00055 };
00056
00057
00058 class OBAPI OBAromaticTyper : public OBGlobalDataBase
00059 {
00060 std::vector<bool> _vpa;
00061 std::vector<bool> _visit;
00062 std::vector<bool> _root;
00063 std::vector<std::vector<int> > _mlist;
00064 std::vector<OBSmartsPattern*> _vsp;
00065 std::vector<std::pair<int,int> > _verange;
00066 std::vector<std::pair<int,int> > _velec;
00067 public:
00068 OBAromaticTyper();
00069 ~OBAromaticTyper();
00070
00072 unsigned int GetSize() { return _vsp.size();}
00073
00074 void ParseLine(const char*);
00076 void AssignAromaticFlags(OBMol &);
00077 void PropagatePotentialAromatic(OBAtom*);
00078 void SelectRootAtoms(OBMol &, bool avoidInnerRingAtoms = true);
00080 void ExcludeSmallRing(OBMol &);
00082 void CheckAromaticity(OBAtom *root,int searchDepth);
00083 bool TraverseCycle(OBAtom*,OBAtom*,OBBond*,std::pair<int,int>&,int);
00084 };
00085
00086 }
00087
00088 #endif // OB_TYPER_H
00089