ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/smi23d/src/mengine/field.c
Revision: 3
Committed: Mon Jun 9 21:38:26 2008 UTC (11 years, 4 months ago) by tjod
File size: 4966 byte(s)
Log Message:
test

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