ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/openbabel/chains.hpp
(Generate patch)

Comparing trunk/src/openbabel/chains.hpp (file contents):
Revision 741 by tim, Wed Nov 16 19:42:11 2005 UTC vs.
Revision 1081 by gezelter, Thu Oct 19 20:49:05 2006 UTC

# Line 2 | Line 2 | Copyright (C) 1998-2001 by OpenEye Scientific Software
2   chains.h - Parse for macromolecule chains and residues
3  
4   Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
5 < Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
5 > Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
6  
7   This file is part of the Open Babel project.
8   For more information, see <http://openbabel.sourceforge.net/>
# Line 26 | Line 26 | namespace OpenBabel
26   namespace OpenBabel
27   {
28  
29 < class OBAtom;
30 < class OBMol;
29 >  class OBAtom;
30 >  class OBMol;
31  
32 < //! Structure for atomic patterns (templates) in residues for OBChainsParser
33 < typedef struct
34 < {
35 <    int flag;
36 <    short elem, count;
37 <    int n1, n2, n3, n4;
38 < }
39 < Template;
32 >  //! Structure for atomic patterns (templates) in residues for OBChainsParser
33 >  //! Implementation and documentation in chains.cpp
34 >  typedef struct Template Template;
35  
36 < //! \brief Perceives peptide or nucleotide chains and residues in an OBMol
37 < class OBAPI OBChainsParser
38 < {
39 < public:
36 >  //! \brief Perceives peptide or nucleotide chains and residues in an OBMol
37 >  //
38 >  //! Perceive peptide or nucleotide chains and residues from atom connectivity.
39 >  //! Based on original RasMol code by Roger Sayle and modified by Joe Corkery.
40 >  //! For more on Roger's original talk, see:
41 >  //!  http://www.daylight.com/meetings/mug96/sayle/sayle.html
42 >  class OBAPI OBChainsParser
43 >    {
44 >    public:
45  
46 <    OBChainsParser(void);
47 <    ~OBChainsParser(void);
46 >      OBChainsParser(void);
47 >      ~OBChainsParser(void);
48  
49 <    bool PerceiveChains(OBMol &, bool nukeSingleResidue = false);
49 >      //! Perceive macromolecular (peptide and nucleotide) residues and chains
50 >      //! \param mol - the molecule to parse and update
51 >      //! \param nukeSingleResidue - if only one residue is found, clear information
52 >      //!   default = false  -- single residue files should still be recognized.
53 >      bool PerceiveChains(OBMol &mol, bool nukeSingleResidue = false);
54  
55 < private: // methods
55 >    private: // internal methods
56  
57 <    bool  DetermineHetAtoms(OBMol &);
58 <    bool  DetermineConnectedChains(OBMol &);
59 <    bool  DeterminePeptideBackbone(OBMol &);
60 <    bool  DeterminePeptideSidechains(OBMol &);
61 <    bool  DetermineNucleicBackbone(OBMol &);
62 <    bool  DetermineNucleicSidechains(OBMol &);
63 <    bool  DetermineHydrogens(OBMol &);
57 >      bool  DetermineHetAtoms(OBMol &);
58 >      bool  DetermineConnectedChains(OBMol &);
59 >      bool  DeterminePeptideBackbone(OBMol &);
60 >      bool  DeterminePeptideSidechains(OBMol &);
61 >      bool  DetermineNucleicBackbone(OBMol &);
62 >      bool  DetermineNucleicSidechains(OBMol &);
63 >      bool  DetermineHydrogens(OBMol &);
64  
65 <    void  SetupMol(OBMol &);
66 <    void  SetResidueInformation(OBMol &, bool nukeSingleResidue);
67 <    void  ClearResidueInformation(OBMol &);
68 <    void  CleanupMol(void);
65 >      void  SetupMol(OBMol &);
66 >      void  SetResidueInformation(OBMol &, bool nukeSingleResidue);
67 >      void  ClearResidueInformation(OBMol &);
68 >      void  CleanupMol(void);
69  
70 <    void  AssignResidue(OBMol &, int, int, int);
71 <    int   IdentifyResidue(void *, OBMol &, int, int); // ByteCode *
70 >      void  AssignResidue(OBMol &, int, int, int);
71 >      int   IdentifyResidue(void *, OBMol &, int, int); // ByteCode *
72  
73 <    void  DefineMonomer(void **, int, char *); // ByteCode **
74 <    int   IdentifyElement(char *);
73 >      void  DefineMonomer(void **, int, char *); // ByteCode **
74 >      int   IdentifyElement(char *);
75  
76 <    bool  MatchConstraint(OBAtom *, int);
77 <    bool  Match2Constraints(Template *, OBAtom *, OBAtom *);
78 <    bool  Match3Constraints(Template *, OBAtom *, OBAtom *, OBAtom *);
79 <    bool  Match4Constraints(Template *, OBAtom *, OBAtom *, OBAtom *, OBAtom *);
76 >      bool  MatchConstraint(OBAtom *, int);
77 >      bool  Match2Constraints(Template *, OBAtom *, OBAtom *);
78 >      bool  Match3Constraints(Template *, OBAtom *, OBAtom *, OBAtom *);
79 >      bool  Match4Constraints(Template *, OBAtom *, OBAtom *, OBAtom *, OBAtom *);
80  
81 <    void  ConstrainBackbone(OBMol &, Template *, int);
81 >      void  ConstrainBackbone(OBMol &, Template *, int);
82  
83 <    int   RecurseChain(OBMol &, int, int);
84 <    void  TraceNucleicChain(OBMol &, int, int);
85 <    void  TracePeptideChain(OBMol &, int, int);
83 >      int   RecurseChain(OBMol &, int, int);
84 >      void  TraceNucleicChain(OBMol &, int, int);
85 >      void  TracePeptideChain(OBMol &, int, int);
86  
87 <    char *ParseSmiles(char *, int);
87 >      char *ParseSmiles(char *, int);
88  
89 < private: // members
89 >    private: // members
90  
91 <    void *PDecisionTree; // ByteCode *
92 <    void *NDecisionTree; // ByteCode *
91 >      void *PDecisionTree; // ByteCode *
92 >      void *NDecisionTree; // ByteCode *
93  
94 <    int   ResMonoAtom[MaxMonoAtom];
95 <    int   ResMonoBond[MaxMonoBond];
94 >      int   ResMonoAtom[MaxMonoAtom];
95 >      int   ResMonoBond[MaxMonoBond];
96  
97 <    unsigned short *bitmasks;
98 <    unsigned char  *resids;
99 <    unsigned char  *flags;
100 <    bool           *hetflags;
101 <    short          *atomids;
102 <    short          *resnos;
103 <    short          *sernos;
104 <    char           *hcounts;
105 <    char           *chains;
106 < };
97 >      unsigned short *bitmasks;
98 >      unsigned char  *resids;
99 >      unsigned char  *flags;
100 >      bool           *hetflags;
101 >      short          *atomids;
102 >      short          *resnos;
103 >      short          *sernos; //!< array of residue serial numbers
104 >      char           *hcounts;
105 >      char           *chains;
106 >    };
107  
108   }
109   #endif // OB_CHAINS_H

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines