This file is indexed.

/usr/include/openbabel-2.0/openbabel/residue.h is in libopenbabel-dev 2.3.2+dfsg-2.2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
/**********************************************************************
residue.h - Defines for residue properties, names, etc.

Copyright (C) 2001, 2002  OpenEye Scientific Software, Inc.
Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison

This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
***********************************************************************/

/**********************************************************************
Global arrays Residue, ElemDesc and function GetResidueNumber were
obtained in part or whole from RasMol2 by Roger Sayle.
***********************************************************************/

#ifndef OB_RESIDUE_H
#define OB_RESIDUE_H

#include <openbabel/babelconfig.h>

#ifndef EXTERN
#  define EXTERN extern
#endif

#include <vector>
#include <string>

#include <openbabel/base.h>

namespace OpenBabel {

  class OBAtom;
  //! A standard iterator over a vector of atoms
  typedef std::vector<OBAtom*>::iterator OBAtomIterator;
  class OBBond;
  //! A standard iterator over a vector of bonds
  typedef std::vector<OBBond*>::iterator OBBondIterator;

  // Class OBResidue
  // class introduction in residue.cpp
 class OBAPI OBResidue : public OBBase
  {
  public:

    //! Constructor
    OBResidue(void);
    //! Copy constructor
    OBResidue(const OBResidue &);
    //! Destructor
    virtual ~OBResidue(void);

    OBResidue &operator=(const OBResidue &);

    //! Add @p atom to this residue. Updates the atom via OBAtom::SetResidue()
    void    AddAtom(OBAtom *atom);
    //! Add @p atom to this residue. Updates the atom via OBAtom::SetResidue()
    void    InsertAtom(OBAtom *atom);
    //! Remove @p atom from this residue and update the atom.
    void    RemoveAtom(OBAtom *atom);
    //! Clear any and all data associated with this residue. Updates all atoms
    //!  included in the residue, as well as calling OBBase::Clear() for any
    //!  generic data.
    //! \return Whether the call was successful.
    bool    Clear();

    //! \brief Set the name of this residue (e.g., "ALA"). Use 3-char PDB standard names.
    //! http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/part_79.html
    //! MODRES records for modified residues:
    //! http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/part_36.html
    void    SetName(const std::string &resname);
    //! Set the residue number (in the sequence)
    void    SetNum(const unsigned int resnum);
    void    SetNum(const std::string  resnum);
    //! Set the chain ID for this residue
    void    SetChain(const char chain);
    //! Set the chain number for this residue
    void    SetChainNum(const unsigned int chainnum);
    //! Set the internal index of this residue in the parent OBMol.
    //! Intended mostly for internal use
    void    SetIdx(const unsigned int idx);

    //! Set the character code ID for an ATOM record for the supplied atom
    //! This does nothing if the supplied atom is not found in the residue
    void    SetAtomID(OBAtom *atom, const std::string &id);
    void    SetHetAtom(OBAtom *atom, bool hetatm);
    //! Set the atomic serial number for a given atom (see OBSerialNums)
    void    SetSerialNum(OBAtom *atom, unsigned int sernum);

    //! \return The residue name
    std::string    GetName(void)                  const;
    //! \return The residue number (in the sequence)
    unsigned int    GetNum(void);
    std::string     GetNumString(void);
    //! \return The number of atoms in this residue
    unsigned int   GetNumAtoms()                  const;
    //! \return The ID of the chain which includes this residue
    char           GetChain(void)                 const;
    //! \return The number of the chain which includes this residue
    unsigned int   GetChainNum(void)              const;
    //! \return The internal index of this residue in the parent OBMol
    unsigned int   GetIdx(void)                   const;
    //! \return The residue key (i.e., an entry in the OBResidueIndex namespace)
    unsigned int   GetResKey(void)                const;

    //! \return a vector of all atoms in this residue
    std::vector<OBAtom*> GetAtoms(void)           const;
    //! \return all bonds in this residue. @p exterior includes bonds to atoms
    //!  outside this residue (default is true)
    std::vector<OBBond*> GetBonds(bool exterior= true)const;

    //! \return the atom ID (character code) for the supplied atom or ""
    //!  if the atom is not found in this residue
    std::string    GetAtomID(OBAtom *atom)        const;
    //! \return the serial number of the supplied atom (uses OBSerialNums)
    unsigned       GetSerialNum(OBAtom *atom)     const;

    //! \return Whether this residue has the supplied amino acid property
    //!  defined from the OBAminoAcidProperty namespace
    bool           GetAminoAcidProperty(int)      const;
    //! \return Whether atom @p a has the supplied residue atom property
    //!  defined from the OBResidueAtomProperty namespace
    bool           GetAtomProperty(OBAtom *a, int) const;
    //! \return Whether this residue has the supplied property
    //!  defined from the OBResidueProperty namespace
    bool           GetResidueProperty(int)        const;

    //! \return If the given atom is a HETATM record
    bool           IsHetAtom(OBAtom *atom)        const;
    //! \return If this residue matches the supplied @p restype
    //! Set by SetResidueKeys()
    bool           IsResidueType(int)             const;

    //! \name Iterator methods
    //@{
    //! \return An iterator to the beginning of the atom list in this residue
    OBAtomIterator BeginAtoms()   { return _atoms.begin(); }
    //! \return An iterator to the end of the atom list in this residue
    OBAtomIterator EndAtoms()     { return _atoms.end();   }
    //! Set the iterator @p i to the beginning of the atom list in this residue
    //! \return The first atom (or NULL if none exist)
    OBAtom *BeginAtom(std::vector<OBAtom*>::iterator &i);
    //! Increment the iterator @p i
    //! \return The next atom (or NULL if none exist)
    OBAtom *NextAtom(std::vector<OBAtom*>::iterator &i);
    //@}

  protected: // members

    unsigned int              _idx;   //!< Residue index (i.e., internal index in an OBMol)
    char                      _chain; //!< Chain ID
    unsigned int              _aakey; //!< Amino Acid key ID -- see SetResidueKeys()
    unsigned int              _reskey;//!< Residue key ID -- see SetResidueKeys()
    std::string               _resnum;//!< Residue number (i.e., in file) 23, 1B, etc.
    std::string               _resname;//!<Residue text name

    std::vector<bool>         _hetatm;//!< Is a given atom a HETAM
    std::vector<std::string>  _atomid;//!< Residue atom text IDs
    std::vector<OBAtom*>      _atoms; //!< List of OBAtom in this residue
    std::vector<unsigned int> _sernum;//!< List of serial numbers
    // Now in OBBase
    //    std::vector<OBGenericData*> _vdata; //!< Custom data
  }; // OBResidue

  //! A standard iterator over a vector of residues
  typedef std::vector<OBResidue*>::iterator OBResidueIterator;

  ///////////////////////////////////////////////////////////////////////////////
  // Global Definitions
  ///////////////////////////////////////////////////////////////////////////////

#define MAXSETNO 40
#define MAXELEM  1024
#define MINELEM  29
#define MAXRES   100
#define MINRES   54

  ///////////////////////////////////////////////////////////////////////////////
  // Amino Acid Definitions
  ///////////////////////////////////////////////////////////////////////////////

#define AA_ALA (1<<1)
#define AA_GLY (1<<2)
#define AA_LEU (1<<3)
#define AA_SER (1<<4)
#define AA_VAL (1<<5)
#define AA_THR (1<<6)
#define AA_LYS (1<<7)
#define AA_ASP (1<<8)
#define AA_ILE (1<<9)
#define AA_ASN (1<<10)
#define AA_GLU (1<<11)
#define AA_PRO (1<<12)
#define AA_ARG (1<<13)
#define AA_PHE (1<<14)
#define AA_GLN (1<<15)
#define AA_TYR (1<<16)
#define AA_HIS (1<<17)
#define AA_CYS (1<<18)
#define AA_MET (1<<19)
#define AA_TRP (1<<20)

  /////////////////////////////////////////////////////////////////////////////
  // Amino Acid Property Definitions
  /////////////////////////////////////////////////////////////////////////////
#define IS_ACIDIC(x)      ((x) & ((AA_ASP)|(AA_GLU)))
#define IS_ACYCLIC(x)     ((x) & ((AA_ALA)|(AA_GLY)|(AA_LEU)|(AA_SER)|  \
                                  (AA_VAL)|(AA_THR)|(AA_LYS)|(AA_ASP)|  \
                                  (AA_ILE)|(AA_ASN)|(AA_GLU)|(AA_GLN)|  \
                                  (AA_CYS)|(AA_MET)))
#define IS_ALIPHATIC(x)   ((x) & ((AA_ALA)|(AA_GLY)|(AA_ILE)|(AA_LEU)|  \
                                  (AA_VAL)))
#define IS_AROMATIC(x)    ((x) & ((AA_HIS)|(AA_PHE)|(AA_TRP)|(AA_TYR)))
#define IS_BASIC(x)       ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))
#define IS_BURIED(x)      ((x) & ((AA_ALA)|(AA_CYS)|(AA_ILE)|(AA_LEU)|  \
                                  (AA_MET)|(AA_PHE)|(AA_TRP)|(AA_VAL)))
#define IS_CHARGED(x)     ((x) & ((AA_ASP)|(AA_GLU)|(AA_ARG)|(AA_HIS)|  \
                                  (AA_LYS)))
#define IS_CYCLIC(x)      ((x) & ((AA_HIS)|(AA_PHE)|(AA_PRO)|(AA_TRP)|  \
                                  (AA_TYR)))
#define IS_HYDROPHOBIC(x) ((x) & ((AA_ALA)|(AA_LEU)|(AA_VAL)|(AA_ILE)|  \
                                  (AA_PRO)|(AA_PHE)|(AA_MET)|(AA_TRP)))
#define IS_LARGE(x)       ((x) & ((AA_ARG)|(AA_PHE)|(AA_GLN)|(AA_TYR)|  \
                                  (AA_HIS)|(AA_LEU)|(AA_LYS)|(AA_ILE)|  \
                                  (AA_GLU)|(AA_MET)|(AA_TRP)))
#define IS_MEDIUM(x)      ((x) & ((AA_VAL)|(AA_THR)|(AA_ASP)|(AA_ASN)|  \
                                  (AA_PRO)|(AA_CYS)))
#define IS_NEGATIVE(x)    ((x) & ((AA_ASP)|(AA_GLU)))
#define IS_NEUTRAL(x)     ((x) & ((AA_ALA)|(AA_GLY)|(AA_LEU)|(AA_SER)|  \
                                  (AA_VAL)|(AA_THR)|(AA_PHE)|(AA_GLN)|  \
                                  (AA_TYR)|(AA_HIS)|(AA_CYS)|(AA_MET)|  \
                                  (AA_TRP)|(AA_ILE)|(AA_ASN)|(AA_PRO)))
#define IS_POLAR(x)       ((x) & ((AA_ASP)|(AA_ILE)|(AA_ASN)|(AA_GLU)|  \
                                  (AA_SER)|(AA_THR)|(AA_ARG)|(AA_GLN)|  \
                                  (AA_CYS)|(AA_HIS)))
#define IS_POSITIVE(x)    ((x) & ((AA_ARG)|(AA_HIS)|(AA_LYS)))
#define IS_SMALL(x)       ((x) & ((AA_ALA)|(AA_GLY)|(AA_SER)))
#define IS_SURFACE(x)     ((x) & ((AA_THR)|(AA_LYS)|(AA_ASP)|(AA_ILE)|  \
                                  (AA_ASN)|(AA_GLU)|(AA_PRO)|(AA_ARG)|  \
                                  (AA_GLY)|(AA_SER)|(AA_GLN)|(AA_TYR)|  \
                                  (AA_HIS)))

  //! Residue property definitions
  namespace OBAminoAcidProperty
  {
	enum
    {
      ACIDIC      =  0,
      ACYCLIC     =  1,
      ALIPHATIC   =  2,
      AROMATIC    =  3,
      BASIC       =  4,
      BURIED      =  5,
      CHARGED     =  6,
      CYCLIC      =  7,
      HYDROPHOBIC =  8,
      LARGE       =  9,
      MEDIUM      = 10,
      NEGATIVE    = 11,
      NEUTRAL     = 12,
      POLAR       = 13,
      POSITIVE    = 14,
      SMALL       = 15,
      SURFACE     = 16
    };
  }

  //! Residue atom properties
  namespace OBResidueAtomProperty
  {
    enum
    {
      ALPHA_CARBON     = 0,
      AMINO_BACKBONE   = 1,
      BACKBONE         = 2,
      CYSTEINE_SULPHUR = 3,
      LIGAND           = 4,
      NUCLEIC_BACKBONE = 5,
      SHAPELY_BACKBONE = 6,
      SHAPELY_SPECIAL  = 7,
      SIDECHAIN        = 8,
      SUGAR_PHOSPHATE  = 9
    };
  }

  //! Residue names (index into Residue[] array)
  // some of these are invalid or troublesome in scripting interfaces
  // so they are removed by the #ifndef SWIG parts
  // (otherwise ignore them for C++ use)
  namespace OBResidueIndex
  {
    enum
    {
      ALA   =  0,
      GLY   =  1,
      LEU   =  2,
      SER   =  3,
      VAL   =  4,
#ifndef SWIGPERL
      THR   =  5,
#endif
      LYS   =  6,
      ASP   =  7,
      ILE   =  8,
      ASN   =  9,
      GLU   = 10,
      PRO   = 11,
      ARG   = 12,
      PHE   = 13,
      GLN   = 14,
      TYR   = 15,
      HIS   = 16,
      CYS   = 17,
      MET   = 18,
      TRP   = 19,
      ASX   = 20,
      GLX   = 21,
      PCA   = 22,
      HYP   = 23,
      A     = 24,
      C     = 25,
      G     = 26,
      T     = 27,
      U     = 28,
      UPLUS = 29,
      I     = 30,
      _1MA  = 32,
      _5MC  = 32,
      OMC   = 33,
      _1MG  = 34,
      _2MG  = 35,
      M2G   = 36,
      _7MG  = 37,
      OMG   = 38,
      YG    = 39,
      H2U   = 40,
      _5MU  = 41,
      PSU   = 42,
      UNK   = 43,
      ACE   = 44,
      FOR   = 45,
      HOH   = 46,
      DOD   = 47,
      SO4   = 48,
      PO4   = 49,
      NAD   = 50,
      COA   = 51,
      NAP   = 52,
      NDP   = 53
    };
  }

  //! Residue types.
  namespace OBResidueProperty
  {
    enum
     {
      AMINO        = 0,
      AMINO_NUCLEO = 1,
      COENZYME     = 2,
      ION          = 3,
      NUCLEO       = 4,
      PROTEIN      = 5,
      PURINE       = 6,
      PYRIMIDINE   = 7,
      SOLVENT      = 8,
      WATER        = 9
    };
  }

  ////////////////////////////////////////////////////////////////////////////////
  // Global Variables
  ////////////////////////////////////////////////////////////////////////////////

  EXTERN char Residue[MAXRES][4];
  EXTERN char ElemDesc[MAXELEM][4];
  EXTERN unsigned int ResNo;
  EXTERN unsigned int ElemNo;
} // end namespace OpenBabel

#endif

//! \file residue.h
//! \brief Defines for residue properties, names, etc.