This file is indexed.

/usr/include/BALL/SOLVATION/generalizedBornCase.h is in libball1.4-dev 1.4.3~beta1-4.

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
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: generalizedBornCase.h,v 1.1 2005/11/21 19:38:38 anker Exp $
//

#ifndef BALL_SOLVATION_GENERALIZED_BORN_H
#define BALL_SOLVATION_GENERALIZED_BORN_H

#ifndef BALL_COMMON_H
#	include <BALL/common.h>
#endif

#ifndef BALL_KERNEL_PTE_H
#	include <BALL/KERNEL/PTE.h>
#endif

#ifndef BALL_KERNEL_ATOMCONTAINER_H
#	include <BALL/KERNEL/atomContainer.h>
#endif

#ifndef BALL_DATATYPE_STRINGHASHMAP_H
#	include <BALL/DATATYPE/stringHashMap.h>
#endif

#ifndef BALL_FORMAT_INIFILE_H
#	include <BALL/FORMAT/INIFile.h>
#endif

#ifndef BALL_FORMAT_PARAMETERSECTION_H
#	include <BALL/FORMAT/parameterSection.h>
#endif

#include <map>
#include <set>

namespace BALL 
{
	/** Compute the electrostatics of a molecule in solution.

	    This implementation bases on

			[1] "Modification of the Generalized Born Model Suitable for 
			Macromolecules"
			Onufriev, Bashford, Case
			J. Phys. Chem. B 104:3712-3720, 2000

			This paper uses techniques from

			[2] "Semianalytical Treatment of Solvation for Molecular
			Mechanics and Dynamics"
			Still, Tempczyk, Hawley, Hendrickson
			J. Am. Chem. Soc. 112(16):6127-6129, 1990

			[3] "Application of a pairwise generalized Born model to
			proteins and nucleic acids: inclusion of salt eff¤ects "
			Srinivasan, Trevathan, Beroza, Case
			Theor. Chem. Acc. 101(6):426-434, 1999

	*/
	class GeneralizedBornModel
	{
		public:

		struct Option
		{
			///
			static const String VERBOSITY;

			///
			static const String LAMBDA;

			///
			static const String DELTA;

			///
			static const String KAPPA;

			///
			static const String RHO_0;

			///
			static const String DC_SOLVENT;

			///
			static const String DC_SOLUTE;

			///
			static const String FILENAME;
		};

		struct Default
		{
			///
			static const Size VERBOSITY;

			///
			static const float LAMBDA;

			///
			static const float DELTA;

			///
			static const float KAPPA;

			///
			static const float RHO_0;

			///
			static const float DC_SOLVENT;

			///
			static const float DC_SOLUTE;

			///
			static const String FILENAME;
		};

		///
		GeneralizedBornModel()
			throw(Exception::FileNotFound);

		///
		~GeneralizedBornModel();

		///
		void clear();

		/// We need an additional optioned version of that piece of code
		bool setup(const AtomContainer& ac)
			throw(Exception::FileNotFound);

		/// ??? This should be done through Options!
		void setScalingFactorFile(const String& filename);

		///
		void setScalingFactors(const StringHashMap<float>& scaling_factors);

		///
		const StringHashMap<float>& getScalingFactors() const;

		/// ??? Should be done by options
		void setSolventDC(float solvent_dc);

		/// ??? Should be done by options
		void setSoluteDC(float solute_dc);

		/// Compute the total energy of the system
		float calculateEnergy();

		/// Compoute only the solvation energy (meaning the transfer energy
		/// which is a kind of a reaction field energy)
		float calculateSolvationEnergy();

		/// Calculate the total potential created by every other atom of the
		/// system for every atom and return a hashmap conteining the potential
		/// values.
		void calculatePotential(HashMap<const Atom*, float>& p_hash) const;

		/// Calculate the total potential created by every other atom of the
		/// system at the position of atom_i
		float calculatePotential(const Atom& atom_i) const;

		///
		bool readScalingFactors(const String& inifile_name)
			throw(Exception::FileNotFound);


		private:

		/* Parameters for the generalized Born model
		*/
		class GBParameters : public ParameterSection
		{
			public:

			GBParameters();

			~GBParameters();

			bool extractSection(Parameters& parameters, const String& section_name);

			const StringHashMap<float>& getScalingFactors() const;

			float getSoluteDC() const;

			float getSolventDC() const;

			float getKappa() const;

			private:

			/*_
			*/
			StringHashMap<float> scaling_factors_;

			/*_
			*/
			float dc_solute_;

			/*_
			*/
			float dc_solvent_;

			/*_
			*/
			float lambda_;

			/*_
			*/
			float delta_;
			
			/*_
			*/
			float kappa_;
			
			/*_
			*/
			float rho_0_;

		};

		/** The atom container representing the molecule
		*/
		AtomContainer* ac_;

		/** The atom list
		*/
		std::vector<const Atom*> atoms_;

		/** The Born radii of all atoms
		*/
		std::vector<float> born_radii_;

		/** The pairs of atoms we have to look at. This list only inlcudes
				*different* atoms. Not suitable for self-energy calculations,
		*/
		std::vector< std::pair<Size, Size> > pair_list_;

		/** Distances between atoms of the pair list.
		*/
		std::vector< float > pair_distances_;
		std::vector< float > pair_charges_;
		std::vector< std::vector< float > > squared_distances_;

		/** Dielectric constants of the solute and the surrounding solvent
		*/
		float dc_solute_;
		float dc_solvent_;

		/** Empirical scaling factor for the estimation of effective Born
		    radii. See [3] for details.
		*/
		StringHashMap<float> scaling_factors_;
		std::vector<float> scaling_factor_;

		/**
		*/
		String scaling_factor_filename_;

		/** Scaling factor of integral part of effective Born radii calculation
				rectifying the underestimation of the radii caused by the vdW
				approximation (instead of real SAS calculations).
		*/
		float lambda_;

		/** Downshift of the effictve Born radii for rectifying the energy
		    increase caused by the lambda factor. More or less magic (see
				[1] for details) but allows to use the scaling_factors_ without
				reparamterizing them.
		*/
		float delta_;

		/** Debye-Hueckel parameter describing salt effects (ionic strength)
		    in units of 1/Angstrom.
		*/
		float kappa_;

		/** Radius offset (see [2] for details).
		*/
		float rho_0_;

		/**
		 */
		float to_kJ_mol_;

		/** Calculate the Born radii of all atoms
		*/
		void calculateBornRadii_();
		
		/** Calculate the energetic cost of creating a charge distribution in
				a uniform dielectric
		*/
		float calculateCreationEnergy_() const;

		/** Calculate the energetic cost of transfering a solute into a
				dielectric medium.
		*/
		float calculateTransferEnergy_() const;

		/** A smooth function describing an approximation of the solute volume
				and several Born-dependent effects (including Coulomb integrals).
				There are several techniques in usage. We implement the on
				described in [1].
		*/
		float f_GB_(Size i, Size j) const;

		/** An approximation of the coulomb integral
		*/
		float coulombIntegralApproximation_(float distance, float scaled_radius_j,
				float radius_i) const;



	};

 
} // namespace BALL

#endif // BALL_SOLVATION_GENERALIZED_BORN_H