This file is indexed.

/usr/include/BALL/MOLMEC/MINIMIZATION/shiftedLVMM.h is in libball1.4-dev 1.4.3~beta1-3.

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
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: shiftedLVMM.h,v 1.1.4.6 2007/08/07 09:12:35 aleru Exp $ 
//

#ifndef BALL_MOLMEC_MINIMIZATION_SHIFTEDLVMM_H 
#define BALL_MOLMEC_MINIMIZATION_SHIFTEDLVMM_H 

#ifndef	BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
#	include <BALL/MOLMEC/MINIMIZATION/energyMinimizer.h>
#endif

#ifndef BALL_MOLMEC_MINIMIZATION_LINESEARCH_H
# include <BALL/MOLMEC/MINIMIZATION/lineSearch.h>
#endif

namespace BALL 
{
	/** Shifted limited-memory variable metric methods minimizer.
	 *  A minimizer for geometry optimization based upon the shifted
	 *  limited-memory variable metric methods proposed in
	 *
	 *  [1] Vlcek J., Luksan L.. New variable metric methods for unconstrained
	 *  minimization covering the large-scale case. Report V-876, Prague,
	 *  ICS AS CR, 2002.
	 *
	 *  [2] Vlcek J., Luksan L.. Additional properties of shifted variable metric
	 *  methods. Report V-899, Prague, ICS AS CR, 2004.
	 *
	 *  [3] Vlcek J., Luksan L.. Shifted limited-memory variable metric methods
	 *  for large-scale unconstrained optimization. Journal of Computational
	 *  and Applied Mathematics 186 (2), pp. 365-390.
	 *  \ingroup  MolmecEnergyMinimizer
	 */
	class BALL_EXPORT ShiftedLVMMMinimizer 
		: public EnergyMinimizer
	{
		public:
			
			BALL_CREATE(ShiftedLVMMMinimizer)
			
			/** @name Options and Defaults
			 */
			//@{
			
			/** Symbolic names for option keys.
			 *  This struct contains a symbolic name
			 *  for each recognized key in ShiftedLVMMMinimizer::options. \par
			 *  For each symbol the required type is given under parameters.
			 */
			struct Option
			{
				/** Which update method should be used?
				 */
				static const char* UPDATE_METHOD;
			
				/** Which correction parameter should be used?
				 */
				static const char* CORRECTION_PARAMETER;
				
				/** The number of columns of the factor of the shifted
				 *  inverse hessian approximation.
				 */
				static const char* NUM_OF_COLUMNS;
			};
			
			struct BALL_EXPORT Default
			{
				/** Which update method should be used?
				 *  Default is RANK_2.
				 */
				static const Size UPDATE_METHOD;
			
				/** Which correction parameter should be used?
				 *  Default is RATIO_OF_SHIFT_PARAMS.
				 */
				static const Size CORRECTION_PARAMETER;
				
				/** The number of columns of the factor of the shifted
				 *  inverse hessian approximation. Default is 5.
				 */
				static const Size NUM_OF_COLUMNS;
			};
		
			//@}
			/** @name Enums
			 */
			//@{
			
			/** The different variationally derived methods implemented.
			*/
			enum UpdateMethod
			{
				/** Rank 1 variationally derived method.
				*/
				RANK_1 = 1,
				
				/** Rank 2 variationally derived method.
				*/
				RANK_2 = 2
			};
		
			/** The different correction parameters implemented.
			*/
			enum CorrectionParameter
			{
				/** Unit value, i.e. rho = 1.0.
				*/
				UNIT_VALUE = 1,
			
				/** Balancing value.
				*/
				BALANCING_VALUE = 2,
				
				/**	Square root.
				*/
				SQUARE_ROOT = 3,
				
				/**	Geometric mean.
				*/
				GEOMETRIC_MEAN = 4,
				
				/**	Ratio of shift parameters.
				*/
				RATIO_OF_SHIFT_PARAMS = 5
			};
			
			//@}
			/**	@name	Constructors and Destructors	
			*/
			//@{
		
			/** Default constructor.
			*/
			ShiftedLVMMMinimizer();
			
			/** Constructor expecting a valid force field 
			*/
			ShiftedLVMMMinimizer(ForceField& force_field);
			
			/** Constructor expecting a valid force field and a snapshot manager
			*/
			ShiftedLVMMMinimizer(ForceField& force_field, SnapShotManager *ssm);
			
			/** Constructor expecting a valid force field, a snapshot manager and options 
			*/
			ShiftedLVMMMinimizer(ForceField& force_field, SnapShotManager* ssm, const Options& options);
			
			/** Constructor expecting a valid force field and options 
			*/
			ShiftedLVMMMinimizer(ForceField& force_field, const Options& options);
			
			/** Copy constructor
			*/
			ShiftedLVMMMinimizer(const ShiftedLVMMMinimizer& rhs);
			
			/** Destructor.
			*/
			virtual ~ShiftedLVMMMinimizer();
			
			//@}
			/** @name Assignments
			*/
			//@{
			
			/** Assignment operator
			*/
			const ShiftedLVMMMinimizer& operator = (const ShiftedLVMMMinimizer& rhs);
			
			//@}
			/** @name	Setup methods. They do all necessary preparations. 
			*/
			//@{
			
			/** Specific setup
			*/
			virtual bool specificSetup();
			
			//@}
			/** @name	Accessors 
			*/
			//@{
			
			/** Set explicitly the update method
			 */
			void setUpdateMethod(UpdateMethod updt);
			
			/** Return the update method
			 */
			UpdateMethod getUpdateMethod() const;
			
			/** Set explicitly the correction parameter
			 */
			void setCorrectionParameter(CorrectionParameter corr);
			
			/** Return the correction parameter
			 */
			CorrectionParameter getCorrectionParameter() const;
			
			/** Set explicitly the maximum number of columns of the
			 *  factor of the shifted inverse hessian approximation.
			 */
			void setMaxNumOfColumns(Size num);
			
			/** Return the maximum number of columns of the
			 *  factor of the shifted inverse hessian approximation.
			 */
			Size getMaxNumOfColumns() const;
			
			/** Calculate the next step.
			 *  First, this method updates the model. Second, it performs a line search
			 *  along the calculated direction afterwards.
			 *  @return double  \f$\geq 0\f$ if the line search found an acceptable solution, otherwise -1.
			 *  @see EnergyMinimizer::findStep
			 */
			virtual double findStep();
			
			/** Update the shifted inverse hessian approximation.
			 *  Afterwards, compute the search direction.
			 */
			virtual void updateDirection();
			
			/** Minimize the energy of the system.
			 *  This method executes at most <tt>iterations</tt> minimization steps.
			 *  If the number of iterations is not given, the number specified in the
			 *  options is taken.
			 *  @param	iterations the maximum number of iterations
			 *  @param	resume <b>true</b> to resume a previous run
			 *  @see		EnergyMinimizer::minimize
			 */
			virtual bool minimize(Size iterations = 0, bool resume = false); 
			
		protected:
			
			//@}
			/**	@name	Protected Attributes 
			*/
			//@{
			
			/** The line search
			*/
			LineSearch line_search_;
			
			/** Is this an initial first iteration?
			*/
			bool first_iter_;
		
			/** Number of movable atoms.
			*/
			Size number_of_atoms_;
			
			/** Maximum number of columns of the 
			 *  factor of the shifted inverse hessian approximation.
			 */
			Size max_number_of_cols_;
			
			/** Current number of columns of the
			 *  factor of the shifted inverse hessian approximation.
			 */
			Size curr_number_of_cols_;
			
			/** Update method
			*/
			Size updt_method_;
			
			/** Correction parameter
			*/
			Size corr_par_;
			
			/** Shift value of the previous iteration.
			*/
			double prev_shift_val_;
			
			/** Shifted previous step.
			*/
			vector<Vector3> shift_s_;
			
			/** Current gradient difference.
			*/
			vector<Vector3> grad_diff_;
			
			/** Needed vector for the update.
			*/
			vector<float> updt_u_;
			
			/** Needed vector for the update.
			 */
			vector<float> updt_v_;
			
			/** Direction of the shifted step, i.\ e.\ \f$-U_k \cdot U_k^T \cdot g_k\f$.
			*/
			vector<Vector3> shifted_direction_;
			
			/** Factor of the shifted inverse hessian approximation
			 *  in column order, \f$U_k\f$ in [3].
			 */
			vector<Vector3> hess_factor_;
			
			/** Positions of the movable atoms when we start an iteration.
			 *  This is used to reduce slightly rounding errors
			 */
			vector<Vector3> initial_atoms_;
			
			//@}
			
	};
} // end of namespace BALL

#endif // BALL_MOLMEC_MINIMIZATION_SHIFTEDLVMM_H