Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OB_CHAINS_H
00022 #define OB_CHAINS_H
00023
00024 #define MaxMonoAtom 20
00025 #define MaxMonoBond 20
00026
00027 #include <openbabel/babelconfig.h>
00028 #include <vector>
00029
00030 namespace OpenBabel
00031 {
00032
00033 class OBAtom;
00034 class OBMol;
00035
00037
00038 struct Template;
00039 typedef struct Template Template;
00040
00049 class OBAPI OBChainsParser
00050 {
00051 public:
00052
00053 OBChainsParser(void);
00054 ~OBChainsParser(void);
00055
00062 bool PerceiveChains(OBMol &mol, bool nukeSingleResidue = false);
00063
00064 private:
00065
00067
00068
00075 bool DetermineHetAtoms(OBMol &);
00077
00079
00080
00089 bool DetermineConnectedChains(OBMol &);
00098 unsigned int RecurseChain(OBMol &mol, unsigned int i, int c);
00100
00102
00103
00110 bool DeterminePeptideBackbone(OBMol &);
00121 void ConstrainBackbone(OBMol &mol, Template *templ, int tmax);
00125 bool MatchConstraint(OBAtom *atom, int mask);
00130 bool Match2Constraints(Template *templ, OBAtom *na, OBAtom *nb);
00135 bool Match3Constraints(Template *templ, OBAtom *na, OBAtom *nb, OBAtom *nc);
00140 bool Match4Constraints(Template *templ, OBAtom *na, OBAtom *nb, OBAtom *nc, OBAtom *nd);
00150 void TracePeptideChain(OBMol &mol, unsigned int i, int r);
00152
00154
00155
00161 bool DeterminePeptideSidechains(OBMol &);
00173 int IdentifyResidue(void *tree, OBMol &mol, unsigned int seed, int resno);
00181 void AssignResidue(OBMol &mol, int r, int c, int i);
00183
00185
00186
00190 bool DetermineHydrogens(OBMol &);
00192
00194
00195
00201 void SetResidueInformation(OBMol &, bool nukeSingleResidue);
00203
00205
00206
00213 bool DetermineNucleicBackbone(OBMol &);
00221 void TraceNucleicChain(OBMol &, unsigned int i, int r);
00228 bool DetermineNucleicSidechains(OBMol &);
00230
00235 void SetupMol(OBMol &);
00239 void ClearResidueInformation(OBMol &mol);
00243 void CleanupMol();
00250 void DefineMonomer(void **tree, int resid, const char *smiles);
00255 int IdentifyElement(char *ptr);
00261 const char *ParseSmiles(const char *smiles, int prev);
00265 void DumpState();
00266
00267 void *PDecisionTree;
00268 void *NDecisionTree;
00269
00270 int ResMonoAtom[MaxMonoAtom];
00271 int ResMonoBond[MaxMonoBond];
00272
00273 std::vector<unsigned short> bitmasks;
00274 std::vector<bool> visits;
00275 std::vector<unsigned char> resids;
00276 std::vector<unsigned char> flags;
00277 std::vector<bool> hetflags;
00278 std::vector<int> atomids;
00279 std::vector<short> resnos;
00280 std::vector<short> sernos;
00281 std::vector<char> hcounts;
00282 std::vector<char> chains;
00283 };
00284
00285 }
00286 #endif // OB_CHAINS_H
00287