This file is indexed.

/usr/include/ghemical/seqbuild.h is in libghemical-dev 3.0.0-2ubuntu1.

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
// SEQBUILD.H : a sequence builder class for building and identifying sequences.

// Copyright (C) 1998 Tommi Hassinen, Geoff Hutchison.

// This package is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.

// This package is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this package; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

/*################################################################################################*/

#ifndef SEQBUILD_H
#define SEQBUILD_H

#include "libghemicaldefine.h"

struct sb_constraint_crd;
struct sb_constraint_tor;

class sb_chain_descriptor;

class sequencebuilder;

class sb_data_td;	// for internal use only...
class sb_data_atm;	// for internal use only...
class sb_data_bnd;	// for internal use only...

class sb_data_res;	// for internal use only...

struct sb_tdata;	// for internal use only...

/*################################################################################################*/

#include "atom.h"
#include "bond.h"

#include "chn_info.h"
#include "typerule.h"

typedef vector<atom *> atmr_vector;

/*################################################################################################*/

struct sb_constraint_crd
{
	int pos;
	
	int atm_id;
	float crdX;
	float crdY;
	float crdZ;
};

struct sb_constraint_tor
{
	int pos;
	
	int tor_ind;
	float tor_val;
};

/**	A sb_chain_descriptor object describes the chain to be built for the Build() method of
	the sequence builder class. It describes the chain using either 1-letter or 3-letter codes
	and it can optionally contain information about 3D-structure as well.
*/

class sb_chain_descriptor
{
	protected:
	
	bool mode_1_letter;
	
	vector<char> * seq1;
	vector<char *> * seq3;
	
	int curr_res;
	
	int c_crd_BGN; int c_crd_END;
	vector<sb_constraint_crd> c_crd_v;
	
	int c_tor_BGN; int c_tor_END;
	vector<sb_constraint_tor> c_tor_v;
	
	friend class sequencebuilder;
	
	public:
	
	vector<f64> def_tor;
	
	public:
	
	sb_chain_descriptor(bool);
	~sb_chain_descriptor(void);
	
	int AddRes1(char);		// return value is the current chain length.
	int AddRes3(const char *);	// return value is the current chain length.
	
	void AddCRD(int, float, float, float);
	void AddTOR(int, float);
};

/*################################################################################################*/

/**	A generic sequence builder class. This same code will handle both peptides/proteins 
	and nucleic acids. Only the input file read in ctor is different. The sequence builders 
	can both build sequences and identify them.
	
	Sequence builders will handle only heavy atoms. You must add the hydrogens separately. 
	At least for peptides/proteins this is a complicated (and pH-dependent) job...
	
	How to handle the histidine case with various tautomeric forms???
*/

class sequencebuilder
{
	protected:
	
	chn_info::chn_type type;
	
	vector<sb_data_atm> main_vector;
	vector<sb_data_atm> conn_vector;
	
	vector<sb_data_td> td_mc_store;
	
	vector<sb_data_res> resi_vector;
	
	vector<typerule> head_vector;
	vector<typerule> tail_vector;
	
	sb_data_res * mod[3];
	
	char buffer[256];
	
	vector<i32s> id_vector;			// the builder
	atmr_vector atom_vector;		// the builder
	atmr_vector allatm_vector;		// the builder
	vector<sb_data_td> td_v;		// the builder
	
	atmr_vector tmpatm_vector;		// the identifier
	vector<atmr_vector> path_vector;	// the identifier
	
	friend class model;
	friend class setup1_sf;
	
	public:
	
	sequencebuilder(chn_info::chn_type, const char *);
	~sequencebuilder(void);
	
	void Build(model *, sb_chain_descriptor *, bool = true);
	
	void Identify(model *);
	
	private:
	
// the builder
	
	void BuildResidue(sb_chain_descriptor *, model *, sb_data_res *);
	void Convert(sb_chain_descriptor *, sb_data_atm *, fGL *);
	
// the identifier
	
	void BuildTemplate(vector<sb_tdata> &, i32s, bool, bool);
	void BuildPartialT(vector<sb_tdata> &, vector<sb_data_atm> &);
	void FindPath(model *, atom *, atom *, i32u = 0);
	bool CheckTemplate(vector<sb_tdata> &, i32s);
};

/*################################################################################################*/

class sb_data_td
{
	protected:
	
	i32s id[4];
	bool flag;
	
	friend class sequencebuilder;
	
	public:
	
	sb_data_td(void);
	~sb_data_td(void);
	
	friend istream & operator>>(istream &, sb_data_td &);
};

/*################################################################################################*/

class sb_data_atm
{
	protected:
	
	i32s id;
	i32s prev[3];
	
	element el;
	int f_chrg;
	
	bondtype bt;
	
	typerule * tr;
	
	f64 ic1[3];
	i32s ic2;
	
	friend class sequencebuilder;
	
	public:
	
	sb_data_atm(void);
	sb_data_atm(const sb_data_atm &);
	~sb_data_atm(void);
	
	friend istream & operator>>(istream &, sb_data_atm &);
};

/*################################################################################################*/

class sb_data_bnd
{
	protected:
	
	i32s atm[2];
	bondtype bt;

	friend class sequencebuilder;
	
	public:
	
	sb_data_bnd(void);
	~sb_data_bnd(void);
	
	friend istream & operator>>(istream &, sb_data_bnd &);
};

/*################################################################################################*/

class sb_data_res
{
	protected:
	
	i32s id;
	
	char symbol1;		// a single-char symbol
	char symbol3[4];	// a three-char string symbol
	
	char * description;
	
	vector<sb_data_td> td_vector;
	vector<sb_data_atm> atm_vector;
	vector<sb_data_bnd> bnd_vector;
	
	friend class sequencebuilder;
	
	friend class model;		// old???
	friend class setup1_sf;		// new!!!
	
	public:
	
	sb_data_res(void);
	sb_data_res(const sb_data_res &);
	~sb_data_res(void);
	
	void ReadModification(istream &);
	
	friend istream & operator>>(istream &, sb_data_res &);
};

/*################################################################################################*/

struct sb_tdata
{
	element el; bondtype bt;
	i32s id[2]; atom * ref;
};

/*################################################################################################*/

#endif	// SEQBUILD_H

// eof