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