This file is indexed.

/usr/include/BALL/STRUCTURE/BONDORDERS/partialBondOrderAssignment.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
#ifndef BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H
#define BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H

#ifndef BALL_COMMON_GLOBAL_H
# include <BALL/COMMON/global.h>
#endif

#ifndef BALL_KERNEL_ATOM_H
# include <BALL/KERNEL/atom.h>
#endif

#ifndef BALL_KERNEL_BOND_H
# include <BALL/KERNEL/bond.h>
#endif

#include <boost/shared_ptr.hpp>
#include <vector>

namespace BALL
{
	class AssignBondOrderProcessor;
	class BondOrderAssignment;

	/** \brief A full or partial solution to the AStar-based bond order assignment problem.
	 *  
	 *  This class represents a full or partial bond order assignment. It is a very basic representation
	 *  without any convenience functionality. This class exists because sometimes we need a
	 *  representation that is as small as possible - we need many of these during the AStar 
	 *  runs, e.g., and memory quickly becomes an issue. Please note that we explicitly avoid 
	 *  virtual functions here to save the vtable - inheriting from this class makes no sense, anyhow.
	 *  
	 */
	class BALL_EXPORT PartialBondOrderAssignment
	{
		public:
			// this enum allows faster access to the type of the chosen heuristic than a string compare
			enum HEURISTIC_INDEX
			{
				SIMPLE,
				MEDIUM,
				TIGHT
			};

			// Constructor
			PartialBondOrderAssignment(AssignBondOrderProcessor* parent);

			// Destructor
			~PartialBondOrderAssignment();

			boost::shared_ptr<BondOrderAssignment> convertToFullAssignment();

			// 
			void clear();

			// the less operator.
			// NOTE: we want a reverse sort, hence we actually return a "greater" 
			bool operator < (const PartialBondOrderAssignment& b) const;

			// the penalty
			float coarsePenalty(float atom_type_penalty, float bond_length_penalty) const;

			// the combined penalty of structure and type penalty
			float coarsePenalty() const;

			// the bond length penalty 
			float finePenalty() const {return estimated_bond_length_penalty;}

			/// Convenience function to obtain total atom type penalty value
			float getAtomTypePenalty(bool include_heuristic_term = true, HEURISTIC_INDEX heuristic_index = SIMPLE);

			/** Estimates the objective function f = g* + h* of the ASTAR - algorithm, if
			 *  include_heuristic_term == true, otherwise compute only f = g*. The
			 *  result is stored in the PartialBondOrderAssignment entry's member estimated_atom_type_penalty.
			 *
			 *  @retval bool - true, if the entry is still valid.
			 *  @retval bool - false otherwise.
			 */
			bool estimatePenalty_(bool include_heuristic_term = true, HEURISTIC_INDEX heuristic_index = SIMPLE);

			/// Estimates the atom type penalty for a given unclosed atom.
			float estimateAtomTypePenalty_(Atom* atom,
																		 Index atom_index,    // the atom index
																		 int fixed_valence,   // its so far fixed valence (incl. virtual H's)
																		 int fixed_virtual_order, // its so far fixed virtual H's
																		 int num_free_bonds,  // its number of unfixed original bonds
																		 HEURISTIC_INDEX heuristic_index);

			/// Estimates the bond length penalty for a given unclosed atom.
			//  NOTE: virtual bonds are excluded!
			float estimateBondLengthPenalty_(Index atom_index, // the atom index
																			 const vector<Bond*>& free_bonds,
																			 int fixed_virtual_order,
																			 int fixed_valence,
																			 int num_free_bonds);


			// the estimated atom type penalty
			float estimated_atom_type_penalty;
			// the estimated bond length penalty
			float estimated_bond_length_penalty;

			// the bond orders 
			// the i-th entry denotes the bondorder of the i-th bond
			// unset bonds get the order 0
			vector<short> bond_orders;

			// the index of the bond last considered 
			Position last_bond;

			AssignBondOrderProcessor* abop;
	};
}

#endif // BALL_STRUCTURE_BONDORDERS_PARTIALBONDORDERASSIGNMENT_H