ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/branches/sync4pymol12/src/mengine/src/field.c
(Generate patch)
# Line 1 | Line 1
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 < }
188 <
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 >

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines