ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/branches/sync4pymol12/src/mengine/src/field.c
Revision: 99
Committed: Mon Jan 19 04:31:29 2009 UTC (10 years, 10 months ago) by wdelano
File size: 4680 byte(s)
Log Message:
synchronized with trunk, less openmp lib/include
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 #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 }
132 if (fx_dist.ndfix > 0) pot.use_geom = TRUE;
133 if (fx_angle.nafix > 0) pot.use_geom = TRUE;
134 if (fx_torsion.ntfix > 0) pot.use_geom = TRUE;
135 if (restrain_atom.natom_restrain > 0) pot.use_geom = TRUE;
136 }
137 // ============================
138 void potoff()
139 {
140 pot.use_bond = FALSE;
141 pot.use_angle = FALSE;
142 pot.use_strbnd = FALSE;
143 pot.use_urey = FALSE;
144 pot.use_angang = FALSE;
145 pot.use_opbend = FALSE;
146 pot.use_improp = FALSE;
147 pot.use_imptor = FALSE;
148 pot.use_tors = FALSE;
149 pot.use_strtor = FALSE;
150 pot.use_tortor = FALSE;
151 pot.use_vdw = FALSE;
152 pot.use_lj = FALSE;
153 pot.use_buck = FALSE;
154 pot.use_hal = FALSE;
155 pot.use_gauss = FALSE;
156 pot.use_charge = FALSE;
157 pot.use_bufcharge = FALSE;
158 pot.use_chrgdpl = FALSE;
159 pot.use_dipole = FALSE;
160 pot.use_polar = FALSE;
161 pot.use_solv = FALSE;
162 pot.use_geom = FALSE;
163 pot.use_extra = FALSE;
164 pot.use_picalc = FALSE;
165 pot.use_hbond = FALSE;
166 pot.use_coordb = FALSE;
167 pot.use_opbend_wilson = FALSE;
168 }
169