This file is indexed.

/usr/include/BALL/KERNEL/bond.iC is in libball1.4-dev 1.4.1+20111206-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
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//

BALL_INLINE
void Bond::clear_()
{
	first_ = BALL_BOND_DEFAULT_FIRST_ATOM;
	second_ = BALL_BOND_DEFAULT_SECOND_ATOM;
	name_ = BALL_BOND_DEFAULT_NAME;
	bond_order_ = BALL_BOND_DEFAULT_ORDER;
	bond_type_ = BALL_BOND_DEFAULT_TYPE;
}

BALL_INLINE
void Bond::clear()
{
	PropertyManager::clear();
	
	arrangeBonds_();
	clear_();
}

BALL_INLINE
void Bond::destroy()
{
	PropertyManager::destroy();
	arrangeBonds_();
	clear_();
}

BALL_INLINE
void Bond::finalize()
{
	if (*first_ > *second_)
	{
		Atom* tmp = first_;
		first_ = second_;
		second_ = tmp;
	}
}

BALL_INLINE
void Bond::setFirstAtom(Atom* atom)
{
	first_ = atom;
}

BALL_INLINE	 
const Atom* Bond::getFirstAtom() const
{
	return first_;
}

BALL_INLINE	 
Atom* Bond::getFirstAtom()
{
	return first_;
}

BALL_INLINE	 
Atom* Bond::getPartner(const Atom& atom) const
{
	Atom* partner = 0;
	if (&atom == first_)
	{
		partner = second_;
	} 
	else 
	{
		if (&atom == second_)
		{
			partner = first_;
		}
	}		
	return partner;
}

BALL_INLINE
void Bond::setSecondAtom(Atom* atom)
{
	second_ = atom;
}

BALL_INLINE	 
const Atom* Bond::getSecondAtom() const
{
	return second_;
}

BALL_INLINE	 
Atom* Bond::getSecondAtom()
{
	return second_;
}

BALL_INLINE
void Bond::setName(const String& name)
{
	name_ = name;
}

BALL_INLINE
const String& Bond::getName() const
{
	return name_;
}

BALL_INLINE
void Bond::setOrder(Bond::Order bond_order)
{
	bond_order_ = bond_order;
}
	
BALL_INLINE	
Bond::Order Bond::getOrder() const
{
	return bond_order_;
}
	
BALL_INLINE
bool Bond::isAromatic() const
{
	return (hasProperty(IS_AROMATIC) || (bond_order_ == ORDER__AROMATIC));
}

BALL_INLINE
void Bond::setType(Type bond_type)
{
	bond_type_ = bond_type;
}
	
BALL_INLINE
Bond::Type Bond::getType() const
{
	return bond_type_;
}

BALL_INLINE
Real Bond::getLength() const
{
	if (first_ == 0 || second_ == 0)
	{
		throw NotBound(__FILE__, __LINE__);
	}
	
	return first_->getDistance(*second_);
}

BALL_INLINE
const Atom* Bond::getBoundAtom(const Atom& atom) const
{
	if (first_ == &atom)
	{
		return second_;
	}
	else
	{
		if (second_ == &atom)
		{
			return first_;
		}
	}

	return 0;
}

BALL_INLINE
Atom* Bond::getBoundAtom(const Atom& atom)
{
	if (first_ == &atom)
	{
		return second_;
	}
	else
	{
		if (second_ == &atom)
		{
			return first_;
		}
	}

	return 0;
}

BALL_INLINE
bool Bond::isBondOf(const Atom& atom) const
{
	return atom.hasBond(*this);
}

BALL_INLINE
bool Bond::isBound() const
{
	return (first_ != 0);
}

BALL_INLINE
bool Bond::isInterBond() const
{
	// the two atoms have to be inside the same (non-NULL) composite
	return (isBound() && (first_->Composite::getRoot() != second_->Composite::getRoot())
					&& (&first_->Composite::getRoot() != first_));
}

BALL_INLINE
bool Bond::isInterBondOf(const AtomContainer& atom_container) const
{
	if (isBound())
	{
		bool first_atom_is_descendant  = first_->Composite::isDescendantOf(atom_container);
		bool second_atom_is_descendant = second_->Composite::isDescendantOf(atom_container);

		return (( first_atom_is_descendant && !second_atom_is_descendant) ||
						(!first_atom_is_descendant &&  second_atom_is_descendant));
	} 

	return false;
}

BALL_INLINE
bool Bond::isIntraBond() const
{	
	// the two atoms have to be inside two different (non-NULL) composite
	return (isBound() && (first_->Composite::getRoot() == second_->Composite::getRoot()) 
					&& (&first_->Composite::getRoot() != first_) && (&second_->Composite::getRoot() != second_));
}

BALL_INLINE
bool Bond::isIntraBondOf(const AtomContainer &atom_container) const
{
	return (isBound() &&  first_->Composite::isDescendantOf(atom_container)
										&& second_->Composite::isDescendantOf(atom_container));
}

BALL_INLINE
bool Bond::isValid () const
{
	return (PropertyManager::isValid()
								&& first_  != 0
								&& second_ != 0
								&& first_  != second_
								&& first_->hasBond(*this)
								&& second_->hasBond(*this));
}

BALL_INLINE
bool Bond::operator == (const Bond& bond) const
{
	return (this == &bond);
}

BALL_INLINE
bool Bond::operator != (const Bond& bond) const
{
	return (this != &bond);
}