line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
$HackaMol::PeriodicTable::VERSION = '0.052'; |
2
|
|
|
|
|
|
|
#ABSTRACT: package for period table data... needs to change |
3
|
|
|
|
|
|
|
use 5.008; |
4
|
19
|
|
|
19
|
|
431
|
require Exporter; |
|
19
|
|
|
|
|
63
|
|
5
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
6
|
|
|
|
|
|
|
our @EXPORT_OK = qw(%KNOWN_NAMES %ATOM_MULTIPLICITY @EXHEAT @ELEMENTS |
7
|
|
|
|
|
|
|
%ELEMENTS %ATOMIC_MASSES @COVALENT_RADII @VDW_RADII _element_name _trim _qstring_num); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# lifted from Ivan's PerlMol |
10
|
|
|
|
|
|
|
our @ELEMENTS = qw( |
11
|
|
|
|
|
|
|
X |
12
|
|
|
|
|
|
|
H He |
13
|
|
|
|
|
|
|
Li Be B C N O F Ne |
14
|
|
|
|
|
|
|
Na Mg Al Si P S Cl Ar |
15
|
|
|
|
|
|
|
K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr |
16
|
|
|
|
|
|
|
Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe |
17
|
|
|
|
|
|
|
Cs Ba |
18
|
|
|
|
|
|
|
La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb |
19
|
|
|
|
|
|
|
Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn |
20
|
|
|
|
|
|
|
Fr Ra |
21
|
|
|
|
|
|
|
Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No |
22
|
|
|
|
|
|
|
Lr Rf Db Sg Bh Hs Mt Ds Uuu Uub Uut Uuq Uup Uuh Uus Uuo |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our %ELEMENTS; |
26
|
|
|
|
|
|
|
$ELEMENTS{ $ELEMENTS[$_] } = $_ foreach ( 0 .. $#ELEMENTS ); |
27
|
|
|
|
|
|
|
$ELEMENTS{D} = $ELEMENTS{T} = 1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# lifted from Ivan's PerlMol |
30
|
|
|
|
|
|
|
our %ATOMIC_MASSES = ( |
31
|
|
|
|
|
|
|
H => 1.00794, |
32
|
|
|
|
|
|
|
D => 2.014101, |
33
|
|
|
|
|
|
|
T => 3.016049, |
34
|
|
|
|
|
|
|
He => 4.002602, |
35
|
|
|
|
|
|
|
Li => 6.941, |
36
|
|
|
|
|
|
|
Be => 9.012182, |
37
|
|
|
|
|
|
|
B => 10.811, |
38
|
|
|
|
|
|
|
C => 12.0107, |
39
|
|
|
|
|
|
|
N => 14.00674, |
40
|
|
|
|
|
|
|
O => 15.9994, |
41
|
|
|
|
|
|
|
F => 18.9984032, |
42
|
|
|
|
|
|
|
Ne => 20.1797, |
43
|
|
|
|
|
|
|
Na => 22.989770, |
44
|
|
|
|
|
|
|
Mg => 24.3050, |
45
|
|
|
|
|
|
|
Al => 26.981538, |
46
|
|
|
|
|
|
|
Si => 28.0855, |
47
|
|
|
|
|
|
|
P => 30.973761, |
48
|
|
|
|
|
|
|
S => 32.066, |
49
|
|
|
|
|
|
|
Cl => 35.4527, |
50
|
|
|
|
|
|
|
Ar => 39.948, |
51
|
|
|
|
|
|
|
K => 39.0983, |
52
|
|
|
|
|
|
|
Ca => 40.078, |
53
|
|
|
|
|
|
|
Sc => 44.955910, |
54
|
|
|
|
|
|
|
Ti => 47.867, |
55
|
|
|
|
|
|
|
V => 50.9415, |
56
|
|
|
|
|
|
|
Cr => 51.9961, |
57
|
|
|
|
|
|
|
Mn => 54.938049, |
58
|
|
|
|
|
|
|
Fe => 55.845, |
59
|
|
|
|
|
|
|
Co => 58.933200, |
60
|
|
|
|
|
|
|
Ni => 58.6934, |
61
|
|
|
|
|
|
|
Cu => 63.546, |
62
|
|
|
|
|
|
|
Zn => 65.382, |
63
|
|
|
|
|
|
|
Ga => 69.723, |
64
|
|
|
|
|
|
|
Ge => 72.61, |
65
|
|
|
|
|
|
|
As => 74.92160, |
66
|
|
|
|
|
|
|
Se => 78.96, |
67
|
|
|
|
|
|
|
Br => 79.904, |
68
|
|
|
|
|
|
|
Kr => 83.80, |
69
|
|
|
|
|
|
|
Rb => 85.4678, |
70
|
|
|
|
|
|
|
Sr => 87.62, |
71
|
|
|
|
|
|
|
Y => 88.90585, |
72
|
|
|
|
|
|
|
Zr => 91.224, |
73
|
|
|
|
|
|
|
Nb => 92.90638, |
74
|
|
|
|
|
|
|
Mo => 95.94, |
75
|
|
|
|
|
|
|
Tc => 98, |
76
|
|
|
|
|
|
|
Ru => 101.07, |
77
|
|
|
|
|
|
|
Rh => 102.90550, |
78
|
|
|
|
|
|
|
Pd => 106.42, |
79
|
|
|
|
|
|
|
Ag => 107.8682, |
80
|
|
|
|
|
|
|
Cd => 112.411, |
81
|
|
|
|
|
|
|
In => 114.818, |
82
|
|
|
|
|
|
|
Sn => 118.710, |
83
|
|
|
|
|
|
|
Sb => 121.760, |
84
|
|
|
|
|
|
|
Te => 127.60, |
85
|
|
|
|
|
|
|
I => 126.90447, |
86
|
|
|
|
|
|
|
Xe => 131.29, |
87
|
|
|
|
|
|
|
Cs => 132.90545, |
88
|
|
|
|
|
|
|
Ba => 137.327, |
89
|
|
|
|
|
|
|
La => 138.9055, |
90
|
|
|
|
|
|
|
Ce => 140.116, |
91
|
|
|
|
|
|
|
Pr => 140.90765, |
92
|
|
|
|
|
|
|
Nd => 144.24, |
93
|
|
|
|
|
|
|
Pm => 145, |
94
|
|
|
|
|
|
|
Sm => 150.36, |
95
|
|
|
|
|
|
|
Eu => 151.964, |
96
|
|
|
|
|
|
|
Gd => 157.25, |
97
|
|
|
|
|
|
|
Tb => 158.92534, |
98
|
|
|
|
|
|
|
Dy => 162.50, |
99
|
|
|
|
|
|
|
Ho => 164.93032, |
100
|
|
|
|
|
|
|
Er => 167.26, |
101
|
|
|
|
|
|
|
Tm => 168.93421, |
102
|
|
|
|
|
|
|
Yb => 173.04, |
103
|
|
|
|
|
|
|
Lu => 174.967, |
104
|
|
|
|
|
|
|
Hf => 178.49, |
105
|
|
|
|
|
|
|
Ta => 180.9479, |
106
|
|
|
|
|
|
|
W => 183.84, |
107
|
|
|
|
|
|
|
Re => 186.207, |
108
|
|
|
|
|
|
|
Os => 190.23, |
109
|
|
|
|
|
|
|
Ir => 192.217, |
110
|
|
|
|
|
|
|
Pt => 195.078, |
111
|
|
|
|
|
|
|
Au => 196.96655, |
112
|
|
|
|
|
|
|
Hg => 200.592, |
113
|
|
|
|
|
|
|
Tl => 204.3833, |
114
|
|
|
|
|
|
|
Pb => 207.2, |
115
|
|
|
|
|
|
|
Bi => 208.98038, |
116
|
|
|
|
|
|
|
Po => 209, |
117
|
|
|
|
|
|
|
At => 210, |
118
|
|
|
|
|
|
|
Rn => 222, |
119
|
|
|
|
|
|
|
Fr => 223, |
120
|
|
|
|
|
|
|
Ra => 226, |
121
|
|
|
|
|
|
|
Ac => 227, |
122
|
|
|
|
|
|
|
Th => 232.038, |
123
|
|
|
|
|
|
|
Pa => 231.03588, |
124
|
|
|
|
|
|
|
U => 238.0289, |
125
|
|
|
|
|
|
|
Np => 237, |
126
|
|
|
|
|
|
|
Pu => 244, |
127
|
|
|
|
|
|
|
Am => 243, |
128
|
|
|
|
|
|
|
Cm => 247, |
129
|
|
|
|
|
|
|
Bk => 247, |
130
|
|
|
|
|
|
|
Cf => 251, |
131
|
|
|
|
|
|
|
Es => 252, |
132
|
|
|
|
|
|
|
Fm => 257, |
133
|
|
|
|
|
|
|
Md => 258, |
134
|
|
|
|
|
|
|
No => 259, |
135
|
|
|
|
|
|
|
Lr => 262, |
136
|
|
|
|
|
|
|
Rf => 261, |
137
|
|
|
|
|
|
|
Db => 262, |
138
|
|
|
|
|
|
|
Sg => 266, |
139
|
|
|
|
|
|
|
Bh => 264, |
140
|
|
|
|
|
|
|
Hs => 269, |
141
|
|
|
|
|
|
|
Mt => 268, |
142
|
|
|
|
|
|
|
Ds => 271, |
143
|
|
|
|
|
|
|
X => 0.0, |
144
|
|
|
|
|
|
|
); |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
our %ATOM_MULTIPLICITY = ( |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
# from jerry's thermo script |
149
|
|
|
|
|
|
|
# see webelements.com .. thinking about term symbols and stuff like that |
150
|
|
|
|
|
|
|
H => 2, |
151
|
|
|
|
|
|
|
C => 3, |
152
|
|
|
|
|
|
|
N => 4, |
153
|
|
|
|
|
|
|
O => 3, |
154
|
|
|
|
|
|
|
F => 2, |
155
|
|
|
|
|
|
|
P => 4, |
156
|
|
|
|
|
|
|
S => 3, |
157
|
|
|
|
|
|
|
Cl => 2, |
158
|
|
|
|
|
|
|
Br => 2, |
159
|
|
|
|
|
|
|
I => 2, |
160
|
|
|
|
|
|
|
Hg => 1, |
161
|
|
|
|
|
|
|
); |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
# directly from MNDO99, which grabbed them from mopac |
164
|
|
|
|
|
|
|
# I believe these are at 298, from the thermo gaussian thingy |
165
|
|
|
|
|
|
|
# enthalpy correction from 0K (as calculated by gaussian) to 298 |
166
|
|
|
|
|
|
|
# is on the order of 1 kcal/mol, which seems silly to mess with |
167
|
|
|
|
|
|
|
# unless one is actually interested in absolute heats of formation |
168
|
|
|
|
|
|
|
# SEQM HOF is something like this: |
169
|
|
|
|
|
|
|
# HoF(M) = tot_Eelec(M) - sum(x[X]*Hof_exp[X] -x[X]*atom_energy) |
170
|
|
|
|
|
|
|
our @EXHEAT; |
171
|
|
|
|
|
|
|
$EXHEAT[0] = 0.000; |
172
|
|
|
|
|
|
|
$EXHEAT[1] = 52.102; |
173
|
|
|
|
|
|
|
$EXHEAT[2] = 0.000; |
174
|
|
|
|
|
|
|
$EXHEAT[3] = 38.410; |
175
|
|
|
|
|
|
|
$EXHEAT[4] = 76.960; |
176
|
|
|
|
|
|
|
$EXHEAT[5] = 135.700; |
177
|
|
|
|
|
|
|
$EXHEAT[6] = 170.890; |
178
|
|
|
|
|
|
|
$EXHEAT[7] = 113.000; |
179
|
|
|
|
|
|
|
$EXHEAT[8] = 59.559; |
180
|
|
|
|
|
|
|
$EXHEAT[9] = 18.890; |
181
|
|
|
|
|
|
|
$EXHEAT[10] = 0.000; |
182
|
|
|
|
|
|
|
$EXHEAT[11] = 25.650; |
183
|
|
|
|
|
|
|
$EXHEAT[12] = 35.000; |
184
|
|
|
|
|
|
|
$EXHEAT[13] = 79.490; |
185
|
|
|
|
|
|
|
$EXHEAT[14] = 108.390; |
186
|
|
|
|
|
|
|
$EXHEAT[15] = 75.570; |
187
|
|
|
|
|
|
|
$EXHEAT[16] = 66.400; |
188
|
|
|
|
|
|
|
$EXHEAT[17] = 28.990; |
189
|
|
|
|
|
|
|
$EXHEAT[18] = 0.000; |
190
|
|
|
|
|
|
|
$EXHEAT[19] = 21.420; |
191
|
|
|
|
|
|
|
$EXHEAT[20] = 42.600; |
192
|
|
|
|
|
|
|
$EXHEAT[21] = 90.300; |
193
|
|
|
|
|
|
|
$EXHEAT[22] = 112.300; |
194
|
|
|
|
|
|
|
$EXHEAT[23] = 122.900; |
195
|
|
|
|
|
|
|
$EXHEAT[24] = 95.000; |
196
|
|
|
|
|
|
|
$EXHEAT[25] = 67.700; |
197
|
|
|
|
|
|
|
$EXHEAT[26] = 99.300; |
198
|
|
|
|
|
|
|
$EXHEAT[27] = 102.400; |
199
|
|
|
|
|
|
|
$EXHEAT[28] = 102.800; |
200
|
|
|
|
|
|
|
$EXHEAT[29] = 80.700; |
201
|
|
|
|
|
|
|
$EXHEAT[30] = 31.170; |
202
|
|
|
|
|
|
|
$EXHEAT[31] = 65.400; |
203
|
|
|
|
|
|
|
$EXHEAT[32] = 89.500; |
204
|
|
|
|
|
|
|
$EXHEAT[33] = 72.300; |
205
|
|
|
|
|
|
|
$EXHEAT[34] = 54.300; |
206
|
|
|
|
|
|
|
$EXHEAT[35] = 26.740; |
207
|
|
|
|
|
|
|
$EXHEAT[36] = 0.000; |
208
|
|
|
|
|
|
|
$EXHEAT[37] = 19.600; |
209
|
|
|
|
|
|
|
$EXHEAT[38] = 39.100; |
210
|
|
|
|
|
|
|
$EXHEAT[39] = 101.500; |
211
|
|
|
|
|
|
|
$EXHEAT[40] = 145.500; |
212
|
|
|
|
|
|
|
$EXHEAT[41] = 172.400; |
213
|
|
|
|
|
|
|
$EXHEAT[42] = 157.300; |
214
|
|
|
|
|
|
|
$EXHEAT[43] = 0.000; |
215
|
|
|
|
|
|
|
$EXHEAT[44] = 155.500; |
216
|
|
|
|
|
|
|
$EXHEAT[45] = 133.000; |
217
|
|
|
|
|
|
|
$EXHEAT[46] = 90.000; |
218
|
|
|
|
|
|
|
$EXHEAT[47] = 68.100; |
219
|
|
|
|
|
|
|
$EXHEAT[48] = 26.720; |
220
|
|
|
|
|
|
|
$EXHEAT[49] = 58.000; |
221
|
|
|
|
|
|
|
$EXHEAT[50] = 72.200; |
222
|
|
|
|
|
|
|
$EXHEAT[51] = 63.200; |
223
|
|
|
|
|
|
|
$EXHEAT[52] = 47.000; |
224
|
|
|
|
|
|
|
$EXHEAT[53] = 25.517; |
225
|
|
|
|
|
|
|
$EXHEAT[54] = 0.000; |
226
|
|
|
|
|
|
|
$EXHEAT[55] = 18.700; |
227
|
|
|
|
|
|
|
$EXHEAT[56] = 42.500; |
228
|
|
|
|
|
|
|
$EXHEAT[57] = 0.000; |
229
|
|
|
|
|
|
|
$EXHEAT[58] = 101.300; |
230
|
|
|
|
|
|
|
$EXHEAT[59] = 0.000; |
231
|
|
|
|
|
|
|
$EXHEAT[60] = 0.000; |
232
|
|
|
|
|
|
|
$EXHEAT[61] = 0.000; |
233
|
|
|
|
|
|
|
$EXHEAT[62] = 49.400; |
234
|
|
|
|
|
|
|
$EXHEAT[63] = 0.000; |
235
|
|
|
|
|
|
|
$EXHEAT[64] = 0.000; |
236
|
|
|
|
|
|
|
$EXHEAT[65] = 0.000; |
237
|
|
|
|
|
|
|
$EXHEAT[66] = 0.000; |
238
|
|
|
|
|
|
|
$EXHEAT[67] = 0.000; |
239
|
|
|
|
|
|
|
$EXHEAT[68] = 75.800; |
240
|
|
|
|
|
|
|
$EXHEAT[69] = 0.000; |
241
|
|
|
|
|
|
|
$EXHEAT[70] = 36.350; |
242
|
|
|
|
|
|
|
$EXHEAT[71] = 0.000; |
243
|
|
|
|
|
|
|
$EXHEAT[72] = 148.000; |
244
|
|
|
|
|
|
|
$EXHEAT[73] = 186.900; |
245
|
|
|
|
|
|
|
$EXHEAT[74] = 203.100; |
246
|
|
|
|
|
|
|
$EXHEAT[75] = 185.000; |
247
|
|
|
|
|
|
|
$EXHEAT[76] = 188.000; |
248
|
|
|
|
|
|
|
$EXHEAT[77] = 160.000; |
249
|
|
|
|
|
|
|
$EXHEAT[78] = 135.200; |
250
|
|
|
|
|
|
|
$EXHEAT[79] = 88.000; |
251
|
|
|
|
|
|
|
$EXHEAT[80] = 14.690; |
252
|
|
|
|
|
|
|
$EXHEAT[81] = 43.550; |
253
|
|
|
|
|
|
|
$EXHEAT[82] = 46.620; |
254
|
|
|
|
|
|
|
$EXHEAT[83] = 50.100; |
255
|
|
|
|
|
|
|
$EXHEAT[84] = 0.000; |
256
|
|
|
|
|
|
|
$EXHEAT[85] = 0.000; |
257
|
|
|
|
|
|
|
$EXHEAT[86] = 34.800; |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
our @COVALENT_RADII = ( |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
#in pm http://en.wikipedia.org/wiki/Covalent_radius |
262
|
|
|
|
|
|
|
# P. Pyykkö, M. Atsumi (2009). |
263
|
|
|
|
|
|
|
#"Molecular Single-Bond Covalent Radii for Elements 1-118". Chemistry: A European Journal 15: 186–197. |
264
|
|
|
|
|
|
|
# doi:10.1002/chem.200800987. |
265
|
|
|
|
|
|
|
# P. Pyykkö, M. Atsumi (2009). |
266
|
|
|
|
|
|
|
# "Molecular Double-Bond Covalent Radii for Elements Li–E112". Chemistry: A European Journal 15 (46): |
267
|
|
|
|
|
|
|
# 12770–12779. |
268
|
|
|
|
|
|
|
# doi:10.1002/chem.200901472.. Figure 3 of this paper contains all radii of refs. The mean-square deviation of each set is 3 pm. |
269
|
|
|
|
|
|
|
# P. Pyykkö, S. Riedel, M. Patzschke (2005). |
270
|
|
|
|
|
|
|
# "Triple-Bond Covalent Radii". Chemistry: A European Journal 11 (12): 3511–3520. |
271
|
|
|
|
|
|
|
# doi:10.1002/chem.200401299. PMID 15832398. |
272
|
|
|
|
|
|
|
# Z sng dub trip all in pm |
273
|
|
|
|
|
|
|
[ 0, 0, '-', '-' ], |
274
|
|
|
|
|
|
|
[ 1, 32, '-', '-' ], |
275
|
|
|
|
|
|
|
[ 2, 46, '-', '-' ], |
276
|
|
|
|
|
|
|
[ 3, 133, 133, 124 ], |
277
|
|
|
|
|
|
|
[ 4, 102, 90, 85 ], |
278
|
|
|
|
|
|
|
[ 5, 85, 78, 73 ], |
279
|
|
|
|
|
|
|
[ 6, 75, 67, 60 ], |
280
|
|
|
|
|
|
|
[ 7, 71, 60, 54 ], |
281
|
|
|
|
|
|
|
[ 8, 63, 57, 53 ], |
282
|
|
|
|
|
|
|
[ 9, 64, 59, 53 ], |
283
|
|
|
|
|
|
|
[ 10, 67, 96, '-' ], |
284
|
|
|
|
|
|
|
[ 11, 155, 160, '-' ], |
285
|
|
|
|
|
|
|
[ 12, 139, 132, 127 ], |
286
|
|
|
|
|
|
|
[ 13, 126, 113, 111 ], |
287
|
|
|
|
|
|
|
[ 14, 116, 107, 102 ], |
288
|
|
|
|
|
|
|
[ 15, 111, 102, 94 ], |
289
|
|
|
|
|
|
|
[ 16, 103, 94, 95 ], |
290
|
|
|
|
|
|
|
[ 17, 99, 95, 93 ], |
291
|
|
|
|
|
|
|
[ 18, 96, 107, 96 ], |
292
|
|
|
|
|
|
|
[ 19, 196, 193, '-' ], |
293
|
|
|
|
|
|
|
[ 20, 171, 147, 133 ], |
294
|
|
|
|
|
|
|
[ 21, 148, 116, 114 ], |
295
|
|
|
|
|
|
|
[ 22, 136, 117, 108 ], |
296
|
|
|
|
|
|
|
[ 23, 134, 112, 106 ], |
297
|
|
|
|
|
|
|
[ 24, 122, 111, 103 ], |
298
|
|
|
|
|
|
|
[ 25, 119, 105, 103 ], |
299
|
|
|
|
|
|
|
[ 26, 116, 109, 102 ], |
300
|
|
|
|
|
|
|
[ 27, 111, 103, 96 ], |
301
|
|
|
|
|
|
|
[ 28, 110, 101, 101 ], |
302
|
|
|
|
|
|
|
[ 29, 112, 115, 120 ], |
303
|
|
|
|
|
|
|
[ 30, 118, 120, '-' ], |
304
|
|
|
|
|
|
|
[ 31, 124, 117, 121 ], |
305
|
|
|
|
|
|
|
[ 32, 121, 111, 114 ], |
306
|
|
|
|
|
|
|
[ 33, 121, 114, 106 ], |
307
|
|
|
|
|
|
|
[ 34, 116, 107, 107 ], |
308
|
|
|
|
|
|
|
[ 35, 114, 109, 110 ], |
309
|
|
|
|
|
|
|
[ 36, 117, 121, 108 ], |
310
|
|
|
|
|
|
|
[ 37, 210, 202, '-' ], |
311
|
|
|
|
|
|
|
[ 38, 185, 157, 139 ], |
312
|
|
|
|
|
|
|
[ 39, 163, 130, 124 ], |
313
|
|
|
|
|
|
|
[ 40, 154, 127, 121 ], |
314
|
|
|
|
|
|
|
[ 41, 147, 125, 116 ], |
315
|
|
|
|
|
|
|
[ 42, 138, 121, 113 ], |
316
|
|
|
|
|
|
|
[ 43, 128, 120, 110 ], |
317
|
|
|
|
|
|
|
[ 44, 125, 114, 103 ], |
318
|
|
|
|
|
|
|
[ 45, 125, 110, 106 ], |
319
|
|
|
|
|
|
|
[ 46, 120, 117, 112 ], |
320
|
|
|
|
|
|
|
[ 47, 128, 139, 137 ], |
321
|
|
|
|
|
|
|
[ 48, 136, 144, '-' ], |
322
|
|
|
|
|
|
|
[ 49, 142, 136, 146 ], |
323
|
|
|
|
|
|
|
[ 50, 140, 130, 132 ], |
324
|
|
|
|
|
|
|
[ 51, 140, 133, 127 ], |
325
|
|
|
|
|
|
|
[ 52, 136, 128, 121 ], |
326
|
|
|
|
|
|
|
[ 53, 133, 129, 125 ], |
327
|
|
|
|
|
|
|
[ 54, 131, 135, 122 ], |
328
|
|
|
|
|
|
|
[ 55, 232, 209, '-' ], |
329
|
|
|
|
|
|
|
[ 56, 196, 161, 149 ], |
330
|
|
|
|
|
|
|
[ 57, 180, 139, 139 ], |
331
|
|
|
|
|
|
|
[ 58, 163, 137, 131 ], |
332
|
|
|
|
|
|
|
[ 59, 176, 138, 128 ], |
333
|
|
|
|
|
|
|
[ 60, 174, 137, '-' ], |
334
|
|
|
|
|
|
|
[ 61, 173, 135, '-' ], |
335
|
|
|
|
|
|
|
[ 62, 172, 134, '-' ], |
336
|
|
|
|
|
|
|
[ 63, 168, 134, '-' ], |
337
|
|
|
|
|
|
|
[ 64, 169, 135, 132 ], |
338
|
|
|
|
|
|
|
[ 65, 168, 135, '-' ], |
339
|
|
|
|
|
|
|
[ 66, 167, 133, '-' ], |
340
|
|
|
|
|
|
|
[ 67, 166, 133, '-' ], |
341
|
|
|
|
|
|
|
[ 68, 165, 133, '-' ], |
342
|
|
|
|
|
|
|
[ 69, 164, 131, '-' ], |
343
|
|
|
|
|
|
|
[ 70, 170, 129, '-' ], |
344
|
|
|
|
|
|
|
[ 71, 162, 131, 131 ], |
345
|
|
|
|
|
|
|
[ 72, 152, 128, 122 ], |
346
|
|
|
|
|
|
|
[ 73, 146, 126, 119 ], |
347
|
|
|
|
|
|
|
[ 74, 137, 120, 115 ], |
348
|
|
|
|
|
|
|
[ 75, 131, 119, 110 ], |
349
|
|
|
|
|
|
|
[ 76, 129, 116, 109 ], |
350
|
|
|
|
|
|
|
[ 77, 122, 115, 107 ], |
351
|
|
|
|
|
|
|
[ 78, 123, 112, 110 ], |
352
|
|
|
|
|
|
|
[ 79, 124, 121, 123 ], |
353
|
|
|
|
|
|
|
[ 80, 133, 142, '-' ], |
354
|
|
|
|
|
|
|
[ 81, 144, 142, 150 ], |
355
|
|
|
|
|
|
|
[ 82, 144, 135, 137 ], |
356
|
|
|
|
|
|
|
[ 83, 151, 141, 135 ], |
357
|
|
|
|
|
|
|
[ 84, 145, 135, 129 ], |
358
|
|
|
|
|
|
|
[ 85, 147, 138, 138 ], |
359
|
|
|
|
|
|
|
[ 86, 142, 145, 133 ], |
360
|
|
|
|
|
|
|
[ 87, 223, 218, '-' ], |
361
|
|
|
|
|
|
|
[ 88, 201, 173, 159 ], |
362
|
|
|
|
|
|
|
[ 89, 186, 153, 140 ], |
363
|
|
|
|
|
|
|
[ 90, 175, 143, 136 ], |
364
|
|
|
|
|
|
|
[ 91, 169, 138, 129 ], |
365
|
|
|
|
|
|
|
[ 92, 170, 134, 118 ], |
366
|
|
|
|
|
|
|
[ 93, 171, 136, 116 ], |
367
|
|
|
|
|
|
|
[ 94, 172, 135, '-' ], |
368
|
|
|
|
|
|
|
[ 95, 166, 135, '-' ], |
369
|
|
|
|
|
|
|
[ 96, 166, 136, '-' ], |
370
|
|
|
|
|
|
|
[ 97, 168, 139, '-' ], |
371
|
|
|
|
|
|
|
[ 98, 168, 140, '-' ], |
372
|
|
|
|
|
|
|
[ 99, 165, 140, '-' ], |
373
|
|
|
|
|
|
|
[ 100, 167, '-', '-' ], |
374
|
|
|
|
|
|
|
[ 101, 173, 139, '-' ], |
375
|
|
|
|
|
|
|
[ 102, 176, '-', '-' ], |
376
|
|
|
|
|
|
|
[ 103, 161, 141, '-' ], |
377
|
|
|
|
|
|
|
[ 104, 157, 140, 131 ], |
378
|
|
|
|
|
|
|
[ 105, 149, 136, 126 ], |
379
|
|
|
|
|
|
|
[ 106, 143, 128, 121 ], |
380
|
|
|
|
|
|
|
[ 107, 141, 128, 119 ], |
381
|
|
|
|
|
|
|
[ 108, 134, 125, 118 ], |
382
|
|
|
|
|
|
|
[ 109, 129, 125, 113 ], |
383
|
|
|
|
|
|
|
[ 110, 128, 116, 112 ], |
384
|
|
|
|
|
|
|
[ 111, 121, 116, 118 ], |
385
|
|
|
|
|
|
|
[ 112, 122, 137, 130 ], |
386
|
|
|
|
|
|
|
[ 113, 136, '-', '-' ], |
387
|
|
|
|
|
|
|
[ 114, 143, '-', '-' ], |
388
|
|
|
|
|
|
|
[ 115, 162, '-', '-' ], |
389
|
|
|
|
|
|
|
[ 116, 175, '-', '-' ], |
390
|
|
|
|
|
|
|
[ 117, 165, '-', '-' ], |
391
|
|
|
|
|
|
|
[ 118, 157, '-', '-' ], |
392
|
|
|
|
|
|
|
); |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
our @VDW_RADII = ( |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
# http://en.wikipedia.org/wiki/Atomic_radii_of_the_elements_%28data_page%29 |
397
|
|
|
|
|
|
|
# the covalent vals are shady on this page |
398
|
|
|
|
|
|
|
[ 0, 0 ], |
399
|
|
|
|
|
|
|
[ 1, 120 ], |
400
|
|
|
|
|
|
|
[ 2, 140 ], |
401
|
|
|
|
|
|
|
[ 3, 182 ], |
402
|
|
|
|
|
|
|
[ 4, 153 ], |
403
|
|
|
|
|
|
|
[ 5, 192 ], |
404
|
|
|
|
|
|
|
[ 6, 170 ], |
405
|
|
|
|
|
|
|
[ 7, 155 ], |
406
|
|
|
|
|
|
|
[ 8, 152 ], |
407
|
|
|
|
|
|
|
[ 9, 147 ], |
408
|
|
|
|
|
|
|
[ 10, 154 ], |
409
|
|
|
|
|
|
|
[ 11, 227 ], |
410
|
|
|
|
|
|
|
[ 12, 173 ], |
411
|
|
|
|
|
|
|
[ 13, 184 ], |
412
|
|
|
|
|
|
|
[ 14, 210 ], |
413
|
|
|
|
|
|
|
[ 15, 180 ], |
414
|
|
|
|
|
|
|
[ 16, 180 ], |
415
|
|
|
|
|
|
|
[ 17, 175 ], |
416
|
|
|
|
|
|
|
[ 18, 188 ], |
417
|
|
|
|
|
|
|
[ 19, 275 ], |
418
|
|
|
|
|
|
|
[ 20, 231 ], |
419
|
|
|
|
|
|
|
[ 21, 211 ], |
420
|
|
|
|
|
|
|
[ 22, 999 ], |
421
|
|
|
|
|
|
|
[ 23, 999 ], |
422
|
|
|
|
|
|
|
[ 24, 999 ], |
423
|
|
|
|
|
|
|
[ 25, 999 ], |
424
|
|
|
|
|
|
|
[ 26, 999 ], |
425
|
|
|
|
|
|
|
[ 27, 999 ], |
426
|
|
|
|
|
|
|
[ 28, 163 ], |
427
|
|
|
|
|
|
|
[ 29, 140 ], |
428
|
|
|
|
|
|
|
[ 30, 139 ], |
429
|
|
|
|
|
|
|
[ 31, 187 ], |
430
|
|
|
|
|
|
|
[ 32, 211 ], |
431
|
|
|
|
|
|
|
[ 33, 185 ], |
432
|
|
|
|
|
|
|
[ 34, 190 ], |
433
|
|
|
|
|
|
|
[ 35, 185 ], |
434
|
|
|
|
|
|
|
[ 36, 202 ], |
435
|
|
|
|
|
|
|
[ 37, 303 ], |
436
|
|
|
|
|
|
|
[ 38, 249 ], |
437
|
|
|
|
|
|
|
[ 39, 999 ], |
438
|
|
|
|
|
|
|
[ 40, 999 ], |
439
|
|
|
|
|
|
|
[ 41, 999 ], |
440
|
|
|
|
|
|
|
[ 42, 999 ], |
441
|
|
|
|
|
|
|
[ 43, 999 ], |
442
|
|
|
|
|
|
|
[ 44, 999 ], |
443
|
|
|
|
|
|
|
[ 45, 999 ], |
444
|
|
|
|
|
|
|
[ 46, 163 ], |
445
|
|
|
|
|
|
|
[ 47, 172 ], |
446
|
|
|
|
|
|
|
[ 48, 158 ], |
447
|
|
|
|
|
|
|
[ 49, 193 ], |
448
|
|
|
|
|
|
|
[ 50, 217 ], |
449
|
|
|
|
|
|
|
[ 51, 206 ], |
450
|
|
|
|
|
|
|
[ 52, 206 ], |
451
|
|
|
|
|
|
|
[ 53, 198 ], |
452
|
|
|
|
|
|
|
[ 54, 216 ], |
453
|
|
|
|
|
|
|
[ 55, 343 ], |
454
|
|
|
|
|
|
|
[ 56, 268 ], |
455
|
|
|
|
|
|
|
[ 57, 999 ], |
456
|
|
|
|
|
|
|
[ 58, 999 ], |
457
|
|
|
|
|
|
|
[ 59, 999 ], |
458
|
|
|
|
|
|
|
[ 60, 999 ], |
459
|
|
|
|
|
|
|
[ 61, 999 ], |
460
|
|
|
|
|
|
|
[ 62, 999 ], |
461
|
|
|
|
|
|
|
[ 63, 999 ], |
462
|
|
|
|
|
|
|
[ 64, 999 ], |
463
|
|
|
|
|
|
|
[ 65, 999 ], |
464
|
|
|
|
|
|
|
[ 66, 999 ], |
465
|
|
|
|
|
|
|
[ 67, 999 ], |
466
|
|
|
|
|
|
|
[ 68, 999 ], |
467
|
|
|
|
|
|
|
[ 69, 999 ], |
468
|
|
|
|
|
|
|
[ 70, 999 ], |
469
|
|
|
|
|
|
|
[ 71, 999 ], |
470
|
|
|
|
|
|
|
[ 72, 999 ], |
471
|
|
|
|
|
|
|
[ 73, 999 ], |
472
|
|
|
|
|
|
|
[ 74, 999 ], |
473
|
|
|
|
|
|
|
[ 75, 999 ], |
474
|
|
|
|
|
|
|
[ 76, 999 ], |
475
|
|
|
|
|
|
|
[ 77, 999 ], |
476
|
|
|
|
|
|
|
[ 78, 175 ], |
477
|
|
|
|
|
|
|
[ 79, 166 ], |
478
|
|
|
|
|
|
|
[ 80, 155 ], |
479
|
|
|
|
|
|
|
[ 81, 196 ], |
480
|
|
|
|
|
|
|
[ 82, 202 ], |
481
|
|
|
|
|
|
|
[ 83, 207 ], |
482
|
|
|
|
|
|
|
[ 84, 197 ], |
483
|
|
|
|
|
|
|
[ 85, 202 ], |
484
|
|
|
|
|
|
|
[ 86, 220 ], |
485
|
|
|
|
|
|
|
[ 87, 348 ], |
486
|
|
|
|
|
|
|
[ 88, 283 ], |
487
|
|
|
|
|
|
|
[ 89, 999 ], |
488
|
|
|
|
|
|
|
[ 90, 999 ], |
489
|
|
|
|
|
|
|
[ 91, 999 ], |
490
|
|
|
|
|
|
|
[ 92, 186 ], |
491
|
|
|
|
|
|
|
[ 93, 999 ], |
492
|
|
|
|
|
|
|
[ 94, 999 ], |
493
|
|
|
|
|
|
|
[ 95, 999 ], |
494
|
|
|
|
|
|
|
[ 96, 999 ], |
495
|
|
|
|
|
|
|
[ 97, 999 ], |
496
|
|
|
|
|
|
|
[ 98, 999 ], |
497
|
|
|
|
|
|
|
[ 99, 999 ], |
498
|
|
|
|
|
|
|
[ 100, 999 ], |
499
|
|
|
|
|
|
|
[ 101, 999 ], |
500
|
|
|
|
|
|
|
[ 102, 999 ], |
501
|
|
|
|
|
|
|
[ 103, 999 ], |
502
|
|
|
|
|
|
|
[ 104, 999 ], |
503
|
|
|
|
|
|
|
[ 105, 999 ], |
504
|
|
|
|
|
|
|
[ 106, 999 ], |
505
|
|
|
|
|
|
|
[ 107, 999 ], |
506
|
|
|
|
|
|
|
[ 108, 999 ], |
507
|
|
|
|
|
|
|
[ 109, 999 ], |
508
|
|
|
|
|
|
|
[ 110, 999 ], |
509
|
|
|
|
|
|
|
[ 111, 999 ], |
510
|
|
|
|
|
|
|
[ 112, 999 ], |
511
|
|
|
|
|
|
|
[ 113, 999 ], |
512
|
|
|
|
|
|
|
[ 114, 999 ], |
513
|
|
|
|
|
|
|
[ 115, 999 ], |
514
|
|
|
|
|
|
|
[ 116, 999 ], |
515
|
|
|
|
|
|
|
[ 117, 999 ], |
516
|
|
|
|
|
|
|
[ 118, 999 ], |
517
|
|
|
|
|
|
|
); |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
our %KNOWN_NAMES; |
520
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'C' foreach qw(C CA CB CD CD1 CD2 CE CE1 |
521
|
|
|
|
|
|
|
CE2 CE3 CG CG1 CG2 CH2 CZ CZ2 CZ3); |
522
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'H' |
523
|
|
|
|
|
|
|
foreach qw(H H1 H2 H3 H4 HA HA1 HA2 HB HB1 HB2 HB3 HD1 HD11 |
524
|
|
|
|
|
|
|
HD12 HD13 HD2 HD21 HD22 HD23 HD3 HE |
525
|
|
|
|
|
|
|
HE1 HE2 HE21 HE22 HE3 HG HG1 HG11 HG12 |
526
|
|
|
|
|
|
|
HG13 HG2 HG21 HG22 HG23 HH HH11 HH12 HH2 |
527
|
|
|
|
|
|
|
HH21 HH22 HN HT1 HT2 HT3 HZ HZ1 HZ2 HZ3 |
528
|
|
|
|
|
|
|
DUM); |
529
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'N' foreach qw(N ND1 ND2 NE NE1 NE2 NH1 NH2 NZ); |
530
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'O' foreach qw(O OD1 OD2 OE1 OE2 OG OG1 OH OT1 OT2 OH2 OXT); |
531
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'S' foreach qw(S SD SG); |
532
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'Cl' foreach qw(CLA); |
533
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'Na' foreach qw(SOD); |
534
|
|
|
|
|
|
|
$KNOWN_NAMES{$_} = 'K' foreach qw(POT); |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
my $string = shift; |
537
|
|
|
|
|
|
|
$string =~ s/^\s+//; |
538
|
52548
|
|
|
52548
|
|
59109
|
|
539
|
52548
|
|
|
|
|
84962
|
# $string =~ s/\s+$//; #unpack will delete the \s+ in the end; |
540
|
|
|
|
|
|
|
return $string; |
541
|
|
|
|
|
|
|
} |
542
|
52548
|
|
|
|
|
89707
|
|
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
# _qstring something like 2+ or 2- |
545
|
|
|
|
|
|
|
my $string = shift; |
546
|
|
|
|
|
|
|
$string =~ s/\+//; |
547
|
|
|
|
|
|
|
$string =~ s/(.*?)(\-)/$2$1/; |
548
|
7
|
|
|
7
|
|
19
|
$string = sprintf( "%g", $string ); |
549
|
7
|
|
|
|
|
18
|
return $string; |
550
|
7
|
|
|
|
|
18
|
|
551
|
7
|
|
|
|
|
90
|
} |
552
|
7
|
|
|
|
|
27
|
|
553
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
# guess the element using the atom name |
555
|
|
|
|
|
|
|
my $name = uc(shift); |
556
|
|
|
|
|
|
|
my $dirt = 0; |
557
|
|
|
|
|
|
|
unless ( exists( $KNOWN_NAMES{$name} ) ) { |
558
|
|
|
|
|
|
|
|
559
|
324
|
|
|
324
|
|
470
|
#carp "$name doesn not exist in HackaMol::PeriodicTable, if common please add to KNOWN_NAMES"; |
560
|
324
|
|
|
|
|
400
|
$dirt = 1; |
561
|
324
|
100
|
|
|
|
679
|
my $symbol = substr $name, 0, 1; #doesn't work if two letters for symbol |
562
|
|
|
|
|
|
|
$symbol = 'C' if ( $symbol eq 'A' ); |
563
|
|
|
|
|
|
|
return ( $symbol, $dirt ); |
564
|
31
|
|
|
|
|
37
|
} |
565
|
31
|
|
|
|
|
51
|
return ( $KNOWN_NAMES{$name}, $dirt ); |
566
|
31
|
50
|
|
|
|
55
|
} |
567
|
31
|
|
|
|
|
74
|
|
568
|
|
|
|
|
|
|
1; |
569
|
293
|
|
|
|
|
594
|
|
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
=pod |
572
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
=head1 NAME |
574
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
HackaMol::PeriodicTable - package for period table data... needs to change |
576
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
=head1 VERSION |
578
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
version 0.052 |
580
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
=head1 EXTENDS |
582
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
=over 4 |
584
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
=item * L<Exporter> |
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
=back |
588
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
=head1 AUTHOR |
590
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
Demian Riccardi <demianriccardi@gmail.com> |
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
594
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Demian Riccardi. |
596
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
598
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
599
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
=cut |