alphabase.constants.atom¶
Data:
chemical element information in dict defined by nist_element.yaml |
|
mass} |
Classes:
|
Initialize the ChemicalCompositonFormula with a given formula. |
Functions:
|
Calculates the mass of the formula` |
|
Load built-in or user-defined element yaml file. |
|
Given a formula (str, e.g. H(1)C(2)O(3)), it generates [('H', 2), ('C', 2), ('O', 1)]. |
|
For a given isotope distribution (intensity patterns), this function truncates the distribution by top MAX_ISOTOPE_LEN neighbors those contain the monoisotopic peak pointed by mono_idx. |
|
Update the atom information in CHEM_INFO_DICT. |
- alphabase.constants.atom.CHEM_INFO_DICT = {'13C': {'abundance': [0.01, 0.99], 'mass': [12.0, 13.00335483507]}, '14N': {'abundance': [0.996337, 0.003663], 'mass': [14.00307400443, 15.00010889888]}, '15N': {'abundance': [0.01, 0.99], 'mass': [14.00307400443, 15.00010889888]}, '18O': {'abundance': [0.005, 0.005, 0.99], 'mass': [15.99491461957, 16.9991317565, 17.99915961286]}, '2H': {'abundance': [0.01, 0.99], 'mass': [1.00782503223, 2.01410177812]}, 'Ac': {'abundance': [1.0], 'mass': [227.028]}, 'Ag': {'abundance': [0.51839, 0.48161], 'mass': [106.9050916, 108.9047553]}, 'Al': {'abundance': [1.0], 'mass': [26.98153853]}, 'Am': {'abundance': [1.0], 'mass': [243.0]}, 'Ar': {'abundance': [0.003336, 0.000629, 0.996035], 'mass': [35.967545105, 37.96273211, 39.9623831237]}, 'As': {'abundance': [1.0], 'mass': [74.92159457]}, 'At': {'abundance': [1.0], 'mass': [210.0]}, 'Au': {'abundance': [1.0], 'mass': [196.96656879]}, 'B': {'abundance': [0.199, 0.801], 'mass': [10.01293695, 11.00930536]}, 'Ba': {'abundance': [0.00106, 0.00101, 0.02417, 0.06592, 0.07854, 0.11232, 0.71698], 'mass': [129.9063207, 131.9050611, 133.90450818, 134.90568838, 135.90457573, 136.90582714, 137.905247]}, 'Be': {'abundance': [1.0], 'mass': [9.012183065]}, 'Bi': {'abundance': [1.0], 'mass': [208.9803991]}, 'Bk': {'abundance': [1.0], 'mass': [247.0]}, 'Br': {'abundance': [0.5069, 0.4931], 'mass': [78.9183376, 80.9162897]}, 'C': {'abundance': [0.9893, 0.0107], 'mass': [12.0, 13.00335483507]}, 'Ca': {'abundance': [0.96941, 0.00647, 0.00135, 0.02086, 4e-05, 0.00187], 'mass': [39.962590863, 41.95861783, 42.95876644, 43.95548156, 45.953689, 47.95252276]}, 'Cd': {'abundance': [0.0125, 0.0089, 0.1249, 0.128, 0.2413, 0.1222, 0.2873, 0.0749], 'mass': [105.9064599, 107.9041834, 109.90300661, 110.90418287, 111.90276287, 112.90440813, 113.90336509, 115.90476315]}, 'Ce': {'abundance': [0.00185, 0.00251, 0.8845, 0.11114], 'mass': [135.90712921, 137.905991, 139.9054431, 141.9092504]}, 'Cf': {'abundance': [1.0], 'mass': [251.0]}, 'Cl': {'abundance': [0.7576, 0.2424], 'mass': [34.968852682, 36.965902602]}, 'Cm': {'abundance': [1.0], 'mass': [247.0]}, 'Co': {'abundance': [1.0], 'mass': [58.93319429]}, 'Cr': {'abundance': [0.04345, 0.83789, 0.09501, 0.02365], 'mass': [49.94604183, 51.94050623, 52.94064815, 53.93887916]}, 'Cs': {'abundance': [1.0], 'mass': [132.905451961]}, 'Cu': {'abundance': [0.6915, 0.3085], 'mass': [62.92959772, 64.9277897]}, 'Dy': {'abundance': [0.00056, 0.00095, 0.02329, 0.18889, 0.25475, 0.24896, 0.2826], 'mass': [155.9242847, 157.9244159, 159.9252046, 160.9269405, 161.9268056, 162.9287383, 163.9291819]}, 'Er': {'abundance': [0.00139, 0.01601, 0.33503, 0.22869, 0.26978, 0.1491], 'mass': [161.9287884, 163.9292088, 165.9302995, 166.9320546, 167.9323767, 169.9354702]}, 'Es': {'abundance': [1.0], 'mass': [252.0]}, 'Eu': {'abundance': [0.4781, 0.5219], 'mass': [150.9198578, 152.921238]}, 'F': {'abundance': [1.0], 'mass': [18.99840316273]}, 'Fe': {'abundance': [0.05845, 0.91754, 0.02119, 0.00282], 'mass': [53.93960899, 55.93493633, 56.93539284, 57.93327443]}, 'Fm': {'abundance': [1.0], 'mass': [257.0]}, 'Fr': {'abundance': [1.0], 'mass': [223.0]}, 'Ga': {'abundance': [0.60108, 0.39892], 'mass': [68.9255735, 70.92470258]}, 'Gd': {'abundance': [0.002, 0.0218, 0.148, 0.2047, 0.1565, 0.2484, 0.2186], 'mass': [151.9197995, 153.9208741, 154.9226305, 155.9221312, 156.9239686, 157.9241123, 159.9270624]}, 'Ge': {'abundance': [0.2057, 0.2745, 0.0775, 0.365, 0.0773], 'mass': [69.92424875, 71.922075826, 72.923458956, 73.921177761, 75.921402726]}, 'H': {'abundance': [0.999885, 0.000115], 'mass': [1.00782503223, 2.01410177812]}, 'He': {'abundance': [1.34e-06, 0.99999866], 'mass': [3.0160293201, 4.00260325413]}, 'Hf': {'abundance': [0.0016, 0.0526, 0.186, 0.2728, 0.1362, 0.3508], 'mass': [173.9400461, 175.9414076, 176.9432277, 177.9437058, 178.9458232, 179.946557]}, 'Hg': {'abundance': [0.0015, 0.0997, 0.1687, 0.231, 0.1318, 0.2986, 0.0687], 'mass': [195.9658326, 197.9667686, 198.96828064, 199.96832659, 200.97030284, 201.9706434, 203.97349398]}, 'Ho': {'abundance': [1.0], 'mass': [164.9303288]}, 'I': {'abundance': [1.0], 'mass': [126.9044719]}, 'In': {'abundance': [0.0429, 0.9571], 'mass': [112.90406184, 114.903878776]}, 'Ir': {'abundance': [0.373, 0.627], 'mass': [190.9605893, 192.9629216]}, 'K': {'abundance': [0.932581, 0.000117, 0.067302], 'mass': [38.9637064864, 39.963998166, 40.9618252579]}, 'Kr': {'abundance': [0.00355, 0.02286, 0.11593, 0.115, 0.56987, 0.17279], 'mass': [77.92036494, 79.91637808, 81.91348273, 82.91412716, 83.9114977282, 85.9106106269]}, 'La': {'abundance': [0.0008881, 0.9991119], 'mass': [137.9071149, 138.9063563]}, 'Li': {'abundance': [0.0759, 0.9241], 'mass': [6.0151228874, 7.0160034366]}, 'Lr': {'abundance': [1.0], 'mass': [260.0]}, 'Lu': {'abundance': [0.97401, 0.02599], 'mass': [174.9407752, 175.9426897]}, 'Md': {'abundance': [1.0], 'mass': [258.0]}, 'Mg': {'abundance': [0.7899, 0.1, 0.1101], 'mass': [23.985041697, 24.985836976, 25.982592968]}, 'Mn': {'abundance': [1.0], 'mass': [54.93804391]}, 'Mo': {'abundance': [0.1453, 0.0915, 0.1584, 0.1667, 0.096, 0.2439, 0.0982], 'mass': [91.90680796, 93.9050849, 94.90583877, 95.90467612, 96.90601812, 97.90540482, 99.9074718]}, 'N': {'abundance': [0.99636, 0.00364], 'mass': [14.00307400443, 15.00010889888]}, 'Na': {'abundance': [1.0], 'mass': [22.989769282]}, 'Nb': {'abundance': [1.0], 'mass': [92.906373]}, 'Nd': {'abundance': [0.27152, 0.12174, 0.23798, 0.08293, 0.17189, 0.05756, 0.05638], 'mass': [141.907729, 142.90982, 143.910093, 144.9125793, 145.9131226, 147.9168993, 149.9209022]}, 'Ne': {'abundance': [0.9048, 0.0027, 0.0925], 'mass': [19.9924401762, 20.993846685, 21.991385114]}, 'Ni': {'abundance': [0.68077, 0.26223, 0.011399, 0.036346, 0.009255], 'mass': [57.93534241, 59.93078588, 60.93105557, 61.92834537, 63.92796682]}, 'No': {'abundance': [1.0], 'mass': [259.0]}, 'Np': {'abundance': [1.0], 'mass': [237.048]}, 'O': {'abundance': [0.99757, 0.00038, 0.00205], 'mass': [15.99491461957, 16.9991317565, 17.99915961286]}, 'Os': {'abundance': [0.0002, 0.0159, 0.0196, 0.1324, 0.1615, 0.2626, 0.4078], 'mass': [183.9524885, 185.953835, 186.9557474, 187.9558352, 188.9581442, 189.9584437, 191.961477]}, 'P': {'abundance': [1.0], 'mass': [30.97376199842]}, 'Pa': {'abundance': [1.0], 'mass': [231.0358842]}, 'Pb': {'abundance': [0.014, 0.241, 0.221, 0.524], 'mass': [203.973044, 205.9744657, 206.9758973, 207.9766525]}, 'Pd': {'abundance': [0.0102, 0.1114, 0.2233, 0.2733, 0.2646, 0.1172], 'mass': [101.9056022, 103.9040305, 104.9050796, 105.9034804, 107.9038916, 109.9051722]}, 'Pm': {'abundance': [1.0], 'mass': [145.0]}, 'Po': {'abundance': [1.0], 'mass': [209.0]}, 'Pr': {'abundance': [1.0], 'mass': [140.9076576]}, 'Pt': {'abundance': [0.00012, 0.00782, 0.3286, 0.3378, 0.2521, 0.07356], 'mass': [189.9599297, 191.9610387, 193.9626809, 194.9647917, 195.96495209, 197.9678949]}, 'Pu': {'abundance': [1.0], 'mass': [244.0]}, 'Ra': {'abundance': [1.0], 'mass': [226.025]}, 'Rb': {'abundance': [0.7217, 0.2783], 'mass': [84.9117897379, 86.909180531]}, 'Re': {'abundance': [0.374, 0.626], 'mass': [184.9529545, 186.9557501]}, 'Rh': {'abundance': [1.0], 'mass': [102.905498]}, 'Rn': {'abundance': [1.0], 'mass': [222.0]}, 'Ru': {'abundance': [0.0554, 0.0187, 0.1276, 0.126, 0.1706, 0.3155, 0.1862], 'mass': [95.90759025, 97.9052868, 98.9059341, 99.9042143, 100.9055769, 101.9043441, 103.9054275]}, 'S': {'abundance': [0.9499, 0.0075, 0.0425, 0.0001], 'mass': [31.9720711744, 32.9714589098, 33.967867004, 35.96708071]}, 'Sb': {'abundance': [0.5721, 0.4279], 'mass': [120.903812, 122.9042132]}, 'Sc': {'abundance': [1.0], 'mass': [44.95590828]}, 'Se': {'abundance': [0.0089, 0.0937, 0.0763, 0.2377, 0.4961, 0.0873], 'mass': [73.922475934, 75.919213704, 76.919914154, 77.91730928, 79.9165218, 81.9166995]}, 'Si': {'abundance': [0.92223, 0.04685, 0.03092], 'mass': [27.97692653465, 28.9764946649, 29.973770136]}, 'Sm': {'abundance': [0.0307, 0.1499, 0.1124, 0.1382, 0.0738, 0.2675, 0.2275], 'mass': [143.9120065, 146.9149044, 147.9148292, 148.9171921, 149.9172829, 151.9197397, 153.9222169]}, 'Sn': {'abundance': [0.0097, 0.0066, 0.0034, 0.1454, 0.0768, 0.2422, 0.0859, 0.3258, 0.0463, 0.0579], 'mass': [111.90482387, 113.9027827, 114.903344699, 115.9017428, 116.90295398, 117.90160657, 118.90331117, 119.90220163, 121.9034438, 123.9052766]}, 'Sr': {'abundance': [0.0056, 0.0986, 0.07, 0.8258], 'mass': [83.9134191, 85.9092606, 86.9088775, 87.9056125]}, 'Ta': {'abundance': [0.0001201, 0.9998799], 'mass': [179.9474648, 180.9479958]}, 'Tb': {'abundance': [1.0], 'mass': [158.9253547]}, 'Tc': {'abundance': [1.0], 'mass': [98.0]}, 'Te': {'abundance': [0.0009, 0.0255, 0.0089, 0.0474, 0.0707, 0.1884, 0.3174, 0.3408], 'mass': [119.9040593, 121.9030435, 122.9042698, 123.9028171, 124.9044299, 125.9033109, 127.90446128, 129.906222748]}, 'Th': {'abundance': [1.0], 'mass': [232.0380558]}, 'Ti': {'abundance': [0.0825, 0.0744, 0.7372, 0.0541, 0.0518], 'mass': [45.95262772, 46.95175879, 47.94794198, 48.94786568, 49.94478689]}, 'Tl': {'abundance': [0.2952, 0.7048], 'mass': [202.9723446, 204.9744278]}, 'Tm': {'abundance': [1.0], 'mass': [168.9342179]}, 'U': {'abundance': [5.4e-05, 0.007204, 0.992742], 'mass': [234.0409523, 235.0439301, 238.0507884]}, 'V': {'abundance': [0.0025, 0.9975], 'mass': [49.94715601, 50.94395704]}, 'W': {'abundance': [0.0012, 0.265, 0.1431, 0.3064, 0.2843], 'mass': [179.9467108, 181.94820394, 182.95022275, 183.95093092, 185.9543628]}, 'X': {'abundance': [0.9, 0.1], 'mass': [1.0, 2.0]}, 'Xe': {'abundance': [0.000952, 0.00089, 0.019102, 0.264006, 0.04071, 0.212324, 0.269086, 0.104357, 0.088573], 'mass': [123.905892, 125.9042983, 127.903531, 128.9047808611, 129.903509349, 130.90508406, 131.9041550856, 133.90539466, 135.907214484]}, 'Y': {'abundance': [1.0], 'mass': [88.9058403]}, 'Yb': {'abundance': [0.00123, 0.02982, 0.1409, 0.2168, 0.16103, 0.32026, 0.12996], 'mass': [167.9338896, 169.9347664, 170.9363302, 171.9363859, 172.9382151, 173.9388664, 175.9425764]}, 'Zn': {'abundance': [0.4917, 0.2773, 0.0404, 0.1845, 0.0061], 'mass': [63.92914201, 65.92603381, 66.92712775, 67.92484455, 69.9253192]}, 'Zr': {'abundance': [0.5145, 0.1122, 0.1715, 0.1738, 0.028], 'mass': [89.9046977, 90.9056396, 91.9050347, 93.9063108, 95.9082714]}}¶
chemical element information in dict defined by nist_element.yaml
- alphabase.constants.atom.CHEM_ISOTOPE_DIST: Dict = DictType[unicode_type,array(float64, 1d, A)]<iv=None>({13C: [0.01 0.99 0. 0. 0. 0. 0. 0. 0. 0. ], 14N: [0.996337 0.003663 0. 0. 0. 0. 0. 0. 0. 0. ], 15N: [0.01 0.99 0. 0. 0. 0. 0. 0. 0. 0. ], 18O: [0.005 0.005 0.99 0. 0. 0. 0. 0. 0. 0. ], 2H: [0.01 0.99 0. 0. 0. 0. 0. 0. 0. 0. ], Ac: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Ag: [0.51839 0. 0.48161 0. 0. 0. 0. 0. 0. 0. ], Al: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Am: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Ar: [3.33600e-03 0.00000e+00 6.29000e-04 0.00000e+00 9.96035e-01 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00], As: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], At: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Au: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], B: [0.199 0.801 0. 0. 0. 0. 0. 0. 0. 0. ], Ba: [0.00106 0. 0.00101 0. 0.02417 0.06592 0.07854 0.11232 0.71698 0. ], Be: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Bi: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Bk: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Br: [0.5069 0. 0.4931 0. 0. 0. 0. 0. 0. 0. ], C: [0.9893 0.0107 0. 0. 0. 0. 0. 0. 0. 0. ], Ca: [9.6941e-01 0.0000e+00 6.4700e-03 1.3500e-03 2.0860e-02 0.0000e+00 4.0000e-05 0.0000e+00 1.8700e-03 0.0000e+00], Cd: [0. 0.0089 0. 0.1249 0.128 0.2413 0.1222 0.2873 0. 0.0749], Ce: [0.00185 0. 0.00251 0. 0.8845 0. 0.11114 0. 0. 0. ], Cf: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Cl: [0.7576 0. 0.2424 0. 0. 0. 0. 0. 0. 0. ], Cm: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Co: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Cr: [0.04345 0. 0.83789 0.09501 0.02365 0. 0. 0. 0. 0. ], Cs: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Cu: [0.6915 0. 0.3085 0. 0. 0. 0. 0. 0. 0. ], Dy: [0.00056 0. 0.00095 0. 0.02329 0.18889 0.25475 0.24896 0.2826 0. ], Er: [0.00139 0. 0.01601 0. 0.33503 0.22869 0.26978 0. 0.1491 0. ], Es: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Eu: [0.4781 0. 0.5219 0. 0. 0. 0. 0. 0. 0. ], F: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Fe: [0.05845 0. 0.91754 0.02119 0.00282 0. 0. 0. 0. 0. ], Fm: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Fr: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Ga: [0.60108 0. 0.39892 0. 0. 0. 0. 0. 0. 0. ], Gd: [0.002 0. 0.0218 0.148 0.2047 0.1565 0.2484 0. 0.2186 0. ], Ge: [0.2057 0. 0.2745 0.0775 0.365 0. 0.0773 0. 0. 0. ], H: [9.99885e-01 1.15000e-04 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00], He: [1.3400000e-06 9.9999866e-01 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00], Hf: [0.0016 0. 0.0526 0.186 0.2728 0.1362 0.3508 0. 0. 0. ], Hg: [0.0015 0. 0.0997 0.1687 0.231 0.1318 0.2986 0. 0.0687 0. ], Ho: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], I: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], In: [0.0429 0. 0.9571 0. 0. 0. 0. 0. 0. 0. ], Ir: [0.373 0. 0.627 0. 0. 0. 0. 0. 0. 0. ], K: [9.32581e-01 1.17000e-04 6.73020e-02 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00], Kr: [0.00355 0. 0.02286 0. 0.11593 0.115 0.56987 0. 0.17279 0. ], La: [8.881000e-04 9.991119e-01 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00], Li: [0.0759 0.9241 0. 0. 0. 0. 0. 0. 0. 0. ], Lr: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Lu: [0.97401 0.02599 0. 0. 0. 0. 0. 0. 0. 0. ], Md: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Mg: [0.7899 0.1 0.1101 0. 0. 0. 0. 0. 0. 0. ], Mn: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Mo: [0.1453 0. 0.0915 0.1584 0.1667 0.096 0.2439 0. 0.0982 0. ], N: [0.99636 0.00364 0. 0. 0. 0. 0. 0. 0. 0. ], Na: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Nb: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Nd: [0.27152 0.12174 0.23798 0.08293 0.17189 0. 0.05756 0. 0.05638 0. ], Ne: [0.9048 0.0027 0.0925 0. 0. 0. 0. 0. 0. 0. ], Ni: [0.68077 0. 0.26223 0.011399 0.036346 0. 0.009255 0. 0. 0. ], No: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Np: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], O: [9.9757e-01 3.8000e-04 2.0500e-03 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00], Os: [2.000e-04 0.000e+00 1.590e-02 1.960e-02 1.324e-01 1.615e-01 2.626e-01 0.000e+00 4.078e-01 0.000e+00], P: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Pa: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Pb: [0.014 0. 0.241 0.221 0.524 0. 0. 0. 0. 0. ], Pd: [0.0102 0. 0.1114 0.2233 0.2733 0. 0.2646 0. 0.1172 0. ], Pm: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Po: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Pr: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Pt: [1.200e-04 0.000e+00 7.820e-03 0.000e+00 3.286e-01 3.378e-01 2.521e-01 0.000e+00 7.356e-02 0.000e+00], Pu: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Ra: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Rb: [0.7217 0. 0.2783 0. 0. 0. 0. 0. 0. 0. ], Re: [0.374 0. 0.626 0. 0. 0. 0. 0. 0. 0. ], Rh: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Rn: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Ru: [0.0554 0. 0.0187 0.1276 0.126 0.1706 0.3155 0. 0.1862 0. ], S: [9.499e-01 7.500e-03 4.250e-02 0.000e+00 1.000e-04 0.000e+00 0.000e+00 0.000e+00 0.000e+00 0.000e+00], Sb: [0.5721 0. 0.4279 0. 0. 0. 0. 0. 0. 0. ], Sc: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Se: [0.0089 0. 0.0937 0.0763 0.2377 0. 0.4961 0. 0.0873 0. ], Si: [0.92223 0.04685 0.03092 0. 0. 0. 0. 0. 0. 0. ], Sm: [0. 0. 0.1499 0.1124 0.1382 0.0738 0. 0.2675 0. 0.2275], Sn: [0.0066 0.0034 0.1454 0.0768 0.2422 0.0859 0.3258 0. 0.0463 0. ], Sr: [0.0056 0. 0.0986 0.07 0.8258 0. 0. 0. 0. 0. ], Ta: [1.201000e-04 9.998799e-01 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00], Tb: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Tc: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Te: [0. 0.0255 0.0089 0.0474 0.0707 0.1884 0. 0.3174 0. 0.3408], Th: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Ti: [0.0825 0.0744 0.7372 0.0541 0.0518 0. 0. 0. 0. 0. ], Tl: [0.2952 0. 0.7048 0. 0. 0. 0. 0. 0. 0. ], Tm: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], U: [5.40000e-05 7.20400e-03 0.00000e+00 0.00000e+00 9.92742e-01 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00 0.00000e+00], V: [0.0025 0.9975 0. 0. 0. 0. 0. 0. 0. 0. ], W: [0.0012 0. 0.265 0.1431 0.3064 0. 0.2843 0. 0. 0. ], X: [0.9 0.1 0. 0. 0. 0. 0. 0. 0. 0. ], Xe: [0. 0.019102 0.264006 0.04071 0.212324 0.269086 0. 0.104357 0. 0.088573], Y: [1. 0. 0. 0. 0. 0. 0. 0. 0. 0.], Yb: [0.00123 0. 0.02982 0.1409 0.2168 0.16103 0.32026 0. 0.12996 0. ], Zn: [0.4917 0. 0.2773 0.0404 0.1845 0. 0.0061 0. 0. 0. ], Zr: [0.5145 0.1122 0.1715 0. 0.1738 0. 0.028 0. 0. 0. ]})¶
np.ndarray of abundance distribution}
- Type:
{element
- alphabase.constants.atom.CHEM_MONO_IDX: Dict = DictType[unicode_type,int64]<iv=None>({13C: 1, 14N: 0, 15N: 1, 18O: 2, 2H: 1, Ac: 0, Ag: 0, Al: 0, Am: 0, Ar: 4, As: 0, At: 0, Au: 0, B: 1, Ba: 8, Be: 0, Bi: 0, Bk: 0, Br: 0, C: 0, Ca: 0, Cd: 7, Ce: 4, Cf: 0, Cl: 0, Cm: 0, Co: 0, Cr: 2, Cs: 0, Cu: 0, Dy: 8, Er: 4, Es: 0, Eu: 2, F: 0, Fe: 2, Fm: 0, Fr: 0, Ga: 0, Gd: 6, Ge: 4, H: 0, He: 1, Hf: 6, Hg: 6, Ho: 0, I: 0, In: 2, Ir: 2, K: 0, Kr: 6, La: 1, Li: 1, Lr: 0, Lu: 0, Md: 0, Mg: 0, Mn: 0, Mo: 6, N: 0, Na: 0, Nb: 0, Nd: 0, Ne: 0, Ni: 0, No: 0, Np: 0, O: 0, Os: 8, P: 0, Pa: 0, Pb: 4, Pd: 4, Pm: 0, Po: 0, Pr: 0, Pt: 5, Pu: 0, Ra: 0, Rb: 0, Re: 2, Rh: 0, Rn: 0, Ru: 6, S: 0, Sb: 0, Sc: 0, Se: 6, Si: 0, Sm: 7, Sn: 6, Sr: 4, Ta: 1, Tb: 0, Tc: 0, Te: 9, Th: 0, Ti: 2, Tl: 2, Tm: 0, U: 4, V: 1, W: 4, X: 0, Xe: 5, Y: 0, Yb: 6, Zn: 0, Zr: 0})¶
int (mono position)}
- Type:
{element
- alphabase.constants.atom.CHEM_MONO_MASS = {'13C': np.float64(13.00335483507), '14N': np.float64(14.00307400443), '15N': np.float64(15.00010889888), '18O': np.float64(17.99915961286), '2H': np.float64(2.01410177812), 'Ac': np.float64(227.028), 'Ag': np.float64(106.9050916), 'Al': np.float64(26.98153853), 'Am': np.float64(243.0), 'Ar': np.float64(39.9623831237), 'As': np.float64(74.92159457), 'At': np.float64(210.0), 'Au': np.float64(196.96656879), 'B': np.float64(11.00930536), 'Ba': np.float64(137.905247), 'Be': np.float64(9.012183065), 'Bi': np.float64(208.9803991), 'Bk': np.float64(247.0), 'Br': np.float64(78.9183376), 'C': np.float64(12.0), 'Ca': np.float64(39.962590863), 'Cd': np.float64(113.90336509), 'Ce': np.float64(139.9054431), 'Cf': np.float64(251.0), 'Cl': np.float64(34.968852682), 'Cm': np.float64(247.0), 'Co': np.float64(58.93319429), 'Cr': np.float64(51.94050623), 'Cs': np.float64(132.905451961), 'Cu': np.float64(62.92959772), 'Dy': np.float64(163.9291819), 'Er': np.float64(165.9302995), 'Es': np.float64(252.0), 'Eu': np.float64(152.921238), 'F': np.float64(18.99840316273), 'Fe': np.float64(55.93493633), 'Fm': np.float64(257.0), 'Fr': np.float64(223.0), 'Ga': np.float64(68.9255735), 'Gd': np.float64(157.9241123), 'Ge': np.float64(73.921177761), 'H': np.float64(1.00782503223), 'He': np.float64(4.00260325413), 'Hf': np.float64(179.946557), 'Hg': np.float64(201.9706434), 'Ho': np.float64(164.9303288), 'I': np.float64(126.9044719), 'In': np.float64(114.903878776), 'Ir': np.float64(192.9629216), 'K': np.float64(38.9637064864), 'Kr': np.float64(83.9114977282), 'La': np.float64(138.9063563), 'Li': np.float64(7.0160034366), 'Lr': np.float64(260.0), 'Lu': np.float64(174.9407752), 'Md': np.float64(258.0), 'Mg': np.float64(23.985041697), 'Mn': np.float64(54.93804391), 'Mo': np.float64(97.90540482), 'N': np.float64(14.00307400443), 'Na': np.float64(22.989769282), 'Nb': np.float64(92.906373), 'Nd': np.float64(141.907729), 'Ne': np.float64(19.9924401762), 'Ni': np.float64(57.93534241), 'No': np.float64(259.0), 'Np': np.float64(237.048), 'O': np.float64(15.99491461957), 'Os': np.float64(191.961477), 'P': np.float64(30.97376199842), 'Pa': np.float64(231.0358842), 'Pb': np.float64(207.9766525), 'Pd': np.float64(105.9034804), 'Pm': np.float64(145.0), 'Po': np.float64(209.0), 'Pr': np.float64(140.9076576), 'Pt': np.float64(194.9647917), 'Pu': np.float64(244.0), 'Ra': np.float64(226.025), 'Rb': np.float64(84.9117897379), 'Re': np.float64(186.9557501), 'Rh': np.float64(102.905498), 'Rn': np.float64(222.0), 'Ru': np.float64(101.9043441), 'S': np.float64(31.9720711744), 'Sb': np.float64(120.903812), 'Sc': np.float64(44.95590828), 'Se': np.float64(79.9165218), 'Si': np.float64(27.97692653465), 'Sm': np.float64(151.9197397), 'Sn': np.float64(119.90220163), 'Sr': np.float64(87.9056125), 'Ta': np.float64(180.9479958), 'Tb': np.float64(158.9253547), 'Tc': np.float64(98.0), 'Te': np.float64(129.906222748), 'Th': np.float64(232.0380558), 'Ti': np.float64(47.94794198), 'Tl': np.float64(204.9744278), 'Tm': np.float64(168.9342179), 'U': np.float64(238.0507884), 'V': np.float64(50.94395704), 'W': np.float64(183.95093092), 'X': np.float64(1.0), 'Xe': np.float64(131.9041550856), 'Y': np.float64(88.9058403), 'Yb': np.float64(173.9388664), 'Zn': np.float64(63.92914201), 'Zr': np.float64(89.9046977)}¶
mass}
- Type:
{element
- class alphabase.constants.atom.ChemicalCompositonFormula(formula=None)[source][source]¶
Bases:
objectInitialize the ChemicalCompositonFormula with a given formula.
- Parameters:
formula (str) – The chemical formula as a string.
- Return type:
None
Methods:
__init__([formula])from_smiles(smiles)Create a ChemicalCompositonFormula instance from a SMILES string.
- classmethod from_smiles(smiles: str) ChemicalCompositonFormula[source][source]¶
Create a ChemicalCompositonFormula instance from a SMILES string.
- Parameters:
smiles (str) – The SMILES representation of the molecule.
- Returns:
An instance of the class based on the SMILES string.
- Return type:
- Raises:
ValueError – If the SMILES string is invalid and can’t be converted to an RDKit molecule.
- alphabase.constants.atom.calc_mass_from_formula(formula: str)[source][source]¶
Calculates the mass of the formula`
- Parameters:
formula (str) – e.g. H(1)C(2)O(3)
- Returns:
mass of the formula
- Return type:
float
- alphabase.constants.atom.load_elem_yaml(yaml_file: str)[source][source]¶
Load built-in or user-defined element yaml file. Default yaml is: os.path.join(_base_dir, ‘nist_element.yaml’)
- alphabase.constants.atom.parse_formula(formula: str) list[source][source]¶
Given a formula (str, e.g. H(1)C(2)O(3)), it generates [(‘H’, 2), (‘C’, 2), (‘O’, 1)]
- alphabase.constants.atom.truncate_isotope(isotopes: ndarray, mono_idx: int) tuple[source]¶
For a given isotope distribution (intensity patterns), this function truncates the distribution by top MAX_ISOTOPE_LEN neighbors those contain the monoisotopic peak pointed by mono_idx.
- Parameters:
isotopes (np.ndarray) – Isotope patterns with size > MAX_ISOTOPE_LEN.
mono_idx (int) – Monoisotopic peak position (index) in the isotope patterns
- Returns:
int – the new position of mono_idx
int – the start position of the truncated isotopes
int – the end position of the truncated isotopes
- alphabase.constants.atom.update_atom_infos(new_atom_info: Dict)[source][source]¶
Update the atom information in CHEM_INFO_DICT.
- Parameters:
new_atom_info (Dict) – A dictionary specifying new isotopic abundances and masses.
Examples
Replacing N with 15N
{"N": {"abundance": [0.01, 0.99]}, {"mass": [14.00307400443, 15.00010889888]}, }