Package rdkit :: Package Chem :: Module PeriodicTable
[hide private]
[frames] | no frames]

Source Code for Module rdkit.Chem.PeriodicTable

  1  # $Id$ 
  2  # 
  3  # Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC 
  4  # 
  5  #   @@ All Rights Reserved @@ 
  6  #  This file is part of the RDKit. 
  7  #  The contents are covered by the terms of the BSD license 
  8  #  which is included in the file license.txt, found at the root 
  9  #  of the RDKit source tree. 
 10  # 
 11  """ periodic table data, **obsolete** 
 12   
 13    now that the C++ code exposes an interface to the internal PT stuff, 
 14    this data is mostly obsolete 
 15   
 16  """ 
 17  import re 
 18  blankExpr = re.compile(r'\ *\t*\ *') 
 19  # Num   Symb    RCov    RBO     RVdW    Max Bnd Mass   nval 
 20  periodicData=\ 
 21  """ 
 22  0       X       0.0     0.0     0.0     0       0.000   0   
 23  1       H       0.230   0.330   1.200   1       1.008   1   
 24  2       He      0.930   0.700   1.400   0       4.003   2   
 25  3       Li      0.680   1.230   1.820   1       6.941   1   
 26  4       Be      0.350   0.900   1.700   2       9.012   2   
 27  5       B       0.830   0.820   2.080   3       10.812  3   
 28  6       C       0.680   0.770   1.950   4       12.011  4   
 29  7       N       0.680   0.700   1.850   4       14.007  5   
 30  8       O       0.680   0.660   1.700   2       15.999  6   
 31  9       F       0.640   0.611   1.730   1       18.998  7   
 32  10      Ne      1.120   0.700   1.540   0       20.180   8  
 33  11      Na      0.970   1.540   2.270   1       22.990   1  
 34  12      Mg      1.100   1.360   1.730   2       24.305   2  
 35  13      Al      1.350   1.180   2.050   6       26.982   3  
 36  14      Si      1.200   0.937   2.100   6       28.086   4  
 37  15      P       0.750   0.890   2.080   5       30.974   5  
 38  16      S       1.020   1.040   2.000   6       32.067   6  
 39  17      Cl      0.990   0.997   1.970   1       35.453   7  
 40  18      Ar      1.570   1.740   1.880   0       39.948   8  
 41  19      K       1.330   2.030   2.750   1       39.098   1  
 42  20      Ca      0.990   1.740   1.973   2       40.078   2  
 43  21      Sc      1.440   1.440   1.700   6       44.956   3  
 44  22      Ti      1.470   1.320   1.700   6       47.867   4  
 45  23      V       1.330   1.220   1.700   6       50.942   5  
 46  24      Cr      1.350   1.180   1.700   6       51.996   6  
 47  25      Mn      1.350   1.170   1.700   8       54.938   7  
 48  26      Fe      1.340   1.170   1.700   6       55.845   8  
 49  27      Co      1.330   1.160   1.700   6       58.933   9  
 50  28      Ni      1.500   1.150   1.630   6       58.693   10 
 51  29      Cu      1.520   1.170   1.400   6       63.546   11 
 52  30      Zn      1.450   1.250   1.390   6       65.39    2  
 53  31      Ga      1.220   1.260   1.870   3       69.723   3  
 54  32      Ge      1.170   1.188   1.700   4       72.61    4  
 55  33      As      1.210   1.200   1.850   3       74.922   5  
 56  34      Se      1.220   1.170   1.900   2       78.96    6  
 57  35      Br      1.210   1.167   2.100   1       79.904   7  
 58  36      Kr      1.910   1.910   2.020   0       83.80    8  
 59  37      Rb      1.470   2.160   1.700   1       85.468   1  
 60  38      Sr      1.120   1.910   1.700   2       87.62    2  
 61  39      Y       1.780   1.620   1.700   6       88.906   3  
 62  40      Zr      1.560   1.450   1.700   6       91.224   4  
 63  41      Nb      1.480   1.340   1.700   6       92.906   5  
 64  42      Mo      1.470   1.300   1.700   6       95.94    6  
 65  43      Tc      1.350   1.270   1.700   6       98.0     7  
 66  44      Ru      1.400   1.250   1.700   6       101.07   8  
 67  45      Rh      1.450   1.250   1.700   6       102.906  9  
 68  46      Pd      1.500   1.280   1.630   6       106.42   10 
 69  47      Ag      1.590   1.340   1.720   6       107.868  11 
 70  48      Cd      1.690   1.480   1.580   6       112.412  2  
 71  49      In      1.630   1.440   1.930   3       114.818  3  
 72  50      Sn      1.460   1.385   2.170   4       118.711  4  
 73  51      Sb      1.460   1.400   2.200   3       121.760  5  
 74  52      Te      1.470   1.378   2.060   2       127.60   6  
 75  53      I       1.400   1.387   2.150   1       126.904  7  
 76  54      Xe      1.980   1.980   2.160   0       131.29   8  
 77  55      Cs      1.670   2.350   1.700   1       132.905  1  
 78  56      Ba      1.340   1.980   1.700   2       137.328  2  
 79  57      La      1.870   1.690   1.700   12      138.906  3  
 80  58      Ce      1.830   1.830   1.700   6       140.116  4  
 81  59      Pr      1.820   1.820   1.700   6       140.908  3  
 82  60      Nd      1.810   1.810   1.700   6       144.24   4  
 83  61      Pm      1.800   1.800   1.700   6       145.0    5  
 84  62      Sm      1.800   1.800   1.700   6       150.36   6  
 85  63      Eu      1.990   1.990   1.700   6       151.964  7  
 86  64      Gd      1.790   1.790   1.700   6       157.25   8  
 87  65      Tb      1.760   1.760   1.700   6       158.925  9  
 88  66      Dy      1.750   1.750   1.700   6       162.50   10 
 89  67      Ho      1.740   1.740   1.700   6       164.930  11 
 90  68      Er      1.730   1.730   1.700   6       167.26   12 
 91  69      Tm      1.720   1.720   1.700   6       168.934  13 
 92  70      Yb      1.940   1.940   1.700   6       173.04   14 
 93  71      Lu      1.720   1.720   1.700   6       174.967  15 
 94  72      Hf      1.570   1.440   1.700   6       178.49   4  
 95  73      Ta      1.430   1.340   1.700   6       180.948  5  
 96  74      W       1.370   1.300   1.700   6       183.84   6  
 97  75      Re      1.350   1.280   1.700   6       186.207  7  
 98  76      Os      1.370   1.260   1.700   6       190.23   8  
 99  77      Ir      1.320   1.270   1.700   6       192.217  9  
100  78      Pt      1.500   1.300   1.720   6       195.078  10 
101  79      Au      1.500   1.340   1.660   6       196.967  11 
102  80      Hg      1.700   1.490   1.550   6       200.59   2  
103  81      Tl      1.550   1.480   1.960   3       204.383  3  
104  82      Pb      1.540   1.480   2.020   4       207.2    4  
105  83      Bi      1.540   1.450   1.700   3       208.980  5  
106  84      Po      1.680   1.460   1.700   2       209.0    6  
107  85      At      1.700   1.450   1.700   1       210.0    7  
108  86      Rn      2.400   2.400   1.700   0       222.0    8  
109  87      Fr      2.000   2.000   1.700   1       223.0    1  
110  88      Ra      1.900   1.900   1.700   2       226.0    2  
111  89      Ac      1.880   1.880   1.700   6       227.0    3  
112  90      Th      1.790   1.790   1.700   6       232.038  4  
113  91      Pa      1.610   1.610   1.700   6       231.036  3  
114  92      U       1.580   1.580   1.860   6       238.029  4  
115  93      Np      1.550   1.550   1.700   6       237.0    5  
116  94      Pu      1.530   1.530   1.700   6       244.0    6  
117  95      Am      1.510   1.070   1.700   6       243.0    7  
118  96      Cm      1.500   0.000   1.700   6       247.0    8  
119  97      Bk      1.500   0.000   1.700   6       247.0    9  
120  98      Cf      1.500   0.000   1.700   6       251.0    10 
121  99      Es      1.500   0.000   1.700   6       252.0    11 
122  100     Fm      1.500   0.000   1.700   6       257.0    12 
123  101     Md      1.500   0.000   1.700   6       258.0    13 
124  102     No      1.500   0.000   1.700   6       259.0    14 
125  103     Lr      1.500   0.000   1.700   6       262.0    15 
126  """ 
127   
128  nameTable = {} 
129  numTable = {} 
130  for line in periodicData.split('\n'): 
131    splitLine = blankExpr.split(line) 
132    if len(splitLine)>1: 
133      nameTable[splitLine[1]] = (int(splitLine[0]),float(splitLine[6]),int(splitLine[7]),\ 
134                                 int(splitLine[5]),float(splitLine[2]),float(splitLine[3]), 
135                                 float(splitLine[4])) 
136      numTable[int(splitLine[0])] = (splitLine[1],float(splitLine[6]),int(splitLine[7]),\ 
137                                     int(splitLine[5]),float(splitLine[2]),float(splitLine[3]), 
138                                     float(splitLine[4])) 
139   
140  # a list of metals (transition metals, semi-metals, lanthanides and actinides) 
141  metalRanges = ["13","21-32","39-51","57-84","89-103"] 
142  metalNumList = [] 
143  for entry in metalRanges: 
144    t = entry.split('-') 
145    start = int(t[0]) 
146    if len(t)>1: 
147      end = int(t[1]) 
148    else: 
149      end = start 
150    if start > end: 
151      start,end = end,start 
152    metalNumList += range(start,end+1)   
153  metalNames = map(lambda x:numTable[x][0],metalNumList) 
154   
155  # these are from table 4 of Rev. Comp. Chem. vol 2, 367-422, (1991) 
156  #  the order is [alpha(SP),alpha(SP2),alpha(SP3)] 
157  # where values are not known, None has been inserted 
158  hallKierAlphas = { 
159    'H':[0.0,0.0,0.0], # removes explicit H's from consideration in the shape 
160    'C':[-0.22,-0.13,0.0], 
161    'N':[-0.29,-0.20,-0.04], 
162    'O':[None,-0.20,-0.04], 
163    'F':[None,None,-0.07], 
164    'P':[None,0.30,0.43], 
165    'S':[None,0.22,0.35], 
166    'Cl':[None,None,0.29], 
167    'Br':[None,None,0.48], 
168    'I':[None,None,0.73]} 
169