ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/freemol/trunk/src/mengine/src/datastat.c
Revision: 125
Committed: Thu Jun 18 18:38:50 2009 UTC (11 years ago) by wdelano
File size: 13668 byte(s)
Log Message:
added fn prototypes; eliminated more warnings
Line File contents
1 #define EXTERN extern
2 #include "pcwin.h"
3
4 #define NDEF 0.001F
5 struct ElementType {
6 char symbol[3];
7 int atomnum;
8 float weight, covradius, vdwradius;
9 int s,p,d,f, type;
10 } Elements[] = {
11 { "H" , 1, 1.0079F, 0.3F, 1.50F, 1,0,0,0, 5 },
12 { "He", 2, 4.0026F, NDEF, 1.53F, 2,0,0,0, 0 },
13 { "Li", 3, 6.941F, 1.51F, 2.00F, 1,0,0,0, 301 },
14 { "Be", 4, 9.0121F, 1.11F, 2.00F, 2,0,0,0, 302 },
15 { "B" , 5, 10.810F, 0.88F, 1.98F, 2,1,0,0, 26 },
16 { "C" , 6, 12.011F, 0.77F, 1.94F, 2,2,0,0, 1 },
17 { "N" , 7, 14.0006F, 0.70F, 1.82F, 2,3,0,0, 8 },
18 { "O" , 8, 15.9994F, 0.66F, 1.74F, 2,4,0,0, 6 },
19 { "F" , 9, 18.998F, 0.64F, 1.71F, 2,5,0,0, 11 },
20 { "Ne", 10, 20.179F, NDEF, 1.60F, 2,6,0,0, 0 },
21 { "Na", 11, 22.989F, 1.85F, 1.86F, 1,0,0,0, 303 },
22 { "Mg", 12, 24.305F, 1.60F, 2.20F, 2,0,0,0, 304 },
23 { "Al", 13, 26.981F, 1.43F, 1.60F, 2,1,0,0, 44 },
24 { "Si", 14, 28.085F, 1.17F, 2.25F, 2,2,0,0, 19 },
25 { "P" , 15, 30.974F, 1.10F, 2.20F, 2,3,0,0, 25 },
26 { "S" , 16, 32.060F, 1.04F, 2.15F, 2,4,0,0, 15 },
27 { "Cl", 17, 35.453F, 0.99F, 2.07F, 2,5,0,0, 12 },
28 { "Ar", 18, 39.948F, NDEF, 1.99F, 2,6,0,0, 0 },
29 { "K" , 19, 39.098F, 2.30F, 2.31F, 1,0,0,0, 305 },
30 { "Ca", 20, 40.080F, 2.00F, 2.81F, 2,0,0,0, 306 },
31 { "Sc", 21, 44.956F, 1.60F, 2.20F, 2,6,1,0, 307 },
32 { "Ti", 22, 47.900F, 1.46F, 2.20F, 2,6,2,0, 308 },
33 { "V" , 23, 50.941F, 1.355F, 2.20F, 2,6,3,0, 309 },
34 { "Cr", 24, 51.996F, 1.28F, 2.20F, 1,6,5,0, 310 },
35 { "Mn", 25, 54.938F, 1.253F, 2.20F, 2,6,5,0, 311 },
36 { "Fe", 26, 55.84F, 1.222F, 2.20F, 2,6,6,0, 312 },
37 { "Co", 27, 58.93F, 1.26F, 2.20F, 2,6,7,0, 313 },
38 { "Ni", 28, 58.7F , 1.28F, 2.20F, 2,6,7,0, 314 },
39 { "Cu", 29, 63.54F, 1.13F, 2.20F, 2,6,7,0, 315 },
40 { "Zn", 30, 65.38F , 1.309F, 2.20F, 2,6,7,0, 316 },
41 { "Ga", 31, 69.72F , 1.26F, 2.20F, 2,6,7,0, 317 },
42 { "Ge", 32, 72.5F , 1.22F, 2.44F, 2,6,7,0, 318 },
43 { "As", 33, 74.92F , 1.21F, 2.40F, 2,6,7,0, 319 },
44 { "Se", 34, 78.9F , 1.17F, 2.29F, 2,6,7,0, 34 },
45 { "Br", 35, 79.90F , 1.14F, 2.22F, 2,6,7,0, 13 },
46 { "Kr", 36, 83.8F , NDEF, 2.15F, 2,6,7,0, 0 },
47 { "Rb", 37, 85.46F , 2.44F, 2.44F, 2,6,7,0, 320 },
48 { "Sr", 38, 87.62F , 2.15F, 3.00F, 2,6,7,0, 321 },
49 { "Y" , 39, 88.9F , 1.85F, 1.85F, 2,6,7,0, 322 },
50 { "Zr", 40, 91.22F , 1.50F, 1.60F, 2,6,7,0, 323 },
51 { "Nb", 41, 92.90F , 1.455F, 2.20F, 2,6,7,0, 324 },
52 { "Mo", 42, 95.9F , 1.41F, 2.20F, 2,6,7,0, 325 },
53 { "Tc", 43, 98.90F , 1.22F, 2.20F, 2,6,7,0, 326 },
54 { "Ru", 44, 101.0F , 1.32F, 2.20F, 2,6,7,0, 327 },
55 { "Rh", 45, 102.9F , 1.355F, 2.20F, 2,6,7,0, 328 },
56 { "Pd", 46, 106.4F , 1.400F, 2.20F, 2,6,7,0, 329 },
57 { "Ag", 47, 107.87F , 1.330F, 2.20F, 2,6,7,0, 330 },
58 { "Cd", 48, 112.4F , 1.51F, 2.20F, 2,6,7,0, 331 },
59 { "In", 49, 114.82F , 1.45F, 2.20F, 2,6,7,0, 332 },
60 { "Sn", 50, 118.6F , 1.40F, 2.59F, 2,6,7,0, 32 },
61 { "Sb", 51, 121.7F , 1.41F, 2.20F, 2,6,7,0, 334 },
62 { "Te", 52, 127.6F , 1.37F, 2.44F, 2,6,7,0, 35 },
63 { "I" , 53, 126.90F , 1.33F, 2.15F, 2,6,7,0, 14 },
64 { "Xe", 54, 131.30F , NDEF, 2.28F, 2,6,7,0, 0 },
65 { "Cs", 55, 132.90F , 2.62F, 2.62F, 2,6,7,0, 336 },
66 { "Ba", 56, 137.3F , 2.15F, 3.07F, 2,6,7,0, 337 },
67 { "La", 57, 138.90F , 1.85F, 2.78F, 2,6,7,0, 338 },
68 { "Ce", 58, 140.12F , 1.85F, 2.78F, 2,6,7,0, 339 },
69 { "Pr", 59, 140.91F , 1.85F, 2.78F, 2,6,7,0, 340 },
70 { "Nd", 60, 144.24F , 1.85F, 2.78F, 2,6,7,0, 341 },
71 { "Pm", 61, 147.00F , 1.85F, 2.78F, 2,6,7,0, 342 },
72 { "Sm", 62, 150.35F , 1.85F, 2.78F, 2,6,7,0, 343 },
73 { "Eu", 63, 151.36F , 1.85F, 2.78F, 2,6,7,0, 344 },
74 { "Gd", 64, 157.25F , 1.85F, 2.78F, 2,6,7,0, 345 },
75 { "Tb", 65, 158.92F , 1.85F, 2.78F, 2,6,7,0, 346 },
76 { "Dy", 66, 162.50F , 1.85F, 2.78F, 2,6,7,0, 347 },
77 { "Ho", 67, 164.93F , 1.85F, 2.78F, 2,6,7,0, 348 },
78 { "Er", 68, 167.26F , 1.85F, 2.78F, 2,6,7,0, 349 },
79 { "Tm", 69, 168.93F , 1.85F, 2.78F, 2,6,7,0, 350 },
80 { "Yb", 70, 173.04F , 1.85F, 2.78F, 2,6,7,0, 351 },
81 { "Lu", 71, 174.97F , 1.85F, 2.78F, 2,6,7,0, 352 },
82 { "Hf", 72, 178.4F , 1.60F, 3.00F , 2,6,7,0, 353 },
83 { "Ta", 73, 180.95F , 1.455F, 3.00F, 2,6,7,0, 354 },
84 { "W" , 74, 183.8F , 1.40F, 3.00F, 2,6,7,0, 355 },
85 { "Re", 75, 186.2F , 1.355F, 3.00F, 2,6,7,0, 356 },
86 { "Os", 76, 190.2F , 1.355F, 3.00F, 2,6,7,0, 357 },
87 { "Ir", 77, 192.2F , 1.220F, 3.00F, 2,6,7,0, 358 },
88 { "Pt", 78, 195.0F , 1.40F, 3.00F, 2,6,7,0, 359 },
89 { "Au", 79, 196.97F , 1.250F, 3.00F, 2,6,7,0, 360 },
90 { "Hg", 80, 200.5F , 1.51F, 3.00F, 2,6,7,0, 361 },
91 { "Tl", 81, 204.3F , 1.70F, 3.00F, 2,6,7,0, 362 },
92 { "Pb", 82, 207.2F , 1.50F, 2.74F, 2,6,7,0, 33 },
93 { "Bi", 83, 208.98F , 1.51F, 3.00F, 2,6,7,0, 363 },
94 { "Po", 84, 210.00F , 1.47F, 3.00F, 2,6,7,0, 364 },
95 { "At", 85, 210.00F , 1.44F, 3.00F, 2,6,7,0, 365 },
96 { "Rn", 86, 222.0F , NDEF, 3.00F, 2,6,7,0, 366 },
97 { "Fr", 87, 223.0F , NDEF, 3.00F, 2,6,7,0, 367 },
98 { "Ra", 88, 226.0F , NDEF, 3.00F, 2,6,7,0, 368 },
99 { "Ac", 89, 227.0F , NDEF, 3.00F, 2,6,7,0, 369 },
100 { "Th", 90, 232.04F , NDEF, 3.00F, 2,6,7,0, 370 },
101 { "Pa", 91, 231.0F , NDEF, 3.00F, 2,6,7,0, 371 },
102 { "U", 92, 238.03F , NDEF, 3.00F, 2,6,7,0, 372 },
103 { "Np", 93, 237.0F , NDEF, 3.00F, 2,6,7,0, 373 },
104 { "Pu", 94, 242.0F , NDEF, 3.00F, 2,6,7,0, 374 },
105 { "Am", 95, 243.0F , NDEF, 3.00F, 2,6,7,0, 375 },
106 { "Cm", 96, 247.0F , NDEF, 3.00F, 2,6,7,0, 376 },
107 { "Bk", 97, 249.0F , NDEF, 3.00F, 2,6,7,0, 377 },
108 { "Cf", 98, 251.0F , NDEF, 3.00F, 2,6,7,0, 378 },
109 { "Es", 99, 254.0F , NDEF, 3.00F, 2,6,7,0, 379 },
110 { "Fm", 100, 253.0F , NDEF, 3.00F, 2,6,7,0, 380 },
111 { "Md", 101, 256.0F , NDEF, 3.00F, 2,6,7,0, 381 },
112 { "No", 102, 253.0F , NDEF, 3.00F, 2,6,7,0, 382 },
113 { "Lw", 103, 257.0F , NDEF, 3.00F, 2,6,7,0, 383 }
114 } ;
115 // current number is 200 -- this is bogus - really mm3 types needs to be rewritten
116 int gaff_mmx[] = {
117 1, 2, 3, 4, 5, 6, 7, 8, 9,10,
118 11,12,13,14,15,16,17,18,19,20,
119 21,22,23,24,25,26,27,28,29,30,
120 31,32,33,34,35,36,37, 2,41, 9,
121 6,15,37,21,10,41,66,24, 6,40,
122 99,99,99,99,99,56,57, 7,99,47,
123 99,99,99,99,99,99, 3, 4,42,46,
124 4,37,28,38, 6, 7, 7, 7, 7, 7,
125 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
126 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
127 7, 7, 7,15,15, 4,37,37,37,41,
128 41,99,40,40, 7, 7, 7, 7, 7, 7,
129 7,99,99, 5,306,321,337,338,339,340,
130 341,340,343,344,345,346,347,348,349,350,
131 351,352,37,37, 6, 8,99, 6, 6, 8,
132 9,99,25,154,155,156,157,158,159,160,
133 0,0,0,0,0,0,0,0,0,0 };
134 // current number is 100
135 int mmff_mmx[] = {
136 1, 2, 3, 4, 5, 6, 7, 8,37, 9,
137 11,12,13,14,15,16,17,18,19,56,
138 21,22,23,24,47,25,23,23,28,57,
139 21,66,28,41,64,24, 2,37,37, 8,
140 3,10, 9,15,41,37, 7,66,46,21,
141 46,21,46,41,37,41, 2,41, 6, 4,
142 68, 9, 2, 2,37,37,41,41,41, 6,
143 21,15,15,15,25, 8,12, 1, 8, 2,
144 41,41,300,300,300,300,300,300,300,300,300,
145 300,300,300,300,300,300,300,300,300,300 };
146
147 // mapmmx types to other atom types
148 struct {
149 int mm3, mmff, amber, opls;
150 } AtomTypes[] = {
151 { 1, 1, 1, 1 }, // Csp3
152 { 2, 2, 2, 2 }, // Csp3
153 { 3, 3, 3, 3 }, // Csp3
154 { 4, 4, 4, 4 }, // Csp3
155 { 5, 5, 5, 5 }, // H
156 { 6, 6, 6, 6 }, // Osp3
157 { 7, 7, 7, 7 }, // Osp3
158 { 8, 8, 8, 8 }, // Nsp3
159 { 9, 9, 9, 9 }, // Nsp3
160 { 10,10,10,10 }, // Nsp3
161 { 11,11,11,11 }, // F
162 { 12,12,12,12 }, // Cl
163 { 13,13,13,13 }, // Br
164 { 14,14,14,14 }, // I
165 { 15,15,15,15 }, // S
166 { 16,16,16,16 }, // S+
167 { 17,17,17,17 }, // S+
168 { 18,18,18,18 }, // S+
169 { 19,19,19,19 }, // Si
170 { 0, 0, 0, 0 }, // Lone Pair
171 { 21,21,21,21 }, // HO
172 { 22,22, 0,21 }, // cyclopropane
173 { 23,23, 0,21 }, // H Amine
174 { 24,24, 0,21 }, // H COOH
175 { 25,26,25,25 }, // P3 {
176 { 26, 0,26,26 }, // Bsp2
177 { 27, 0,27,27 }, // Bsp3
178 { 28,28,27,27 }, // H Amide
179 { 29, 0,29,29 }, // C.
180 { 30, 0,30,30 }, // C+
181 { 31, 0,31,31 }, // Ge
182 { 32, 0,32,32 }, // Sn
183 { 33, 0,33,33 }, // Pb
184 { 34, 0,39,39 }, // Se
185 { 35, 0,35,35 }, // Te
186 { 36, 0,36,36 }, // D
187 { 37,38, 0, 0 }, // N imine
188 { 74,16, 0, 0 }, // S=
189 { 0, 0, 0, 0 }, // Se=
190 { 50,37,40,40 }, // C aromatic type 40
191 { 39,34,41,41 }, // N+
192 { 47,32,42,42 }, // O-
193 { 0, 0, 0, 0 }, // TS B
194 { 0, 0,44,44 }, // Al
195 { 0, 0, 0, 0 }, // TS H
196 { 70,49,46,46 }, // O+ {
197 { 60,25,47,47 }, // P5
198 { 0, 0,48,48 }, // C-
199 { 0, 0, 0, 0 }, // C*
200 { 0, 0, 0, 0 }, // C# 50
201 { 0, 0, 0, 0 }, // C$
202 { 0, 0, 0, 0 }, // C%
203 { 0, 0, 0, 0 }, // O#
204 { 0, 0, 0, 0 }, // I%
205 { 0, 0, 0, 0 }, // N#
206 { 56,20, 0, 0 }, // cyclobutane
207 { 57,30, 0, 0 }, // cyclobutene
208 { 0, 0,58,58 }, // Al sp3
209 { 0, 0, 0, 0 }, // empty
210 { 200, 0, 0, 0 }, // Dummy // 60
211 { 2, 2, 0, 0 }, // 61
212 { 4, 4, 0, 0 }, // 62
213 { 3, 3, 0, 0 }, // 63
214 { 0, 0, 0, 0 }, // 64
215 { 0, 0, 0, 0 }, // 65
216 { 7,32, 0, 0 }, // 66
217 { 25,26, 0, 0 }, // 67
218 { 0, 0, 0, 0 }, // 68
219 { 0, 0, 0, 0 }, // 69
220 { 0, 0, 0, 0 }, // 70
221 { 0, 0, 0, 0 }, // 71
222 { 0, 0, 0, 0 }, // 72
223 { 0, 0, 0, 0 }, // 73
224 { 0, 0, 0, 0 }, // 74
225 { 0, 0, 0, 0 }, // 75
226 { 0, 0, 0, 0 }, // 76
227 { 0, 0, 0, 0 }, // 77
228 { 0, 0, 0, 0 }, // 78
229 { 0, 0, 0, 0 }, // 79
230 { 0, 0, 0, 0 }, // 80
231 { 0, 0, 0, 0 }, // 81
232 { 0, 0, 0, 0 }, // 82
233 { 0, 0, 0, 0 }, // 83
234 { 0, 0, 0, 0 }, // 84
235 { 0, 0, 0, 0 }, // 85
236 { 0, 0, 0, 0 }, // 86
237 { 0, 0, 0, 0 }, // 87
238 { 0, 0, 0, 0 }, // 88
239 { 0, 0, 0, 0 }, // 89
240 { 0, 0, 0, 0 }, // 90
241 { 0, 0, 0, 0 }, // 91
242 { 0, 0, 0, 0 }, // 92
243 { 0, 0, 0, 0 }, // 93
244 { 0, 0, 0, 0 }, // 94
245 { 0, 0, 0, 0 }, // 95
246 { 0, 0, 0, 0 }, // 96
247 { 0, 0, 0, 0 }, // 97
248 { 0, 0, 0, 0 }, // 98
249 { 0, 0, 0, 0 }, // 99
250 { 0, 0, 0, 0 }, // 100
251 { 0, 0, 0, 0 }, // 101
252 { 0, 0, 0, 0 }, // 102
253 { 0, 0, 0, 0 }, // 103
254 };