This file is indexed.

/usr/include/ghemical/eng1_mm_prmfit.h is in libghemical-dev 3.0.0-4.1build2.

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
// ENG1_MM_PRMFIT.H : a slightly modified FF class for FF parameter fitting.

// Copyright (C) 1998 Tommi Hassinen.

// 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 ENG1_MM_PRMFIT_H
#define ENG1_MM_PRMFIT_H

struct mm_prmfit_bt1;		// bond stretching
struct mm_prmfit_bt2;		// angle bending
struct mm_prmfit_bt3;		// torsion terms
struct mm_prmfit_bt4;		// out-of-plane

struct mm_prmfit_nbt1;		// nonbonded terms

class eng1_mm_prmfit;

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

#include "eng1_mm.h"
#include "tab_mm_prmfit.h"

#include <vector>
using namespace std;

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

struct mm_prmfit_bt1		// bond stretching
{
	i32s atmi[2];
	
	f64 opt;
	f64 fc;
	
	i32s get_atmi(i32s index, bool dir)
	{
		return atmi[dir ? index : !index];
	}
	
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	
	i32s bt;
};

struct mm_prmfit_bt2		// angle bending
{
	i32s atmi[3];
	
	i32s index1[2]; bool dir1[2];
	
	f64 opt;
	f64 fc;
	
	i32s get_index(i32s index, bool dir)
	{
		return index1[dir ? index : !index];
	}
	
	bool get_dir(i32s index, bool dir)
	{
		return dir1[dir ? index : !index];
	}
	
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...

	i32s bt[2];
};

struct mm_prmfit_bt3		// torsion terms
{
	i32s atmi[4];
	
	i32s index2[2];
	i32s index1[4]; bool dir1[4];
	
	f64 fc1;
	f64 fc2;
	f64 fc3;
	
	bool constraint;
	
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...

	i32s bt[3];
};

struct mm_prmfit_bt4		// out-of-plane
{
	i32s atmi[4];
	
	i32s index2; bool dir2;
	i32s index1[3]; bool dir1[3];
	
	f64 opt;
	f64 fc;
	
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	
	i32s bt[3];
};

struct mm_prmfit_nbt1		// nonbonded terms
{
	i32s atmi[2];
	
	f64 kr;
	f64 kd;
	f64 qq;
	
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
	// these records contain information that is used in parameter derivation process...
};

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

/// This is a slightly modified and patched eng-class for parameter fitting.

class eng1_mm_prmfit : public eng1_mm
{
	protected:
	
	mm_bt1_data * bt1data;
	mm_bt2_data * bt2data;
	
	vector<mm_prmfit_bt1> bt1_vector;
	vector<mm_prmfit_bt2> bt2_vector;
	vector<mm_prmfit_bt3> bt3_vector;
	vector<mm_prmfit_bt4> bt4_vector;
	
	vector<mm_prmfit_nbt1> nbt1_vector;
	
	friend class prmfit_tables;
	friend class prmfit_cg_optim;
	
	public:
	
	eng1_mm_prmfit(setup *, i32u , prmfit_tables &);
	virtual ~eng1_mm_prmfit(void);
	
// strategy: the tab_mm_prmfit/eng1_mm_prmfit classes are different from the default ones,
// ^^^^^^^^^ and it seems to be OK; compatibility at parameter-file-level seems to be enough!
	
	i32s FindTorsion(atom *, atom *, atom *, atom *);
	bool SetTorsionConstraint(atom *, atom *, atom *, atom *, f64, f64, bool);	// virtual
	bool RemoveTorsionConstraint(atom *, atom *, atom *, atom *);			// virtual
	
	protected:
	
	void ComputeBT1(i32u);		// virtual
	void ComputeBT2(i32u);		// virtual
	void ComputeBT3(i32u);		// virtual
	void ComputeBT4(i32u);		// virtual
	
	void ComputeNBT1(i32u);		// virtual
};

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

#endif	// ENG1_MM_PRMFIT_H

// eof