This file is indexed.

/usr/include/openbabel-2.0/openbabel/kinetics.h is in libopenbabel-dev 2.3.2+dfsg-1.1.

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
/**********************************************************************
Copyright (C) 2005 by Chris Morley

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.
***********************************************************************/
#ifndef OB_KINETICS_H
#define OB_KINETICS_H

#include <openbabel/generic.h>

namespace OpenBabel
{

const unsigned RateData = 55555;
const unsigned ThermoData = 55556;

/// \class OBRateData kinetics.h <openbabel/kinetics.h>
/// \brief Holds rate constant data for OBReaction
/**The data is in a form used by CHEMKIN, at least the original
   free versions developed by Sandia Labs. Cantera is a GPL chemical
   kinetics program with similar capabilities.
   Used by chemkin format and cml reaction format
**/


class OBRateData : public OBGenericData
{
protected:
  double Rates[3];
  double LoRates[3];
  double TroeParams[4];
  std::map<std::string,double> Efficiencies;
public:
  virtual OBGenericData* Clone(OBBase* parent) const{return new OBRateData(*this);}
  enum rate_type {A, n, E};
  enum reaction_type {ARRHENIUS=55555, LINDERMANN, TROE, SRI, THREEBODY};
  reaction_type ReactionType;
  OBRateData():OBGenericData("Rate data", RateData)
  {
    Rates[0]=Rates[1]=Rates[2]=0;
    LoRates[0]=LoRates[1]=LoRates[2]=0;
    TroeParams[0]=TroeParams[1]=TroeParams[2]=TroeParams[3]=0;
    ReactionType = ARRHENIUS;
  }

  double GetRate(rate_type n) const
  {
    return Rates[n];
  }

  void SetRate(rate_type n, const double val)
  {
    if(n<3)
      Rates[n] = val;
  }

  double GetLoRate(rate_type n) const
  {
    return LoRates[n];
  }

  void SetLoRate(rate_type n, const double val)
  {
    if(n<3)
      LoRates[n] = val;
  }

  double GetTroeParam(int n) const
  {
    return TroeParams[n];
  }

  void SetTroeParams(int n, const double val)
  {
    if(n<4)
      TroeParams[n] = val;
  }

  void SetEfficiency(std::string id, double Eff)
  {
    Efficiencies[id] = Eff;
  }

  double GetEfficiency(std::string id)
  {
    return Efficiencies[id]; //will be 0 if not found
  }

  bool GetNextEff(std::string& id, double& Eff)
  {
    //Supply id empty to begin, then id is the*last* id
    std::map<std::string, double>::iterator itr;
    if(id.empty())
      itr = Efficiencies.begin();
    else
    {
      itr = Efficiencies.find(id);
      if(itr!=Efficiencies.end())
        ++itr;
    }
    if(itr==Efficiencies.end())
      return false;
    id    = itr->first;
    Eff = itr->second;
    return true;
  }
};

//******************************************************************************
/// \class OBNasaThermoData kinetics.h <openbabel/kinetics.h>
/// \brief Thermodynamic data in old style NASA polynomial form for OBMol
/**This is a venerable data format used to describe specific heats, enthalpies
   and entropies, particularly in the gas phase and at high temperatures.
   There is a standard datafile with fixed format (for punched cards!) which
   can be read and written to this OBMol extension using the thermo format. It
   is also used in chemkin format and in cmlreact format
   For a brief description of the meaning of the coefficients see
   http://www.me.berkeley.edu/gri_mech/data/nasa_plnm.html
   The first 7 coefficients are for the high temperature range MidT to HiT;
   and the second 7 are for the low temperature range LoT to MidT
   Note that there is a more modern NASA polynomial with more terms, which
   is not supported here.
**/
class OBNasaThermoData : public OBGenericData
{
protected:
  double Coeffs[14];
  double LoT, MidT, HiT;
  char phase;
public:
  OBNasaThermoData(): LoT(300),MidT(1000),HiT(3000),phase('G')
  {	_type = ThermoData;	_attr = "Nasa thermo data";}

  virtual OBGenericData* Clone(OBBase* parent) const{return new OBNasaThermoData(*this);}

  double GetCoeff(unsigned n) const
  {
    return Coeffs[n];
  }

  void SetCoeff(unsigned n, const double val)
  {
    if(n<14)
      Coeffs[n] = val;
  }
  double GetLoT() const {return LoT;}
  double GetMidT() const {return MidT;}
  double GetHiT() const {return HiT;}
  void SetLoT(double val){LoT=val;}
  void SetMidT(double val){MidT=val;}
  void SetHiT(double val){HiT=val;}

  char GetPhase() const {return phase;}
  void SetPhase(char ph){phase=ph;}
};

} //namespace OpenBabel

#endif //OB_KINETICS_H

//! \file kinetics.h
//! \brief OBRateData and OBNasaThermoData classes