This file is indexed.

/usr/include/BALL/STRUCTURE/structureMapper.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
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//

#ifndef BALL_STRUCTURE_STRUCTUREMAPPER_H
#define BALL_STRUCTURE_STRUCTUREMAPPER_H

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

#ifndef BALL_CONCEPT_PROCESSOR_H
#	include <BALL/CONCEPT/processor.h>
#endif

#ifndef BALL_STRUCTURE_GEOMETRICTRANSFORMATIONS_H
#	include <BALL/STRUCTURE/geometricTransformations.h>
#endif

#ifndef BALL_DATATYPE_STRING_H
#	include <BALL/DATATYPE/string.h>
#endif

#ifndef BALL_KERNEL_PROTEIN_H
#	include <BALL/KERNEL/protein.h>
#endif

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

#ifndef BALL_MATHS_MATRIX44_H
#	include <BALL/MATHS/matrix44.h>
#endif

#ifndef BALL_STRUCTURE_ATOMBIJECTION_H
#	include <BALL/STRUCTURE/atomBijection.h>
#endif

#include <vector>
#include <map>

namespace BALL 
{

	/**	Structure mapping class.
	\ingroup StructureMapping
	*/
	class BALL_EXPORT StructureMapper
		:	public TransformationProcessor
	{
		public:

		/**	@name	Constructors and Destructors
		*/
		//@{
		
		/**	Default constructor
		*/
		StructureMapper();

		/**	Constructor
		*/
		StructureMapper(AtomContainer& A, AtomContainer& B);

		/**	Destructor
		*/
		virtual ~StructureMapper();

		//@}

		/**	Assign the two objects to be mapped
		*/
		void set(AtomContainer& A, AtomContainer& B);

		/**	Calculate the root mean squared deviation
		*/
		double calculateRMSD();

		/**	Calculate the root mean squared deviation given a AtomBijection
		*/
		double calculateRMSD(const AtomBijection& new_bijection);

		/**	Calculate the transformation to map the first of two isomorphous 
				AtomContainer objects onto the second
		*/
		bool calculateTransformation();

		/**	Calculate a reasonable bijection for the mapping of A and B
		*/
		void calculateDefaultBijection(bool limit_to_selection = false);

		/**	Return the current bijection
		*/
		const AtomBijection& getBijection() const { return bijection_; }

		/**	Calculates a bijection to map two arrays of fragments onto each other.
		*/
		AtomBijection calculateFragmentBijection
			(const vector<Fragment*>& A, const vector<Fragment*>& B);

		/**	Maps two fragments onto each other
		*/
		bool mapFragments
			(const vector<Fragment*>& A, const vector<Fragment*>& B,
			 Matrix4x4* transformation, double upper_bound = 8.0, double lower_bound = 2.5);

		/**	Map three points onto each other.
				Computes a transformation that maps

					- the point <tt>w1</tt> onto the point <tt>v1</tt>,
					- the point <tt>w2</tt> onto the ray that starts in <tt>v1</tt> and goes through <tt>v2</tt>,
					- the point <tt>w3</tt> into the plane generated by <tt>v1</tt>, <tt>v2</tt>, and <tt> v3</tt>.
				
		*/
		static Matrix4x4 matchPoints
			(const Vector3& w1,	const Vector3& w2, const Vector3& w3,	
			 const Vector3& v1,	const Vector3& v2, const Vector3& v3);

		/**	
		*/
		static Matrix4x4 matchBackboneAtoms(const Residue& r1, const Residue& r2);

		/**	
		*/
		Size mapResiduesByBackbone(const list<Residue*>& l1, const list<Residue*>& l2);
	 
		/**
		*/
		vector<vector<Fragment*> >& searchPattern
			(vector<Fragment*>& pattern, AtomContainer& composite,
			 double max_rmsd = 4.0,	   double max_center_tolerance = 2.0,
			 double upper_bound = 8.0, double lower_bound = 4.0);

		/**	Map two proteins onto each other.
		*/
		Matrix4x4 mapProteins
			(Protein& P1, Protein& P2, 
			 std::map<String, Size>&	type_map,
			 Size&							no_matched_ca,
			 double&						rmsd,
			 double							upper_bound = 8.0,
			 double							lower_bound = 4.0,
			 double							tolerance = 0.6);

		protected:
		// Count the fragments in an AtomContainer -- this is not implemented
		// in AtomContainer!
		Size countFragments_(const AtomContainer& ac) const;

		/*_	The first of two composites - the "original" 
		*/
		AtomContainer*	A_;

		/*_	The second composites - the "copy" to be mapped 
		*/
		AtomContainer*	B_;
		
		/*_	The current atom bijection.
				Required for the caclulation of the RMSD.
		*/
		AtomBijection bijection_;
		
		/*_	The rmsd of the last mapping executed 
		*/
		double	rmsd_;
	};

} // namespace BALL

#endif // BALL_STRUCTURE_STRUCTUREMAPPER_H