1 |
#define EXTERN extern
|
2 |
|
3 |
#include "pcwin.h"
|
4 |
#include "pcmod.h"
|
5 |
#include "pot.h"
|
6 |
#include "field.h"
|
7 |
#include "fix.h"
|
8 |
|
9 |
EXTERN struct t_minim_values {
|
10 |
int iprint, ndc, nconst;
|
11 |
float dielc;
|
12 |
} minim_values;
|
13 |
|
14 |
void set_field(void);
|
15 |
void potoff(void);
|
16 |
|
17 |
void set_field()
|
18 |
{
|
19 |
pot.use_bond = FALSE;
|
20 |
pot.use_angle = FALSE;
|
21 |
pot.use_strbnd = FALSE;
|
22 |
pot.use_urey = FALSE;
|
23 |
pot.use_angang = FALSE;
|
24 |
pot.use_opbend = FALSE;
|
25 |
pot.use_improp = FALSE;
|
26 |
pot.use_imptor = FALSE;
|
27 |
pot.use_tors = FALSE;
|
28 |
pot.use_strtor = FALSE;
|
29 |
pot.use_tortor = FALSE;
|
30 |
pot.use_vdw = FALSE;
|
31 |
pot.use_lj = FALSE;
|
32 |
pot.use_buck = FALSE;
|
33 |
pot.use_hal = FALSE;
|
34 |
pot.use_gauss = FALSE;
|
35 |
pot.use_charge = FALSE;
|
36 |
pot.use_bufcharge = FALSE;
|
37 |
pot.use_chrgdpl = FALSE;
|
38 |
pot.use_dipole = FALSE;
|
39 |
pot.use_polar = FALSE;
|
40 |
pot.use_geom = FALSE;
|
41 |
pot.use_extra = FALSE;
|
42 |
pot.use_picalc = FALSE;
|
43 |
pot.use_hbond = FALSE;
|
44 |
pot.use_coordb = FALSE;
|
45 |
pot.use_opbend_wilson = FALSE;
|
46 |
pot.use_highcoord = FALSE;
|
47 |
|
48 |
if (field.type == MMX )
|
49 |
{
|
50 |
pot.use_bond = TRUE;
|
51 |
pot.use_angle = TRUE;
|
52 |
pot.use_strbnd = TRUE;
|
53 |
pot.use_opbend = TRUE;
|
54 |
pot.use_opbend_wilson = FALSE;
|
55 |
pot.use_tors = TRUE;
|
56 |
pot.use_vdw = TRUE;
|
57 |
pot.use_buck = TRUE;
|
58 |
pot.use_lj = FALSE;
|
59 |
pot.use_hal = FALSE;
|
60 |
pot.use_gauss = FALSE;
|
61 |
if (hbond_flag == TRUE)
|
62 |
pot.use_hbond = TRUE;
|
63 |
else
|
64 |
pot.use_hbond = FALSE;
|
65 |
|
66 |
pot.use_bufcharge= FALSE;
|
67 |
if (minim_values.ndc == 4)
|
68 |
{
|
69 |
pot.use_charge = TRUE;
|
70 |
pot.use_dipole = FALSE;
|
71 |
}else
|
72 |
{
|
73 |
pot.use_charge = FALSE;
|
74 |
pot.use_dipole = TRUE;
|
75 |
}
|
76 |
pot.use_urey = FALSE;
|
77 |
|
78 |
pot.use_angang = FALSE;
|
79 |
pot.use_improp = FALSE;
|
80 |
pot.use_imptor = FALSE;
|
81 |
pot.use_strtor = FALSE;
|
82 |
pot.use_tortor = FALSE;
|
83 |
} else if (field.type == MM3)
|
84 |
{
|
85 |
pot.use_bond = TRUE;
|
86 |
pot.use_angle = TRUE;
|
87 |
pot.use_strbnd = TRUE;
|
88 |
pot.use_opbend = TRUE;
|
89 |
pot.use_opbend_wilson = FALSE;
|
90 |
pot.use_tors = TRUE;
|
91 |
pot.use_vdw = TRUE;
|
92 |
pot.use_buck = TRUE;
|
93 |
pot.use_lj = FALSE;
|
94 |
pot.use_hal = FALSE;
|
95 |
pot.use_hbond = FALSE;
|
96 |
|
97 |
pot.use_gauss = FALSE;
|
98 |
pot.use_charge = FALSE;
|
99 |
pot.use_bufcharge= FALSE;
|
100 |
pot.use_dipole = TRUE;
|
101 |
pot.use_urey = FALSE;
|
102 |
pot.use_improp = FALSE;
|
103 |
pot.use_imptor = FALSE;
|
104 |
pot.use_angang = TRUE;
|
105 |
pot.use_strtor = TRUE;
|
106 |
} else if (field.type == MMFF94)
|
107 |
{
|
108 |
pot.use_bond = TRUE;
|
109 |
pot.use_angle = TRUE;
|
110 |
pot.use_strbnd = TRUE;
|
111 |
pot.use_opbend = FALSE;
|
112 |
pot.use_opbend_wilson = TRUE;
|
113 |
pot.use_tors = TRUE;
|
114 |
|
115 |
pot.use_vdw = FALSE;
|
116 |
pot.use_buck = FALSE;
|
117 |
pot.use_lj = FALSE;
|
118 |
pot.use_hal = TRUE;
|
119 |
|
120 |
pot.use_hbond = FALSE;
|
121 |
|
122 |
pot.use_gauss = FALSE;
|
123 |
pot.use_charge = FALSE;
|
124 |
pot.use_bufcharge= TRUE;
|
125 |
pot.use_dipole = FALSE;
|
126 |
pot.use_urey = FALSE;
|
127 |
pot.use_improp = FALSE;
|
128 |
pot.use_imptor = FALSE;
|
129 |
pot.use_angang = FALSE;
|
130 |
pot.use_strtor = FALSE;
|
131 |
} else if (field.type == AMBER || field.type == OPLSAA)
|
132 |
{
|
133 |
pot.use_bond = TRUE;
|
134 |
pot.use_angle = TRUE;
|
135 |
pot.use_strbnd = FALSE;
|
136 |
pot.use_opbend = FALSE;
|
137 |
pot.use_opbend_wilson = FALSE;
|
138 |
pot.use_tors = TRUE;
|
139 |
|
140 |
pot.use_vdw = FALSE;
|
141 |
pot.use_buck = FALSE;
|
142 |
pot.use_lj = TRUE;
|
143 |
pot.use_hal = FALSE;
|
144 |
|
145 |
pot.use_hbond = FALSE;
|
146 |
|
147 |
pot.use_gauss = FALSE;
|
148 |
pot.use_charge = TRUE;
|
149 |
pot.use_bufcharge= FALSE;
|
150 |
pot.use_dipole = FALSE;
|
151 |
pot.use_urey = FALSE;
|
152 |
pot.use_improp = FALSE;
|
153 |
pot.use_imptor = TRUE;
|
154 |
pot.use_angang = FALSE;
|
155 |
pot.use_strtor = FALSE;
|
156 |
}
|
157 |
if (fx_dist.ndfix > 0) pot.use_geom = TRUE;
|
158 |
if (fx_angle.nafix > 0) pot.use_geom = TRUE;
|
159 |
if (fx_torsion.ntfix > 0) pot.use_geom = TRUE;
|
160 |
if (restrain_atom.natom_restrain > 0) pot.use_geom = TRUE;
|
161 |
}
|
162 |
// ============================
|
163 |
void potoff()
|
164 |
{
|
165 |
pot.use_bond = FALSE;
|
166 |
pot.use_angle = FALSE;
|
167 |
pot.use_strbnd = FALSE;
|
168 |
pot.use_urey = FALSE;
|
169 |
pot.use_angang = FALSE;
|
170 |
pot.use_opbend = FALSE;
|
171 |
pot.use_improp = FALSE;
|
172 |
pot.use_imptor = FALSE;
|
173 |
pot.use_tors = FALSE;
|
174 |
pot.use_strtor = FALSE;
|
175 |
pot.use_tortor = FALSE;
|
176 |
pot.use_vdw = FALSE;
|
177 |
pot.use_lj = FALSE;
|
178 |
pot.use_buck = FALSE;
|
179 |
pot.use_hal = FALSE;
|
180 |
pot.use_gauss = FALSE;
|
181 |
pot.use_charge = FALSE;
|
182 |
pot.use_bufcharge = FALSE;
|
183 |
pot.use_chrgdpl = FALSE;
|
184 |
pot.use_dipole = FALSE;
|
185 |
pot.use_polar = FALSE;
|
186 |
pot.use_solv = FALSE;
|
187 |
pot.use_geom = FALSE;
|
188 |
pot.use_extra = FALSE;
|
189 |
pot.use_picalc = FALSE;
|
190 |
pot.use_hbond = FALSE;
|
191 |
pot.use_coordb = FALSE;
|
192 |
pot.use_opbend_wilson = FALSE;
|
193 |
}
|
194 |
|