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

Line User Rev File contents
1 tjod 3 #define EXTERN extern
2     #include "pcwin.h"
3     #include "pcmod.h"
4     #include "pdb.h"
5    
6     int ncol[] = {
7     7, 7, 7, 7, 2, 3, 1, 4, 6, 7,
8     7, 7, 7, 7,10, 5, 2, 7, 7, 7,
9     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
10     7, 7, 7, 4, 8, 7, 7, 7, 7, 7,
11     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
12     7, 7, 9, 7, 7, 7, 7, 7, 7, 7,
13     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
14     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
15     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
16     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
17     7, 7, 7 };
18    
19     int defaultcolors[] = {
20     7, 7, 7, 7, 2, 3, 1, 4, 6, 7,
21     7, 7, 7, 7,10, 5, 2, 7, 7, 7,
22     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
23     7, 7, 7, 4, 8, 7, 7, 7, 7, 7,
24     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
25     7, 7, 9, 7, 7, 7, 7, 7, 7, 7,
26     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
27     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
28     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
29     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
30     7, 7, 7 };
31    
32    
33     char *mopname[] = {
34     "C","C","C","C","H","O","O","N","N","N",
35     "F","Cl","Br","I","S","S","S","S","Si",":",
36     "H","C","H","H","P","B","B","H","C","C",
37     "Ge","Sn","Pb","Se","Te","H2","N","S","Se","C",
38     "N","O","B","Al","H","O","P","C","C","C",
39     "C","C","O","I","N","C","C","Al","Z1","Z2",
40     "C", "C", "C", "O", "N", "O", "P", "X", "X","H",
41     "C","N","F","Cl","Br","I","X","X","X","M"};
42    
43     char *atomname[] = {
44     "C","H", "N", "O", "F","Cl","Br","I", "S","Si",
45     "P","B","Ge","Sn","Pb","Se","Te","H2","Al","Mg",
46     "Li","NA","X","XX","99"};
47    
48     char *atomno[] = {"6","1","7","8","9","17","35",
49     "53","16","14","15","5","32","50","82","34","52","3","12","13",
50     "11","19","99","99","99"};
51    
52     int atomtype[] = {
53     1, 5, 8, 6,11,12,13,14,15,19,
54     25,26,31,32,33,34,35,36,44,80,
55     80,80,99,99,99};
56    
57     float atmrad[104]={
58     1.90,1.94,1.94,1.94,1.50,1.74,1.74,1.82,1.82,1.82,
59     1.65,2.03,2.18,2.32,2.11,2.11,2.11,2.11,2.25,1.20,
60     1.20,1.90,1.35,0.90,2.05,1.98,1.98,0.90,1.94,1.94,
61     2.40,2.55,2.70,2.25,2.40,1.50,1.82,2.11,2.25,1.94,
62     1.82,2.20,1.98,1.90,1.50,1.74,2.05,1.94,1.94,1.94,
63     1.94,1.94,1.74,2.32,1.82,1.75,1.75,0.00,0.00,2.30,
64     0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,
65     0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,
66     0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,
67     0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,
68     0.01,0.01,0.01,0.01
69     };
70    
71     typedef struct Gastype {
72     int type;
73     float a,b,c,d;
74     } Gastype;
75    
76     Gastype Gastchrg[] = {
77     1 , 7.98, 9.18, 1.80, 0.0,
78     2 , 8.79, 9.32, 1.51, 0.0,
79     3 , 8.79, 9.32, 1.51, 0.0,
80     4 ,10.39, 9.45, 0.73, 0.0,
81     5 , 7.17, 6.24, -.56, 0.0,
82     6 ,14.18,12.92, 1.39, 0.0,
83     7 ,17.07,13.79, 0.47, 0.0,
84     8 ,11.54,10.82, 1.36, 0.0,
85     9 ,12.87,11.15, 0.85, 0.0,
86     10 ,15.68,11.70, -.27, 0.0,
87     11 ,14.66,13.85, 2.31, 0.0,
88     12 ,11.00, 9.69, 1.35, 0.0,
89     13 ,10.08, 8.47, 1.16, 0.0,
90     14 , 9.90, 7.96, 0.96, 0.0,
91     15 ,10.14, 9.13, 1.38, 0.0,
92     16 ,10.14, 9.13, 1.38, 0.0,
93     17 ,10.14, 9.13, 1.38, 0.0,
94     18 ,10.14, 9.13, 1.38, 0.0,
95     19 , 0.00, 0.00, 0.00, 0.0,
96     20 , 0.00, 0.00, 0.00, 0.0,
97     21 , 7.17, 6.24, -.56, 0.0,
98     22 , 7.98, 9.18, 1.80, 0.0,
99     23 , 7.17, 6.24, -.56, 0.0,
100     24 , 7.17, 6.24, -.56, 0.0,
101     25 , 0.00, 0.00, 0.00, 0.0,
102     26 , 0.00, 0.00, 0.00, 0.0,
103     27 , 0.00, 0.00, 0.00, 0.0,
104     28 , 7.17, 6.24, -.56, 0.0,
105     29 , 7.98, 9.18, 1.80, 0.0,
106     30 , 7.98, 9.18, 1.80, 0.0,
107     31 , 0.00, 0.00, 0.00, 0.0,
108     32 , 0.00, 0.00, 0.00, 0.0,
109     33 , 0.00, 0.00, 0.00, 0.0,
110     34 , 0.00, 0.00, 0.00, 0.0,
111     35 , 0.00, 0.00, 0.00, 0.0,
112     36 , 7.17, 6.24, -.56, 0.0,
113     37 ,12.87,11.15, 0.85, 0.0,
114     38 ,10.14, 9.13, 1.38, 0.0,
115     39 , 0.00, 0.00, 0.00, 0.0,
116     40 , 8.79, 9.32, 1.51, 0.0,
117     41 ,11.54,10.82, 1.36, 0.0,
118     42 ,14.18,12.92, 1.39, 0.0,
119     43 , 0.00, 0.00, 0.00, 0.0,
120     44 , 0.00, 0.00, 0.00, 0.0,
121     45 , 0.00, 0.00, 0.00, 0.0,
122     46 , 0.00, 0.00, 0.00, 0.0,
123     47 , 0.00, 0.00, 0.00, 0.0,
124     48 ,14.18,12.92, 1.39, 0.0,
125     49 , 0.00, 0.00, 0.00, 0.0,
126     50 , 0.00, 0.00, 0.00, 0.0,
127     51 , 0.00, 0.00, 0.00, 0.0,
128     52 , 0.00, 0.00, 0.00, 0.0,
129     53 , 0.00, 0.00, 0.00, 0.0,
130     54 , 0.00, 0.00, 0.00, 0.0,
131     55 , 0.00, 0.00, 0.00, 0.0,
132     56 , 7.98, 9.18, 1.80, 0.0,
133     57 , 8.79, 9.32, 1.51, 0.0,
134     58 , 0.00, 0.00, 0.00, 0.0,
135     59 , 0.00, 0.00, 0.00, 0.0,
136     60 , 0.00, 0.00, 0.00, 0.0,
137     61 , 0.00, 0.00, 0.00, 0.0,
138     62 , 0.00, 0.00, 0.00, 0.0,
139     63 , 0.00, 0.00, 0.00, 0.0,
140     64 , 0.00, 0.00, 0.00, 0.0,
141     65 , 0.00, 0.00, 0.00, 0.0,
142     66 ,14.18,12.92, 1.39, 0.0,
143     67 , 0.00, 0.00, 0.00, 0.0,
144     68 , 0.00, 0.00, 0.00, 0.0,
145     69 , 0.00, 0.00, 0.00, 0.0,
146     70 , 0.00, 0.00, 0.00, 0.0,
147     71 , 0.00, 0.00, 0.00, 0.0,
148     72 , 0.00, 0.00, 0.00, 0.0,
149     73 , 0.00, 0.00, 0.00, 0.0,
150     74 , 0.00, 0.00, 0.00, 0.0,
151     75 , 0.00, 0.00, 0.00, 0.0,
152     76 , 0.00, 0.00, 0.00, 0.0,
153     77 , 0.00, 0.00, 0.00, 0.0,
154     78 , 0.00, 0.00, 0.00, 0.0,
155     79 , 0.00, 0.00, 0.00, 0.0,
156     80 , 0.00, 0.00, 0.00, 0.0,
157     81 , 0.00, 0.00, 0.00, 0.0,
158     82 , 0.00, 0.00, 0.00, 0.0,
159     83 , 0.00, 0.00, 0.00, 0.0,
160     84 , 0.00, 0.00, 0.00, 0.0,
161     85 , 0.00, 0.00, 0.00, 0.0,
162     86 , 0.00, 0.00, 0.00, 0.0,
163     87 , 0.00, 0.00, 0.00, 0.0,
164     88 , 0.00, 0.00, 0.00, 0.0,
165     89 , 0.00, 0.00, 0.00, 0.0,
166     90 , 0.00, 0.00, 0.00, 0.0,
167     91 , 0.00, 0.00, 0.00, 0.0,
168     92 , 0.00, 0.00, 0.00, 0.0,
169     93 , 0.00, 0.00, 0.00, 0.0,
170     94 , 0.00, 0.00, 0.00, 0.0,
171     95 , 0.00, 0.00, 0.00, 0.0,
172     96 , 0.00, 0.00, 0.00, 0.0,
173     97 , 0.00, 0.00, 0.00, 0.0,
174     98 , 0.00, 0.00, 0.00, 0.0,
175     99 , 0.00, 0.00, 0.00, 0.0,
176     100 , 0.00, 0.00, 0.00, 0.0,
177     101 , 0.00, 0.00, 0.00, 0.0,
178     102 , 0.00, 0.00, 0.00, 0.0,
179     103 , 0.00, 0.00, 0.00, 0.0 };
180    
181     #define NDEF 0.001F
182    
183     struct BioType {
184     char name_3[4], name_1[2];
185     int type, natom;
186     } BioGroups[] = {
187     "Ala","A", ALA, 17,
188     "Arg","R", ARG, 31,
189     "Asn","N", ASN, 23,
190     "Asp","D", ASP, 23,
191     "Asx","B", ASX, 23,
192     "Cys","C", CYSH, 20,
193     "SCys","x", CYS, 40,
194     "Gln","Q", GLN, 26,
195     "Glu","E", GLU, 26,
196     "Glx","Z", GLX, 26,
197     "Gly","G", GLY, 14,
198     "His","H", HIS, 25,
199     "Ile","I", ILE, 26,
200     "Leu","L", LEU, 26,
201     "Lys","K", LYS, 29,
202     "Met","M", MET, 26,
203     "Phe","F", PHE, 27,
204     "Pro","P", PRO, 21,
205     "Ser","S", SER, 20,
206     "Thr","T", THR, 23,
207     "Trp","W", TRP, 31,
208     "Tyr","Y", TYR, 29,
209     "Val","V", VAL, 23,
210     "Amp","A", AMP, 54,
211     "Cmp","C", CMP, 52,
212     "Gmp","G", GMP, 56,
213     "Tmp","T", TMP, 52,
214     "Ump","U", UMP, 52,
215     "Unk","X", UNK, 0,
216     "Ace","X", ACE, 3,
217     "For","X", FOR, 3,
218     "HOH","X", HOH, 3,
219     "DOD","X", DOD, 3,
220     "SO4","X", SO4, 5,
221     "PO4","X", PO4, 5 };
222    
223     struct ElementType {
224     char symbol[3];
225     int atomnum;
226     float weight, covradius, vdwradius;
227     int s,p,d,f, type;
228     } Elements[] = {
229     "H" , 1, 1.0079F, 0.3F, 1.50F, 1,0,0,0, 5,
230     "He", 2, 4.0026F, NDEF, 1.53F, 2,0,0,0, 0,
231     "Li", 3, 6.941F, 1.51F, 2.00F, 1,0,0,0, 301,
232     "Be", 4, 9.0121F, 1.11F, 2.00F, 2,0,0,0, 302,
233     "B" , 5, 10.810F, 0.88F, 1.98F, 2,1,0,0, 26,
234     "C" , 6, 12.011F, 0.77F, 1.94F, 2,2,0,0, 1,
235     "N" , 7, 14.0006F, 0.70F, 1.82F, 2,3,0,0, 8,
236     "O" , 8, 15.9994F, 0.66F, 1.74F, 2,4,0,0, 6,
237     "F" , 9, 18.998F, 0.64F, 1.71F, 2,5,0,0, 11,
238     "Ne", 10, 20.179F, NDEF, 1.60F, 2,6,0,0, 0,
239     "Na", 11, 22.989F, 1.85F, 1.86F, 1,0,0,0, 303,
240     "Mg", 12, 24.305F, 1.60F, 2.20F, 2,0,0,0, 304,
241     "Al", 13, 26.981F, 1.43F, 1.60F, 2,1,0,0, 44,
242     "Si", 14, 28.085F, 1.17F, 2.25F, 2,2,0,0, 19,
243     "P" , 15, 30.974F, 1.10F, 2.20F, 2,3,0,0, 25,
244     "S" , 16, 32.060F, 1.04F, 2.15F, 2,4,0,0, 15,
245     "Cl", 17, 35.453F, 0.99F, 2.07F, 2,5,0,0, 12,
246     "Ar", 18, 39.948F, NDEF, 1.99F, 2,6,0,0, 0,
247     "K" , 19, 39.098F, 2.30F, 2.31F, 1,0,0,0, 305,
248     "Ca", 20, 40.080F, 2.00F, 2.81F, 2,0,0,0, 306,
249     "Sc", 21, 44.956F, 1.60F, 2.20F, 2,6,1,0, 307,
250     "Ti", 22, 47.900F, 1.46F, 2.20F, 2,6,2,0, 308,
251     "V" , 23, 50.941F, 1.355F, 2.20F, 2,6,3,0, 309,
252     "Cr", 24, 51.996F, 1.28F, 2.20F, 1,6,5,0, 310,
253     "Mn", 25, 54.938F, 1.253F, 2.20F, 2,6,5,0, 311,
254     "Fe", 26, 55.84F, 1.222F, 2.20F, 2,6,6,0, 312,
255     "Co", 27, 58.93F, 1.26F, 2.20F, 2,6,7,0, 313,
256     "Ni", 28, 58.7F , 1.28F, 2.20F, 2,6,7,0, 314,
257     "Cu", 29, 63.54F, 1.13F, 2.20F, 2,6,7,0, 315,
258     "Zn", 30, 65.38F , 1.309F, 2.20F, 2,6,7,0, 316,
259     "Ga", 31, 69.72F , 1.26F, 2.20F, 2,6,7,0, 317,
260     "Ge", 32, 72.5F , 1.22F, 2.44F, 2,6,7,0, 318,
261     "As", 33, 74.92F , 1.21F, 2.40F, 2,6,7,0, 319,
262     "Se", 34, 78.9F , 1.17F, 2.29F, 2,6,7,0, 34,
263     "Br", 35, 79.90F , 1.14F, 2.22F, 2,6,7,0, 13,
264     "Kr", 36, 83.8F , NDEF, 2.15F, 2,6,7,0, 0,
265     "Rb", 37, 85.46F , 2.44F, 2.44F, 2,6,7,0, 320,
266     "Sr", 38, 87.62F , 2.15F, 3.00F, 2,6,7,0, 321,
267     "Y" , 39, 88.9F , 1.85F, 1.85F, 2,6,7,0, 322,
268     "Zr", 40, 91.22F , 1.50F, 1.60F, 2,6,7,0, 323,
269     "Nb", 41, 92.90F , 1.455F, 2.20F, 2,6,7,0, 324,
270     "Mo", 42, 95.9F , 1.41F, 2.20F, 2,6,7,0, 325,
271     "Tc", 43, 98.90F , 1.22F, 2.20F, 2,6,7,0, 326,
272     "Ru", 44, 101.0F , 1.32F, 2.20F, 2,6,7,0, 327,
273     "Rh", 45, 102.9F , 1.355F, 2.20F, 2,6,7,0, 328,
274     "Pd", 46, 106.4F , 1.400F, 2.20F, 2,6,7,0, 329,
275     "Ag", 47, 107.87F , 1.330F, 2.20F, 2,6,7,0, 330,
276     "Cd", 48, 112.4F , 1.51F, 2.20F, 2,6,7,0, 331,
277     "In", 49, 114.82F , 1.45F, 2.20F, 2,6,7,0, 332,
278     "Sn", 50, 118.6F , 1.40F, 2.59F, 2,6,7,0, 32,
279     "Sb", 51, 121.7F , 1.41F, 2.20F, 2,6,7,0, 334,
280     "Te", 52, 127.6F , 1.37F, 2.44F, 2,6,7,0, 35,
281     "I" , 53, 126.90F , 1.33F, 2.15F, 2,6,7,0, 14,
282     "Xe", 54, 131.30F , NDEF, 2.28F, 2,6,7,0, 0,
283     "Cs", 55, 132.90F , 2.62F, 2.62F, 2,6,7,0, 336,
284     "Ba", 56, 137.3F , 2.15F, 3.07F, 2,6,7,0, 337,
285     "La", 57, 138.90F , 1.85F, 2.78F, 2,6,7,0, 338,
286     "Ce", 58, 140.12F , 1.85F, 2.78F, 2,6,7,0, 339,
287     "Pr", 59, 140.91F , 1.85F, 2.78F, 2,6,7,0, 340,
288     "Nd", 60, 144.24F , 1.85F, 2.78F, 2,6,7,0, 341,
289     "Pm", 61, 147.00F , 1.85F, 2.78F, 2,6,7,0, 342,
290     "Sm", 62, 150.35F , 1.85F, 2.78F, 2,6,7,0, 343,
291     "Eu", 63, 151.36F , 1.85F, 2.78F, 2,6,7,0, 344,
292     "Gd", 64, 157.25F , 1.85F, 2.78F, 2,6,7,0, 345,
293     "Tb", 65, 158.92F , 1.85F, 2.78F, 2,6,7,0, 346,
294     "Dy", 66, 162.50F , 1.85F, 2.78F, 2,6,7,0, 347,
295     "Ho", 67, 164.93F , 1.85F, 2.78F, 2,6,7,0, 348,
296     "Er", 68, 167.26F , 1.85F, 2.78F, 2,6,7,0, 349,
297     "Tm", 69, 168.93F , 1.85F, 2.78F, 2,6,7,0, 350,
298     "Yb", 70, 173.04F , 1.85F, 2.78F, 2,6,7,0, 351,
299     "Lu", 71, 174.97F , 1.85F, 2.78F, 2,6,7,0, 352,
300     "Hf", 72, 178.4F , 1.60F, 3.00F , 2,6,7,0, 353,
301     "Ta", 73, 180.95F , 1.455F, 3.00F, 2,6,7,0, 354,
302     "W" , 74, 183.8F , 1.40F, 3.00F, 2,6,7,0, 355,
303     "Re", 75, 186.2F , 1.355F, 3.00F, 2,6,7,0, 356,
304     "Os", 76, 190.2F , 1.355F, 3.00F, 2,6,7,0, 357,
305     "Ir", 77, 192.2F , 1.220F, 3.00F, 2,6,7,0, 358,
306     "Pt", 78, 195.0F , 1.40F, 3.00F, 2,6,7,0, 359,
307     "Au", 79, 196.97F , 1.250F, 3.00F, 2,6,7,0, 360,
308     "Hg", 80, 200.5F , 1.51F, 3.00F, 2,6,7,0, 361,
309     "Tl", 81, 204.3F , 1.70F, 3.00F, 2,6,7,0, 362,
310     "Pb", 82, 207.2F , 1.50F, 2.74F, 2,6,7,0, 33,
311     "Bi", 83, 208.98F , 1.51F, 3.00F, 2,6,7,0, 363,
312     "Po", 84, 210.00F , 1.47F, 3.00F, 2,6,7,0, 364,
313     "At", 85, 210.00F , 1.44F, 3.00F, 2,6,7,0, 365,
314     "Rn", 86, 222.0F , NDEF, 3.00F, 2,6,7,0, 366,
315     "Fr", 87, 223.0F , NDEF, 3.00F, 2,6,7,0, 367,
316     "Ra", 88, 226.0F , NDEF, 3.00F, 2,6,7,0, 368,
317     "Ac", 89, 227.0F , NDEF, 3.00F, 2,6,7,0, 369,
318     "Th", 90, 232.04F , NDEF, 3.00F, 2,6,7,0, 370,
319     "Pa", 91, 231.0F , NDEF, 3.00F, 2,6,7,0, 371,
320     "U", 92, 238.03F , NDEF, 3.00F, 2,6,7,0, 372,
321     "Np", 93, 237.0F , NDEF, 3.00F, 2,6,7,0, 373,
322     "Pu", 94, 242.0F , NDEF, 3.00F, 2,6,7,0, 374,
323     "Am", 95, 243.0F , NDEF, 3.00F, 2,6,7,0, 375,
324     "Cm", 96, 247.0F , NDEF, 3.00F, 2,6,7,0, 376,
325     "Bk", 97, 249.0F , NDEF, 3.00F, 2,6,7,0, 377,
326     "Cf", 98, 251.0F , NDEF, 3.00F, 2,6,7,0, 378,
327     "Es", 99, 254.0F , NDEF, 3.00F, 2,6,7,0, 379,
328     "Fm", 100, 253.0F , NDEF, 3.00F, 2,6,7,0, 380,
329     "Md", 101, 256.0F , NDEF, 3.00F, 2,6,7,0, 381,
330     "No", 102, 253.0F , NDEF, 3.00F, 2,6,7,0, 382,
331     "Lw", 103, 257.0F , NDEF, 3.00F, 2,6,7,0, 383
332     } ;
333     // current number is 200
334     int mm3_mmx[] = {
335     1, 2, 3, 4, 5, 6, 7, 8, 9,10,
336     11,12,13,14,15,16,17,18,19,20,
337     21,22,23,24,25,26,27,28,29,30,
338     31,32,33,34,35,36,37, 2,41, 9,
339     6,15,37,21,10,41,66,24, 6,40,
340     99,99,99,99,99,56,57, 7,99,47,
341     99,99,99,99,99,99, 3, 4,42,46,
342     4,37,28,38, 6, 7, 7, 7, 7, 7,
343     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
344     7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
345     7, 7, 7,15,15, 4,37,37,37,41,
346     41,99,40,40, 7, 7, 7, 7, 7, 7,
347     7,99,99, 5,306,321,337,338,339,340,
348     341,340,343,344,345,346,347,348,349,350,
349     351,352,37,37, 6, 8,99, 6, 6, 8,
350     9,99,25,154,155,156,157,158,159,160,
351     0,0,0,0,0,0,0,0,0,0 };
352     // current number is 100
353     int mmff_mmx[] = {
354     1, 2, 3, 4, 5, 6, 7, 8,37, 9,
355     11,12,13,14,15,16,17,18,19,56,
356     21,22,23,24,47,25,23,23,28,57,
357     21,66,28,41,64,24, 2,37,37, 8,
358     3,10, 9,15,41,37, 7,66,46,21,
359     46,21,46,41,37,41, 2,41, 6, 4,
360     68, 9, 2, 2,37,37,41,41,41, 6,
361     21,15,15,15,25, 8,12, 1, 8, 2,
362     41,41,300,300,300,300,300,300,300,300,300,
363     300,300,300,300,300,300,300,300,300,300 };
364    
365     // current number is 43
366     int amber_mmx[] = {
367     1, 3, 2, 2, 2, 2, 2, 2, 2, 2,
368     2, 2, 2, 9, 8,37,37,37,37, 8,
369     6, 6, 6, 7,66,15,15,25,23,21,
370     21,21, 5, 5, 5, 5, 5, 5, 5, 5,
371     6,21,20} ;
372    
373     // current number is 43
374     int opls_mmx[] = {
375     1, 1, 1, 1, 3, 2, 2, 2, 2, 2,
376     2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
377     1, 2, 2, 4, 4, 4, 4,22, 5, 5,
378     5, 5, 5, 5, 5,21,21,23,23,24,
379     21, 5, 5, 6, 6, 6, 6, 6, 7,66,
380     6,42, 8, 9, 9,41,37, 9,37,37,
381     37,11,12,13,14,25,47,15,15,301,
382     303,305,300,300,304,306,300,300,11,12,
383     13,14};
384     // mapmmx types to other atom types
385     struct {
386     int mm3, mmff, amber, opls;
387     } AtomTypes[] = {
388     1, 1, 1, 1, // Csp3
389     2, 2, 2, 2, // Csp3
390     3, 3, 3, 3, // Csp3
391     4, 4, 4, 4, // Csp3
392     5, 5, 5, 5, // H
393     6, 6, 6, 6, // Osp3
394     7, 7, 7, 7, // Osp3
395     8, 8, 8, 8, // Nsp3
396     9, 9, 9, 9, // Nsp3
397     10,10,10,10, // Nsp3
398     11,11,11,11, // F
399     12,12,12,12, // Cl
400     13,13,13,13, // Br
401     14,14,14,14, // I
402     15,15,15,15, // S
403     16,16,16,16, // S+
404     17,17,17,17, // S+
405     18,18,18,18, // S+
406     19,19,19,19, // Si
407     0, 0, 0, 0, // Lone Pair
408     21,21,21,21, // HO
409     22,22, 0,21, // cyclopropane
410     23,23, 0,21, // H Amine
411     24,24, 0,21, // H COOH
412     25,26,25,25, // P3
413     26, 0,26,26, // Bsp2
414     27, 0,27,27, // Bsp3
415     28,28,27,27, // H Amide
416     29, 0,29,29, // C.
417     30, 0,30,30, // C+
418     31, 0,31,31, // Ge
419     32, 0,32,32, // Sn
420     33, 0,33,33, // Pb
421     34, 0,39,39, // Se
422     35, 0,35,35, // Te
423     36, 0,36,36, // D
424     37,38, 0, 0, // N imine
425     74,16, 0, 0, // S=
426     0, 0, 0, 0, // Se=
427     50,37,40,40, // C aromatic type 40
428     39,34,41,41, // N+
429     47,32,42,42, // O-
430     0, 0, 0, 0, // TS B
431     0, 0,44,44, // Al
432     0, 0, 0, 0, // TS H
433     70,49,46,46, // O+
434     60,25,47,47, // P5
435     0, 0,48,48, // C-
436     0, 0, 0, 0, // C*
437     0, 0, 0, 0, // C# 50
438     0, 0, 0, 0, // C$
439     0, 0, 0, 0, // C%
440     0, 0, 0, 0, // O#
441     0, 0, 0, 0, // I%
442     0, 0, 0, 0, // N#
443     56,20, 0, 0, // cyclobutane
444     57,30, 0, 0, // cyclobutene
445     0, 0,58,58, // Al sp3
446     0, 0, 0, 0, // empty
447     200, 0, 0, 0, // Dummy // 60
448     0, 0, 0, 0, // 61
449     0, 0, 0, 0, // 62
450     0, 0, 0, 0, // 63
451     0, 0, 0, 0, // 64
452     0, 0, 0, 0, // 65
453     0, 0, 0, 0, // 66
454     0, 0, 0, 0, // 67
455     0, 0, 0, 0, // 68
456     0, 0, 0, 0, // 69
457     0, 0, 0, 0, // 70
458     0, 0, 0, 0, // 71
459     0, 0, 0, 0, // 72
460     0, 0, 0, 0, // 73
461     0, 0, 0, 0, // 74
462     0, 0, 0, 0, // 75
463     0, 0, 0, 0, // 76
464     0, 0, 0, 0, // 77
465     0, 0, 0, 0, // 78
466     0, 0, 0, 0, // 79
467     0, 0, 0, 0, // 80
468     0, 0, 0, 0, // 81
469     0, 0, 0, 0, // 82
470     0, 0, 0, 0, // 83
471     0, 0, 0, 0, // 84
472     0, 0, 0, 0, // 85
473     0, 0, 0, 0, // 86
474     0, 0, 0, 0, // 87
475     0, 0, 0, 0, // 88
476     0, 0, 0, 0, // 89
477     0, 0, 0, 0, // 90
478     0, 0, 0, 0, // 91
479     0, 0, 0, 0, // 92
480     0, 0, 0, 0, // 93
481     0, 0, 0, 0, // 94
482     0, 0, 0, 0, // 95
483     0, 0, 0, 0, // 96
484     0, 0, 0, 0, // 97
485     0, 0, 0, 0, // 98
486     0, 0, 0, 0, // 99
487     0, 0, 0, 0, // 100
488     0, 0, 0, 0, // 101
489     0, 0, 0, 0, // 102
490     0, 0, 0, 0, // 103
491     };
492    
493    
494     struct POV_Ray_Col {
495     char color[25];
496     float r, g, b;
497     } Colors[] = {
498     "Aquamarine" , 0.439216 , 0.858824 , 0.576471 , //0
499     "BakersChoc" , 0.360000 , 0.200000 , 0.090000 ,
500     "Black" , 0.000000 , 0.000000 , 0.000000 ,
501     "Blue" , 0.000000 , 0.000000 , 1.000000 ,
502     "BlueViolet" , 0.623520 , 0.372549 , 0.623529 ,
503     "Brass" , 0.710000 , 0.650000 , 0.260000 ,
504     "BrightGold" , 0.850000 , 0.850000 , 0.100000 ,
505     "Bronze" , 0.550000 , 0.470000 , 0.140000 ,
506     "Bronze2" , 0.650000 , 0.490000 , 0.240000 ,
507     "Brown" , 0.647059 , 0.164706 , 0.164706 ,
508     "CadetBlue" , 0.372549 , 0.623529 , 0.623529 , //10
509     "Clear" , 1.000000 , 1.000000 , 1.000000 ,
510     "CoolCopper" , 0.850000 , 0.530000 , 0.100000 ,
511     "Copper" , 0.720000 , 0.450000 , 0.200000 ,
512     "Coral" , 1.000000 , 0.498039 , 0.000000 ,
513     "CornflowerBlue", 0.258824 , 0.258824 , 0.435294 ,
514     "Cyan" , 0.000000 , 1.000000 , 1.000000 ,
515     "DarkBrown" , 0.360000 , 0.250000 , 0.200000 ,
516     "DarkGreen" , 0.184314 , 0.309804 , 0.184314 ,
517     "DarkOliveGreen", 0.309804 , 0.309804 , 0.184314 ,
518     "DarkOrchid" , 0.600000 , 0.196078 , 0.800000 , //20
519     "DarkPurple" , 0.530000 , 0.120000 , 0.470000 ,
520     "DarkSlateBlue" , 0.119608 , 0.137255 , 0.556863 ,
521     "DarkSlateGray" , 0.184314 , 0.309804 , 0.309804 ,
522     "DarkSlateGrey" , 0.184314 , 0.309804 , 0.309804 ,
523     "DarkTan" , 0.590000 , 0.410000 , 0.310000 ,
524     "DarkTurquoise" , 0.439216 , 0.576471 , 0.858824 ,
525     "DarkWood" , 0.520000 , 0.370000 , 0.260000 ,
526     "DimGray" , 0.329412 , 0.329412 , 0.329412 ,
527     "DimGrey" , 0.329412 , 0.329412 , 0.329412 ,
528     "DkGreenCopper" , 0.290000 , 0.460000 , 0.430000 , //30
529     "DustyRose" , 0.520000 , 0.390000 , 0.390000 ,
530     "Feldspar" , 0.820000 , 0.570000 , 0.460000 ,
531     "Firebrick" , 0.556863 , 0.137255 , 0.137255 ,
532     "Flesh" , 0.960000 , 0.800000 , 0.690000 ,
533     "ForestGreen" , 0.137255 , 0.556863 , 0.137255 ,
534     "Gold" , 0.800000 , 0.498039 , 0.196078 ,
535     "Goldenrod" , 0.858824 , 0.858824 , 0.439216 ,
536     "Gray" , 0.752941 , 0.752941 , 0.752941 ,
537     "Gray05 " , 0.050000 , 0.050000 , 0.050000 ,
538     "Gray10 " , 0.100000 , 0.100000 , 0.100000 , //40
539     "Gray15 " , 0.150000 , 0.150000 , 0.150000 ,
540     "Gray20 " , 0.200000 , 0.200000 , 0.200000 ,
541     "Gray25 " , 0.250000 , 0.250000 , 0.250000 ,
542     "Gray30 " , 0.300000 , 0.300000 , 0.300000 ,
543     "Gray35 " , 0.350000 , 0.350000 , 0.350000 ,
544     "Gray40 " , 0.400000 , 0.400000 , 0.400000 ,
545     "Gray45 " , 0.450000 , 0.450000 , 0.450000 ,
546     "Gray50 " , 0.500000 , 0.500000 , 0.500000 ,
547     "Gray55 " , 0.550000 , 0.550000 , 0.550000 ,
548     "Gray60 " , 0.600000 , 0.600000 , 0.600000 , //50
549     "Gray65 " , 0.650000 , 0.650000 , 0.650000 ,
550     "Gray70 " , 0.700000 , 0.700000 , 0.700000 ,
551     "Gray75 " , 0.750000 , 0.750000 , 0.750000 ,
552     "Gray80 " , 0.800000 , 0.800000 , 0.800000 ,
553     "Gray85 " , 0.850000 , 0.850000 , 0.850000 ,
554     "Gray90 " , 0.900000 , 0.900000 , 0.900000 ,
555     "Gray95 " , 0.950000 , 0.950000 , 0.950000 ,
556     "Green" , 0.000000 , 1.000000 , 0.000000 ,
557     "GreenCopper" , 0.320000 , 0.490000 , 0.460000 ,
558     "GreenYellow" , 0.576471 , 0.858824 , 0.439216 , //60
559     "Grey" , 0.752941 , 0.752941 , 0.752941 ,
560     "HuntersGreen" , 0.130000 , 0.370000 , 0.310000 ,
561     "IndianRed" , 0.309804 , 0.184314 , 0.184314 ,
562     "Khaki" , 0.623529 , 0.623529 , 0.372549 ,
563     "Light_Purple" , 0.870000 , 0.580000 , 0.980000 ,
564     "LightBlue" , 0.749020 , 0.847059 , 0.847059 ,
565     "LightGray" , 0.658824 , 0.658824 , 0.658824 ,
566     "LightGrey" , 0.658824 , 0.658824 , 0.658824 ,
567     "LightSteelBlue", 0.560784 , 0.560784 , 0.737255 ,
568     "LightWood" , 0.910000 , 0.760000 , 0.650000 , //70
569     "LimeGreen" , 0.196078 , 0.800000 , 0.196078 ,
570     "Magenta" , 1.000000 , 0.000000 , 1.000000 ,
571     "MandarinOrange", 0.890000 , 0.470000 , 0.200000 ,
572     "Maroon" , 0.556863 , 0.137255 , 0.419608 ,
573     "Med_Purple" , 0.730000 , 0.160000 , 0.960000 ,
574     "MediumAquamarine", 0.196078 , 0.800000 , 0.600000 ,
575     "MediumBlue" , 0.196078 , 0.196078 , 0.800000 ,
576     "MediumForestGreen", 0.419608 , 0.556863 , 0.137255 ,
577     "MediumGoldenrod", 0.917647 , 0.917647 , 0.678431 ,
578     "MediumOrchid" , 0.576471 , 0.439216 , 0.858824 , //80
579     "MediumSeaGreen", 0.258824 , 0.435294 , 0.258824 ,
580     "MediumSlateBlue", 0.498039 , 0.000000 , 1.000000 ,
581     "MediumSpringGreen", 0.498039 , 1.000000 , 0.000000 ,
582     "MediumTurquoise", 0.439216 , 0.858824 , 0.858824 ,
583     "MediumVioletRed", 0.858824 , 0.439216 , 0.576471 ,
584     "MediumWood" , 0.650000 , 0.500000 , 0.390000 ,
585     "MidnightBlue" , 0.184314 , 0.184314 , 0.309804 ,
586     "Navy" , 0.137255 , 0.137255 , 0.556863 ,
587     "NavyBlue" , 0.137255 , 0.137255 , 0.556863 ,
588     "NeonBlue" , 0.300000 , 0.300000 , 1.000000 , //90
589     "NeonPink" , 1.000000 , 0.430000 , 0.780000 ,
590     "NewMidnightBlue", 0.000000 , 0.000000 , 0.610000 ,
591     "NewTan" , 0.920000 , 0.780000 , 0.620000 ,
592     "OldGold" , 0.810000 , 0.710000 , 0.230000 ,
593     "Orange " , 1.000000 , 0.500000 , 0.000000 ,
594     "OrangeRed" , 1.000000 , 0.250000 , 0.000000 ,
595     "Orchid" , 0.858824 , 0.439216 , 0.858824 ,
596     "PaleGreen" , 0.560784 , 0.737255 , 0.560784 ,
597     "Pink" , 0.737255 , 0.560784 , 0.560784 ,
598     "Plum" , 0.917647 , 0.678431 , 0.917647 , //100
599     "Quartz" , 0.850000 , 0.850000 , 0.950000 ,
600     "Red" , 1.000000 , 0.000000 , 0.000000 ,
601     "RichBlue" , 0.350000 , 0.350000 , 0.670000 ,
602     "Salmon" , 0.435294 , 0.258824 , 0.258824 ,
603     "Scarlet" , 0.550000 , 0.090000 , 0.090000 ,
604     "SeaGreen" , 0.137255 , 0.556863 , 0.419608 ,
605     "SemiSweetChoc" , 0.420000 , 0.260000 , 0.150000 ,
606     "Sienna" , 0.556863 , 0.419608 , 0.137255 ,
607     "Silver" , 0.900000 , 0.910000 , 0.980000 ,
608     "SkyBlue" , 0.196078 , 0.600000 , 0.800000 , //110
609     "SlateBlue" , 0.000000 , 0.498039 , 1.000000 ,
610     "SpicyPink" , 1.000000 , 0.110000 , 0.680000 ,
611     "SpringGreen" , 0.000000 , 1.000000 , 0.498039 ,
612     "SteelBlue" , 0.137255 , 0.419608 , 0.556863 ,
613     "SummerSky" , 0.220000 , 0.690000 , 0.870000 ,
614     "Tan" , 0.858824 , 0.576471 , 0.439216 ,
615     "Thistle" , 0.847059 , 0.749020 , 0.847059 ,
616     "Turquoise" , 0.678431 , 0.917647 , 0.917647 ,
617     "Very_Light_Purple", 0.940000 , 0.810000 , 0.990000 ,
618     "VeryDarkBrown" , 0.350000 , 0.160000 , 0.140000 , //120
619     "Violet" , 0.309804 , 0.184314 , 0.309804 ,
620     "VioletRed" , 0.800000 , 0.196078 , 0.600000 ,
621     "VLightGray" , 0.800000 , 0.800000 , 0.800000 ,
622     "VLightGrey" , 0.800000 , 0.800000 , 0.800000 ,
623     "Wheat" , 0.847059 , 0.847059 , 0.749020 ,
624     "White" , 1.000000 , 1.000000 , 1.000000 ,
625     "Yellow" , 1.000000 , 1.000000 , 0.000000 ,
626     "YellowGreen" , 0.600000 , 0.800000 , 0.196078
627     } ;
628    
629     struct POV_Ray_Fin {
630     char finish[18];
631     } Finish[] = {
632     "Dull",
633     "F_MetalA",
634     "F_MetalB",
635     "F_MetalC",
636     "F_MetalD",
637     "F_MetalE",
638     "Metal",
639     "Metallic_Finish",
640     "Phong_Dull",
641     "Phong_Glossy",
642     "Phong_Shiny",
643     "Plastic",
644     "Shiny",
645     "SilverFinish"
646     } ;
647