New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

isotope-abundances

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isotope-abundances - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

25

generate_json.js

@@ -40,7 +40,28 @@ // Michael Porter 2017

real_isotopes[symbol].push([mass, abundance]);
real_isotopes[symbol].push([parseFloat(mass), parseFloat(abundance)]);
if (symbol === 'D') real_isotopes['H'].push([mass, abundance]);
if (symbol === 'D') real_isotopes['H'].push([parseFloat(mass), parseFloat(abundance)]);
});
for (var key in real_isotopes) {
var iso_list = real_isotopes[key];
var iso_data = [];
var numerator = 0.0;
var denominator = 0.0;
var avg_mass;
iso_list.forEach(function(entry){
numerator += entry[0] * entry[1];
denominator += entry[1];
iso_data.push({
'Mass': entry[0],
'Abundance': entry[1]
})
});
avg_mass = numerator / denominator;
real_isotopes[key] = {
'Mass': Math.round(avg_mass * 100000) / 100000,
'Isotopes': iso_data
}
}
fs.writeFile('./ISOTOPES.json', JSON.stringify(real_isotopes, null, 2), function(err){

@@ -47,0 +68,0 @@ if (err) throw err;

2

index.js
var isotopes = require('./ISOTOPES.json');
module.exports = function(element){
if (!(element in isotopes)) return [];
if (!(element in isotopes)) return {};
return isotopes[element];
}
{
"H": [
[
"1.00782503223",
"0.999885"
],
[
"2.01410177812",
"0.000115"
"H": {
"Mass": 1.00794,
"Isotopes": [
{
"Mass": 1.00782503223,
"Abundance": 0.999885
},
{
"Mass": 2.01410177812,
"Abundance": 0.000115
}
]
],
"D": [
[
"2.01410177812",
"0.000115"
},
"D": {
"Mass": 2.0141,
"Isotopes": [
{
"Mass": 2.01410177812,
"Abundance": 0.000115
}
]
],
"He": [
[
"3.0160293201",
"0.00000134"
],
[
"4.00260325413",
"0.99999866"
},
"He": {
"Mass": 4.0026,
"Isotopes": [
{
"Mass": 3.0160293201,
"Abundance": 0.00000134
},
{
"Mass": 4.00260325413,
"Abundance": 0.99999866
}
]
],
"Li": [
[
"6.0151228874",
"0.0759"
],
[
"7.0160034366",
"0.9241"
},
"Li": {
"Mass": 6.94004,
"Isotopes": [
{
"Mass": 6.0151228874,
"Abundance": 0.0759
},
{
"Mass": 7.0160034366,
"Abundance": 0.9241
}
]
],
"Be": [
[
"9.012183065",
"1"
},
"Be": {
"Mass": 9.01218,
"Isotopes": [
{
"Mass": 9.012183065,
"Abundance": 1
}
]
],
"B": [
[
"10.01293695",
"0.199"
],
[
"11.00930536",
"0.801"
},
"B": {
"Mass": 10.81103,
"Isotopes": [
{
"Mass": 10.01293695,
"Abundance": 0.199
},
{
"Mass": 11.00930536,
"Abundance": 0.801
}
]
],
"C": [
[
"12.0000000",
"0.9893"
],
[
"13.00335483507",
"0.0107"
},
"C": {
"Mass": 12.01074,
"Isotopes": [
{
"Mass": 12,
"Abundance": 0.9893
},
{
"Mass": 13.00335483507,
"Abundance": 0.0107
}
]
],
"N": [
[
"14.00307400443",
"0.99636"
],
[
"15.00010889888",
"0.00364"
},
"N": {
"Mass": 14.0067,
"Isotopes": [
{
"Mass": 14.00307400443,
"Abundance": 0.99636
},
{
"Mass": 15.00010889888,
"Abundance": 0.00364
}
]
],
"O": [
[
"15.99491461957",
"0.99757"
],
[
"16.99913175650",
"0.00038"
],
[
"17.99915961286",
"0.00205"
},
"O": {
"Mass": 15.9994,
"Isotopes": [
{
"Mass": 15.99491461957,
"Abundance": 0.99757
},
{
"Mass": 16.9991317565,
"Abundance": 0.00038
},
{
"Mass": 17.99915961286,
"Abundance": 0.00205
}
]
],
"F": [
[
"18.99840316273",
"1"
},
"F": {
"Mass": 18.9984,
"Isotopes": [
{
"Mass": 18.99840316273,
"Abundance": 1
}
]
],
"Ne": [
[
"19.9924401762",
"0.9048"
],
[
"20.993846685",
"0.0027"
],
[
"21.991385114",
"0.0925"
},
"Ne": {
"Mass": 20.18005,
"Isotopes": [
{
"Mass": 19.9924401762,
"Abundance": 0.9048
},
{
"Mass": 20.993846685,
"Abundance": 0.0027
},
{
"Mass": 21.991385114,
"Abundance": 0.0925
}
]
],
"Na": [
[
"22.9897692820",
"1"
},
"Na": {
"Mass": 22.98977,
"Isotopes": [
{
"Mass": 22.989769282,
"Abundance": 1
}
]
],
"Mg": [
[
"23.985041697",
"0.7899"
],
[
"24.985836976",
"0.1000"
],
[
"25.982592968",
"0.1101"
},
"Mg": {
"Mass": 24.30505,
"Isotopes": [
{
"Mass": 23.985041697,
"Abundance": 0.7899
},
{
"Mass": 24.985836976,
"Abundance": 0.1
},
{
"Mass": 25.982592968,
"Abundance": 0.1101
}
]
],
"Al": [
[
"26.98153853",
"1"
},
"Al": {
"Mass": 26.98154,
"Isotopes": [
{
"Mass": 26.98153853,
"Abundance": 1
}
]
],
"Si": [
[
"27.97692653465",
"0.92223"
],
[
"28.97649466490",
"0.04685"
],
[
"29.973770136",
"0.03092"
},
"Si": {
"Mass": 28.0855,
"Isotopes": [
{
"Mass": 27.97692653465,
"Abundance": 0.92223
},
{
"Mass": 28.9764946649,
"Abundance": 0.04685
},
{
"Mass": 29.973770136,
"Abundance": 0.03092
}
]
],
"P": [
[
"30.97376199842",
"1"
},
"P": {
"Mass": 30.97376,
"Isotopes": [
{
"Mass": 30.97376199842,
"Abundance": 1
}
]
],
"S": [
[
"31.9720711744",
"0.9499"
],
[
"32.9714589098",
"0.0075"
],
[
"33.967867004",
"0.0425"
],
[
"35.96708071",
"0.0001"
},
"S": {
"Mass": 32.06479,
"Isotopes": [
{
"Mass": 31.9720711744,
"Abundance": 0.9499
},
{
"Mass": 32.9714589098,
"Abundance": 0.0075
},
{
"Mass": 33.967867004,
"Abundance": 0.0425
},
{
"Mass": 35.96708071,
"Abundance": 0.0001
}
]
],
"Cl": [
[
"34.968852682",
"0.7576"
],
[
"36.965902602",
"0.2424"
},
"Cl": {
"Mass": 35.45294,
"Isotopes": [
{
"Mass": 34.968852682,
"Abundance": 0.7576
},
{
"Mass": 36.965902602,
"Abundance": 0.2424
}
]
],
"Ar": [
[
"35.967545105",
"0.003336"
],
[
"37.96273211",
"0.000629"
],
[
"39.9623831237",
"0.996035"
},
"Ar": {
"Mass": 39.9478,
"Isotopes": [
{
"Mass": 35.967545105,
"Abundance": 0.003336
},
{
"Mass": 37.96273211,
"Abundance": 0.000629
},
{
"Mass": 39.9623831237,
"Abundance": 0.996035
}
]
],
"K": [
[
"38.9637064864",
"0.932581"
],
[
"39.963998166",
"0.000117"
],
[
"40.9618252579",
"0.067302"
},
"K": {
"Mass": 39.0983,
"Isotopes": [
{
"Mass": 38.9637064864,
"Abundance": 0.932581
},
{
"Mass": 39.963998166,
"Abundance": 0.000117
},
{
"Mass": 40.9618252579,
"Abundance": 0.067302
}
]
],
"Ca": [
[
"39.962590863",
"0.96941"
],
[
"41.95861783",
"0.00647"
],
[
"42.95876644",
"0.00135"
],
[
"43.95548156",
"0.02086"
],
[
"45.9536890",
"0.00004"
],
[
"47.95252276",
"0.00187"
},
"Ca": {
"Mass": 40.07802,
"Isotopes": [
{
"Mass": 39.962590863,
"Abundance": 0.96941
},
{
"Mass": 41.95861783,
"Abundance": 0.00647
},
{
"Mass": 42.95876644,
"Abundance": 0.00135
},
{
"Mass": 43.95548156,
"Abundance": 0.02086
},
{
"Mass": 45.953689,
"Abundance": 0.00004
},
{
"Mass": 47.95252276,
"Abundance": 0.00187
}
]
],
"Sc": [
[
"44.95590828",
"1"
},
"Sc": {
"Mass": 44.95591,
"Isotopes": [
{
"Mass": 44.95590828,
"Abundance": 1
}
]
],
"Ti": [
[
"45.95262772",
"0.0825"
],
[
"46.95175879",
"0.0744"
],
[
"47.94794198",
"0.7372"
],
[
"48.94786568",
"0.0541"
],
[
"49.94478689",
"0.0518"
},
"Ti": {
"Mass": 47.86674,
"Isotopes": [
{
"Mass": 45.95262772,
"Abundance": 0.0825
},
{
"Mass": 46.95175879,
"Abundance": 0.0744
},
{
"Mass": 47.94794198,
"Abundance": 0.7372
},
{
"Mass": 48.94786568,
"Abundance": 0.0541
},
{
"Mass": 49.94478689,
"Abundance": 0.0518
}
]
],
"V": [
[
"49.94715601",
"0.00250"
],
[
"50.94395704",
"0.99750"
},
"V": {
"Mass": 50.94147,
"Isotopes": [
{
"Mass": 49.94715601,
"Abundance": 0.0025
},
{
"Mass": 50.94395704,
"Abundance": 0.9975
}
]
],
"Cr": [
[
"49.94604183",
"0.04345"
],
[
"51.94050623",
"0.83789"
],
[
"52.94064815",
"0.09501"
],
[
"53.93887916",
"0.02365"
},
"Cr": {
"Mass": 51.99613,
"Isotopes": [
{
"Mass": 49.94604183,
"Abundance": 0.04345
},
{
"Mass": 51.94050623,
"Abundance": 0.83789
},
{
"Mass": 52.94064815,
"Abundance": 0.09501
},
{
"Mass": 53.93887916,
"Abundance": 0.02365
}
]
],
"Mn": [
[
"54.93804391",
"1"
},
"Mn": {
"Mass": 54.93804,
"Isotopes": [
{
"Mass": 54.93804391,
"Abundance": 1
}
]
],
"Fe": [
[
"53.93960899",
"0.05845"
],
[
"55.93493633",
"0.91754"
],
[
"56.93539284",
"0.02119"
],
[
"57.93327443",
"0.00282"
},
"Fe": {
"Mass": 55.84514,
"Isotopes": [
{
"Mass": 53.93960899,
"Abundance": 0.05845
},
{
"Mass": 55.93493633,
"Abundance": 0.91754
},
{
"Mass": 56.93539284,
"Abundance": 0.02119
},
{
"Mass": 57.93327443,
"Abundance": 0.00282
}
]
],
"Co": [
[
"58.93319429",
"1"
},
"Co": {
"Mass": 58.93319,
"Isotopes": [
{
"Mass": 58.93319429,
"Abundance": 1
}
]
],
"Ni": [
[
"57.93534241",
"0.68077"
],
[
"59.93078588",
"0.26223"
],
[
"60.93105557",
"0.011399"
],
[
"61.92834537",
"0.036346"
],
[
"63.92796682",
"0.009255"
},
"Ni": {
"Mass": 58.69335,
"Isotopes": [
{
"Mass": 57.93534241,
"Abundance": 0.68077
},
{
"Mass": 59.93078588,
"Abundance": 0.26223
},
{
"Mass": 60.93105557,
"Abundance": 0.011399
},
{
"Mass": 61.92834537,
"Abundance": 0.036346
},
{
"Mass": 63.92796682,
"Abundance": 0.009255
}
]
],
"Cu": [
[
"62.92959772",
"0.6915"
],
[
"64.92778970",
"0.3085"
},
"Cu": {
"Mass": 63.54604,
"Isotopes": [
{
"Mass": 62.92959772,
"Abundance": 0.6915
},
{
"Mass": 64.9277897,
"Abundance": 0.3085
}
]
],
"Zn": [
[
"63.92914201",
"0.4917"
],
[
"65.92603381",
"0.2773"
],
[
"66.92712775",
"0.0404"
],
[
"67.92484455",
"0.1845"
],
[
"69.9253192",
"0.0061"
},
"Zn": {
"Mass": 65.37778,
"Isotopes": [
{
"Mass": 63.92914201,
"Abundance": 0.4917
},
{
"Mass": 65.92603381,
"Abundance": 0.2773
},
{
"Mass": 66.92712775,
"Abundance": 0.0404
},
{
"Mass": 67.92484455,
"Abundance": 0.1845
},
{
"Mass": 69.9253192,
"Abundance": 0.0061
}
]
],
"Ga": [
[
"68.9255735",
"0.60108"
],
[
"70.92470258",
"0.39892"
},
"Ga": {
"Mass": 69.72307,
"Isotopes": [
{
"Mass": 68.9255735,
"Abundance": 0.60108
},
{
"Mass": 70.92470258,
"Abundance": 0.39892
}
]
],
"Ge": [
[
"69.92424875",
"0.2057"
],
[
"71.922075826",
"0.2745"
],
[
"72.923458956",
"0.0775"
],
[
"73.921177761",
"0.3650"
],
[
"75.921402726",
"0.0773"
},
"Ge": {
"Mass": 72.62755,
"Isotopes": [
{
"Mass": 69.92424875,
"Abundance": 0.2057
},
{
"Mass": 71.922075826,
"Abundance": 0.2745
},
{
"Mass": 72.923458956,
"Abundance": 0.0775
},
{
"Mass": 73.921177761,
"Abundance": 0.365
},
{
"Mass": 75.921402726,
"Abundance": 0.0773
}
]
],
"As": [
[
"74.92159457",
"1"
},
"As": {
"Mass": 74.92159,
"Isotopes": [
{
"Mass": 74.92159457,
"Abundance": 1
}
]
],
"Se": [
[
"73.922475934",
"0.0089"
],
[
"75.919213704",
"0.0937"
],
[
"76.919914154",
"0.0763"
],
[
"77.91730928",
"0.2377"
],
[
"79.9165218",
"0.4961"
],
[
"81.9166995",
"0.0873"
},
"Se": {
"Mass": 78.95939,
"Isotopes": [
{
"Mass": 73.922475934,
"Abundance": 0.0089
},
{
"Mass": 75.919213704,
"Abundance": 0.0937
},
{
"Mass": 76.919914154,
"Abundance": 0.0763
},
{
"Mass": 77.91730928,
"Abundance": 0.2377
},
{
"Mass": 79.9165218,
"Abundance": 0.4961
},
{
"Mass": 81.9166995,
"Abundance": 0.0873
}
]
],
"Br": [
[
"78.9183376",
"0.5069"
],
[
"80.9162897",
"0.4931"
},
"Br": {
"Mass": 79.90353,
"Isotopes": [
{
"Mass": 78.9183376,
"Abundance": 0.5069
},
{
"Mass": 80.9162897,
"Abundance": 0.4931
}
]
],
"Kr": [
[
"77.92036494",
"0.00355"
],
[
"79.91637808",
"0.02286"
],
[
"81.91348273",
"0.11593"
],
[
"82.91412716",
"0.11500"
],
[
"83.9114977282",
"0.56987"
],
[
"85.9106106269",
"0.17279"
},
"Kr": {
"Mass": 83.798,
"Isotopes": [
{
"Mass": 77.92036494,
"Abundance": 0.00355
},
{
"Mass": 79.91637808,
"Abundance": 0.02286
},
{
"Mass": 81.91348273,
"Abundance": 0.11593
},
{
"Mass": 82.91412716,
"Abundance": 0.115
},
{
"Mass": 83.9114977282,
"Abundance": 0.56987
},
{
"Mass": 85.9106106269,
"Abundance": 0.17279
}
]
],
"Rb": [
[
"84.9117897379",
"0.7217"
],
[
"86.9091805310",
"0.2783"
},
"Rb": {
"Mass": 85.46766,
"Isotopes": [
{
"Mass": 84.9117897379,
"Abundance": 0.7217
},
{
"Mass": 86.909180531,
"Abundance": 0.2783
}
]
],
"Sr": [
[
"83.9134191",
"0.0056"
],
[
"85.9092606",
"0.0986"
],
[
"86.9088775",
"0.0700"
],
[
"87.9056125",
"0.8258"
},
"Sr": {
"Mass": 87.61664,
"Isotopes": [
{
"Mass": 83.9134191,
"Abundance": 0.0056
},
{
"Mass": 85.9092606,
"Abundance": 0.0986
},
{
"Mass": 86.9088775,
"Abundance": 0.07
},
{
"Mass": 87.9056125,
"Abundance": 0.8258
}
]
],
"Y": [
[
"88.9058403",
"1"
},
"Y": {
"Mass": 88.90584,
"Isotopes": [
{
"Mass": 88.9058403,
"Abundance": 1
}
]
],
"Zr": [
[
"89.9046977",
"0.5145"
],
[
"90.9056396",
"0.1122"
],
[
"91.9050347",
"0.1715"
],
[
"93.9063108",
"0.1738"
],
[
"95.9082714",
"0.0280"
},
"Zr": {
"Mass": 91.22364,
"Isotopes": [
{
"Mass": 89.9046977,
"Abundance": 0.5145
},
{
"Mass": 90.9056396,
"Abundance": 0.1122
},
{
"Mass": 91.9050347,
"Abundance": 0.1715
},
{
"Mass": 93.9063108,
"Abundance": 0.1738
},
{
"Mass": 95.9082714,
"Abundance": 0.028
}
]
],
"Nb": [
[
"92.9063730",
"1"
},
"Nb": {
"Mass": 92.90637,
"Isotopes": [
{
"Mass": 92.906373,
"Abundance": 1
}
]
],
"Mo": [
[
"91.90680796",
"0.1453"
],
[
"93.90508490",
"0.0915"
],
[
"94.90583877",
"0.1584"
],
[
"95.90467612",
"0.1667"
],
[
"96.90601812",
"0.0960"
],
[
"97.90540482",
"0.2439"
],
[
"99.9074718",
"0.0982"
},
"Mo": {
"Mass": 95.95979,
"Isotopes": [
{
"Mass": 91.90680796,
"Abundance": 0.1453
},
{
"Mass": 93.9050849,
"Abundance": 0.0915
},
{
"Mass": 94.90583877,
"Abundance": 0.1584
},
{
"Mass": 95.90467612,
"Abundance": 0.1667
},
{
"Mass": 96.90601812,
"Abundance": 0.096
},
{
"Mass": 97.90540482,
"Abundance": 0.2439
},
{
"Mass": 99.9074718,
"Abundance": 0.0982
}
]
],
"Ru": [
[
"95.90759025",
"0.0554"
],
[
"97.9052868",
"0.0187"
],
[
"98.9059341",
"0.1276"
],
[
"99.9042143",
"0.1260"
],
[
"100.9055769",
"0.1706"
],
[
"101.9043441",
"0.3155"
],
[
"103.9054275",
"0.1862"
},
"Ru": {
"Mass": 101.06494,
"Isotopes": [
{
"Mass": 95.90759025,
"Abundance": 0.0554
},
{
"Mass": 97.9052868,
"Abundance": 0.0187
},
{
"Mass": 98.9059341,
"Abundance": 0.1276
},
{
"Mass": 99.9042143,
"Abundance": 0.126
},
{
"Mass": 100.9055769,
"Abundance": 0.1706
},
{
"Mass": 101.9043441,
"Abundance": 0.3155
},
{
"Mass": 103.9054275,
"Abundance": 0.1862
}
]
],
"Rh": [
[
"102.9054980",
"1"
},
"Rh": {
"Mass": 102.9055,
"Isotopes": [
{
"Mass": 102.905498,
"Abundance": 1
}
]
],
"Pd": [
[
"101.9056022",
"0.0102"
],
[
"103.9040305",
"0.1114"
],
[
"104.9050796",
"0.2233"
],
[
"105.9034804",
"0.2733"
],
[
"107.9038916",
"0.2646"
],
[
"109.90517220",
"0.1172"
},
"Pd": {
"Mass": 106.41533,
"Isotopes": [
{
"Mass": 101.9056022,
"Abundance": 0.0102
},
{
"Mass": 103.9040305,
"Abundance": 0.1114
},
{
"Mass": 104.9050796,
"Abundance": 0.2233
},
{
"Mass": 105.9034804,
"Abundance": 0.2733
},
{
"Mass": 107.9038916,
"Abundance": 0.2646
},
{
"Mass": 109.9051722,
"Abundance": 0.1172
}
]
],
"Ag": [
[
"106.9050916",
"0.51839"
],
[
"108.9047553",
"0.48161"
},
"Ag": {
"Mass": 107.86815,
"Isotopes": [
{
"Mass": 106.9050916,
"Abundance": 0.51839
},
{
"Mass": 108.9047553,
"Abundance": 0.48161
}
]
],
"Cd": [
[
"105.9064599",
"0.0125"
],
[
"107.9041834",
"0.0089"
],
[
"109.90300661",
"0.1249"
],
[
"110.90418287",
"0.1280"
],
[
"111.90276287",
"0.2413"
],
[
"112.90440813",
"0.1222"
],
[
"113.90336509",
"0.2873"
],
[
"115.90476315",
"0.0749"
},
"Cd": {
"Mass": 112.41156,
"Isotopes": [
{
"Mass": 105.9064599,
"Abundance": 0.0125
},
{
"Mass": 107.9041834,
"Abundance": 0.0089
},
{
"Mass": 109.90300661,
"Abundance": 0.1249
},
{
"Mass": 110.90418287,
"Abundance": 0.128
},
{
"Mass": 111.90276287,
"Abundance": 0.2413
},
{
"Mass": 112.90440813,
"Abundance": 0.1222
},
{
"Mass": 113.90336509,
"Abundance": 0.2873
},
{
"Mass": 115.90476315,
"Abundance": 0.0749
}
]
],
"In": [
[
"112.90406184",
"0.0429"
],
[
"114.903878776",
"0.9571"
},
"In": {
"Mass": 114.81809,
"Isotopes": [
{
"Mass": 112.90406184,
"Abundance": 0.0429
},
{
"Mass": 114.903878776,
"Abundance": 0.9571
}
]
],
"Sn": [
[
"111.90482387",
"0.0097"
],
[
"113.9027827",
"0.0066"
],
[
"114.903344699",
"0.0034"
],
[
"115.90174280",
"0.1454"
],
[
"116.90295398",
"0.0768"
],
[
"117.90160657",
"0.2422"
],
[
"118.90331117",
"0.0859"
],
[
"119.90220163",
"0.3258"
],
[
"121.9034438",
"0.0463"
],
[
"123.9052766",
"0.0579"
},
"Sn": {
"Mass": 118.71011,
"Isotopes": [
{
"Mass": 111.90482387,
"Abundance": 0.0097
},
{
"Mass": 113.9027827,
"Abundance": 0.0066
},
{
"Mass": 114.903344699,
"Abundance": 0.0034
},
{
"Mass": 115.9017428,
"Abundance": 0.1454
},
{
"Mass": 116.90295398,
"Abundance": 0.0768
},
{
"Mass": 117.90160657,
"Abundance": 0.2422
},
{
"Mass": 118.90331117,
"Abundance": 0.0859
},
{
"Mass": 119.90220163,
"Abundance": 0.3258
},
{
"Mass": 121.9034438,
"Abundance": 0.0463
},
{
"Mass": 123.9052766,
"Abundance": 0.0579
}
]
],
"Sb": [
[
"120.9038120",
"0.5721"
],
[
"122.9042132",
"0.4279"
},
"Sb": {
"Mass": 121.75978,
"Isotopes": [
{
"Mass": 120.903812,
"Abundance": 0.5721
},
{
"Mass": 122.9042132,
"Abundance": 0.4279
}
]
],
"Te": [
[
"119.9040593",
"0.0009"
],
[
"121.9030435",
"0.0255"
],
[
"122.9042698",
"0.0089"
],
[
"123.9028171",
"0.0474"
],
[
"124.9044299",
"0.0707"
],
[
"125.9033109",
"0.1884"
],
[
"127.90446128",
"0.3174"
],
[
"129.906222748",
"0.3408"
},
"Te": {
"Mass": 127.60313,
"Isotopes": [
{
"Mass": 119.9040593,
"Abundance": 0.0009
},
{
"Mass": 121.9030435,
"Abundance": 0.0255
},
{
"Mass": 122.9042698,
"Abundance": 0.0089
},
{
"Mass": 123.9028171,
"Abundance": 0.0474
},
{
"Mass": 124.9044299,
"Abundance": 0.0707
},
{
"Mass": 125.9033109,
"Abundance": 0.1884
},
{
"Mass": 127.90446128,
"Abundance": 0.3174
},
{
"Mass": 129.906222748,
"Abundance": 0.3408
}
]
],
"I": [
[
"126.9044719",
"1"
},
"I": {
"Mass": 126.90447,
"Isotopes": [
{
"Mass": 126.9044719,
"Abundance": 1
}
]
],
"Xe": [
[
"123.9058920",
"0.000952"
],
[
"125.9042983",
"0.000890"
],
[
"127.9035310",
"0.019102"
],
[
"128.9047808611",
"0.264006"
],
[
"129.903509349",
"0.040710"
],
[
"130.90508406",
"0.212324"
],
[
"131.9041550856",
"0.269086"
],
[
"133.90539466",
"0.104357"
],
[
"135.907214484",
"0.088573"
},
"Xe": {
"Mass": 131.29276,
"Isotopes": [
{
"Mass": 123.905892,
"Abundance": 0.000952
},
{
"Mass": 125.9042983,
"Abundance": 0.00089
},
{
"Mass": 127.903531,
"Abundance": 0.019102
},
{
"Mass": 128.9047808611,
"Abundance": 0.264006
},
{
"Mass": 129.903509349,
"Abundance": 0.04071
},
{
"Mass": 130.90508406,
"Abundance": 0.212324
},
{
"Mass": 131.9041550856,
"Abundance": 0.269086
},
{
"Mass": 133.90539466,
"Abundance": 0.104357
},
{
"Mass": 135.907214484,
"Abundance": 0.088573
}
]
],
"Cs": [
[
"132.9054519610",
"1"
},
"Cs": {
"Mass": 132.90545,
"Isotopes": [
{
"Mass": 132.905451961,
"Abundance": 1
}
]
],
"Ba": [
[
"129.9063207",
"0.00106"
],
[
"131.9050611",
"0.00101"
],
[
"133.90450818",
"0.02417"
],
[
"134.90568838",
"0.06592"
],
[
"135.90457573",
"0.07854"
],
[
"136.90582714",
"0.11232"
],
[
"137.90524700",
"0.71698"
},
"Ba": {
"Mass": 137.32689,
"Isotopes": [
{
"Mass": 129.9063207,
"Abundance": 0.00106
},
{
"Mass": 131.9050611,
"Abundance": 0.00101
},
{
"Mass": 133.90450818,
"Abundance": 0.02417
},
{
"Mass": 134.90568838,
"Abundance": 0.06592
},
{
"Mass": 135.90457573,
"Abundance": 0.07854
},
{
"Mass": 136.90582714,
"Abundance": 0.11232
},
{
"Mass": 137.905247,
"Abundance": 0.71698
}
]
],
"La": [
[
"137.9071149",
"0.0008881"
],
[
"138.9063563",
"0.9991119"
},
"La": {
"Mass": 138.90547,
"Isotopes": [
{
"Mass": 137.9071149,
"Abundance": 0.0008881
},
{
"Mass": 138.9063563,
"Abundance": 0.9991119
}
]
],
"Ce": [
[
"135.90712921",
"0.00185"
],
[
"137.905991",
"0.00251"
],
[
"139.9054431",
"0.88450"
],
[
"141.9092504",
"0.11114"
},
"Ce": {
"Mass": 140.11573,
"Isotopes": [
{
"Mass": 135.90712921,
"Abundance": 0.00185
},
{
"Mass": 137.905991,
"Abundance": 0.00251
},
{
"Mass": 139.9054431,
"Abundance": 0.8845
},
{
"Mass": 141.9092504,
"Abundance": 0.11114
}
]
],
"Pr": [
[
"140.9076576",
"1"
},
"Pr": {
"Mass": 140.90766,
"Isotopes": [
{
"Mass": 140.9076576,
"Abundance": 1
}
]
],
"Nd": [
[
"141.9077290",
"0.27152"
],
[
"142.9098200",
"0.12174"
],
[
"143.9100930",
"0.23798"
],
[
"144.9125793",
"0.08293"
],
[
"145.9131226",
"0.17189"
],
[
"147.9168993",
"0.05756"
],
[
"149.9209022",
"0.05638"
},
"Nd": {
"Mass": 144.2416,
"Isotopes": [
{
"Mass": 141.907729,
"Abundance": 0.27152
},
{
"Mass": 142.90982,
"Abundance": 0.12174
},
{
"Mass": 143.910093,
"Abundance": 0.23798
},
{
"Mass": 144.9125793,
"Abundance": 0.08293
},
{
"Mass": 145.9131226,
"Abundance": 0.17189
},
{
"Mass": 147.9168993,
"Abundance": 0.05756
},
{
"Mass": 149.9209022,
"Abundance": 0.05638
}
]
],
"Sm": [
[
"143.9120065",
"0.0307"
],
[
"146.9149044",
"0.1499"
],
[
"147.9148292",
"0.1124"
],
[
"148.9171921",
"0.1382"
],
[
"149.9172829",
"0.0738"
],
[
"151.9197397",
"0.2675"
],
[
"153.9222169",
"0.2275"
},
"Sm": {
"Mass": 150.36636,
"Isotopes": [
{
"Mass": 143.9120065,
"Abundance": 0.0307
},
{
"Mass": 146.9149044,
"Abundance": 0.1499
},
{
"Mass": 147.9148292,
"Abundance": 0.1124
},
{
"Mass": 148.9171921,
"Abundance": 0.1382
},
{
"Mass": 149.9172829,
"Abundance": 0.0738
},
{
"Mass": 151.9197397,
"Abundance": 0.2675
},
{
"Mass": 153.9222169,
"Abundance": 0.2275
}
]
],
"Eu": [
[
"150.9198578",
"0.4781"
],
[
"152.9212380",
"0.5219"
},
"Eu": {
"Mass": 151.96438,
"Isotopes": [
{
"Mass": 150.9198578,
"Abundance": 0.4781
},
{
"Mass": 152.921238,
"Abundance": 0.5219
}
]
],
"Gd": [
[
"151.9197995",
"0.0020"
],
[
"153.9208741",
"0.0218"
],
[
"154.9226305",
"0.1480"
],
[
"155.9221312",
"0.2047"
],
[
"156.9239686",
"0.1565"
],
[
"157.9241123",
"0.2484"
],
[
"159.9270624",
"0.2186"
},
"Gd": {
"Mass": 157.25213,
"Isotopes": [
{
"Mass": 151.9197995,
"Abundance": 0.002
},
{
"Mass": 153.9208741,
"Abundance": 0.0218
},
{
"Mass": 154.9226305,
"Abundance": 0.148
},
{
"Mass": 155.9221312,
"Abundance": 0.2047
},
{
"Mass": 156.9239686,
"Abundance": 0.1565
},
{
"Mass": 157.9241123,
"Abundance": 0.2484
},
{
"Mass": 159.9270624,
"Abundance": 0.2186
}
]
],
"Tb": [
[
"158.9253547",
"1"
},
"Tb": {
"Mass": 158.92535,
"Isotopes": [
{
"Mass": 158.9253547,
"Abundance": 1
}
]
],
"Dy": [
[
"155.9242847",
"0.00056"
],
[
"157.9244159",
"0.00095"
],
[
"159.9252046",
"0.02329"
],
[
"160.9269405",
"0.18889"
],
[
"161.9268056",
"0.25475"
],
[
"162.9287383",
"0.24896"
],
[
"163.9291819",
"0.28260"
},
"Dy": {
"Mass": 162.49947,
"Isotopes": [
{
"Mass": 155.9242847,
"Abundance": 0.00056
},
{
"Mass": 157.9244159,
"Abundance": 0.00095
},
{
"Mass": 159.9252046,
"Abundance": 0.02329
},
{
"Mass": 160.9269405,
"Abundance": 0.18889
},
{
"Mass": 161.9268056,
"Abundance": 0.25475
},
{
"Mass": 162.9287383,
"Abundance": 0.24896
},
{
"Mass": 163.9291819,
"Abundance": 0.2826
}
]
],
"Ho": [
[
"164.9303288",
"1"
},
"Ho": {
"Mass": 164.93033,
"Isotopes": [
{
"Mass": 164.9303288,
"Abundance": 1
}
]
],
"Er": [
[
"161.9287884",
"0.00139"
],
[
"163.9292088",
"0.01601"
],
[
"165.9302995",
"0.33503"
],
[
"166.9320546",
"0.22869"
],
[
"167.9323767",
"0.26978"
],
[
"169.9354702",
"0.14910"
},
"Er": {
"Mass": 167.25908,
"Isotopes": [
{
"Mass": 161.9287884,
"Abundance": 0.00139
},
{
"Mass": 163.9292088,
"Abundance": 0.01601
},
{
"Mass": 165.9302995,
"Abundance": 0.33503
},
{
"Mass": 166.9320546,
"Abundance": 0.22869
},
{
"Mass": 167.9323767,
"Abundance": 0.26978
},
{
"Mass": 169.9354702,
"Abundance": 0.1491
}
]
],
"Tm": [
[
"168.9342179",
"1"
},
"Tm": {
"Mass": 168.93422,
"Isotopes": [
{
"Mass": 168.9342179,
"Abundance": 1
}
]
],
"Yb": [
[
"167.9338896",
"0.00123"
],
[
"169.9347664",
"0.02982"
],
[
"170.9363302",
"0.1409"
],
[
"171.9363859",
"0.2168"
],
[
"172.9382151",
"0.16103"
],
[
"173.9388664",
"0.32026"
],
[
"175.9425764",
"0.12996"
},
"Yb": {
"Mass": 173.05415,
"Isotopes": [
{
"Mass": 167.9338896,
"Abundance": 0.00123
},
{
"Mass": 169.9347664,
"Abundance": 0.02982
},
{
"Mass": 170.9363302,
"Abundance": 0.1409
},
{
"Mass": 171.9363859,
"Abundance": 0.2168
},
{
"Mass": 172.9382151,
"Abundance": 0.16103
},
{
"Mass": 173.9388664,
"Abundance": 0.32026
},
{
"Mass": 175.9425764,
"Abundance": 0.12996
}
]
],
"Lu": [
[
"174.9407752",
"0.97401"
],
[
"175.9426897",
"0.02599"
},
"Lu": {
"Mass": 174.96681,
"Isotopes": [
{
"Mass": 174.9407752,
"Abundance": 0.97401
},
{
"Mass": 175.9426897,
"Abundance": 0.02599
}
]
],
"Hf": [
[
"173.9400461",
"0.0016"
],
[
"175.9414076",
"0.0526"
],
[
"176.9432277",
"0.1860"
],
[
"177.9437058",
"0.2728"
],
[
"178.9458232",
"0.1362"
],
[
"179.9465570",
"0.3508"
},
"Hf": {
"Mass": 178.48498,
"Isotopes": [
{
"Mass": 173.9400461,
"Abundance": 0.0016
},
{
"Mass": 175.9414076,
"Abundance": 0.0526
},
{
"Mass": 176.9432277,
"Abundance": 0.186
},
{
"Mass": 177.9437058,
"Abundance": 0.2728
},
{
"Mass": 178.9458232,
"Abundance": 0.1362
},
{
"Mass": 179.946557,
"Abundance": 0.3508
}
]
],
"Ta": [
[
"179.9474648",
"0.0001201"
],
[
"180.9479958",
"0.9998799"
},
"Ta": {
"Mass": 180.94788,
"Isotopes": [
{
"Mass": 179.9474648,
"Abundance": 0.0001201
},
{
"Mass": 180.9479958,
"Abundance": 0.9998799
}
]
],
"W": [
[
"179.9467108",
"0.0012"
],
[
"181.94820394",
"0.2650"
],
[
"182.95022275",
"0.1431"
],
[
"183.95093092",
"0.3064"
],
[
"185.9543628",
"0.2843"
},
"W": {
"Mass": 183.84178,
"Isotopes": [
{
"Mass": 179.9467108,
"Abundance": 0.0012
},
{
"Mass": 181.94820394,
"Abundance": 0.265
},
{
"Mass": 182.95022275,
"Abundance": 0.1431
},
{
"Mass": 183.95093092,
"Abundance": 0.3064
},
{
"Mass": 185.9543628,
"Abundance": 0.2843
}
]
],
"Re": [
[
"184.9529545",
"0.3740"
],
[
"186.9557501",
"0.6260"
},
"Re": {
"Mass": 186.2067,
"Isotopes": [
{
"Mass": 184.9529545,
"Abundance": 0.374
},
{
"Mass": 186.9557501,
"Abundance": 0.626
}
]
],
"Os": [
[
"183.9524885",
"0.0002"
],
[
"185.9538350",
"0.0159"
],
[
"186.9557474",
"0.0196"
],
[
"187.9558352",
"0.1324"
],
[
"188.9581442",
"0.1615"
],
[
"189.9584437",
"0.2626"
],
[
"191.9614770",
"0.4078"
},
"Os": {
"Mass": 190.22486,
"Isotopes": [
{
"Mass": 183.9524885,
"Abundance": 0.0002
},
{
"Mass": 185.953835,
"Abundance": 0.0159
},
{
"Mass": 186.9557474,
"Abundance": 0.0196
},
{
"Mass": 187.9558352,
"Abundance": 0.1324
},
{
"Mass": 188.9581442,
"Abundance": 0.1615
},
{
"Mass": 189.9584437,
"Abundance": 0.2626
},
{
"Mass": 191.961477,
"Abundance": 0.4078
}
]
],
"Ir": [
[
"190.9605893",
"0.373"
],
[
"192.9629216",
"0.627"
},
"Ir": {
"Mass": 192.21605,
"Isotopes": [
{
"Mass": 190.9605893,
"Abundance": 0.373
},
{
"Mass": 192.9629216,
"Abundance": 0.627
}
]
],
"Pt": [
[
"189.9599297",
"0.00012"
],
[
"191.9610387",
"0.00782"
],
[
"193.9626809",
"0.3286"
],
[
"194.9647917",
"0.3378"
],
[
"195.96495209",
"0.2521"
],
[
"197.9678949",
"0.07356"
},
"Pt": {
"Mass": 195.08446,
"Isotopes": [
{
"Mass": 189.9599297,
"Abundance": 0.00012
},
{
"Mass": 191.9610387,
"Abundance": 0.00782
},
{
"Mass": 193.9626809,
"Abundance": 0.3286
},
{
"Mass": 194.9647917,
"Abundance": 0.3378
},
{
"Mass": 195.96495209,
"Abundance": 0.2521
},
{
"Mass": 197.9678949,
"Abundance": 0.07356
}
]
],
"Au": [
[
"196.96656879",
"1"
},
"Au": {
"Mass": 196.96657,
"Isotopes": [
{
"Mass": 196.96656879,
"Abundance": 1
}
]
],
"Hg": [
[
"195.9658326",
"0.0015"
],
[
"197.96676860",
"0.0997"
],
[
"198.96828064",
"0.1687"
],
[
"199.96832659",
"0.2310"
],
[
"200.97030284",
"0.1318"
],
[
"201.97064340",
"0.2986"
],
[
"203.97349398",
"0.0687"
},
"Hg": {
"Mass": 200.59917,
"Isotopes": [
{
"Mass": 195.9658326,
"Abundance": 0.0015
},
{
"Mass": 197.9667686,
"Abundance": 0.0997
},
{
"Mass": 198.96828064,
"Abundance": 0.1687
},
{
"Mass": 199.96832659,
"Abundance": 0.231
},
{
"Mass": 200.97030284,
"Abundance": 0.1318
},
{
"Mass": 201.9706434,
"Abundance": 0.2986
},
{
"Mass": 203.97349398,
"Abundance": 0.0687
}
]
],
"Tl": [
[
"202.9723446",
"0.2952"
],
[
"204.9744278",
"0.7048"
},
"Tl": {
"Mass": 204.38341,
"Isotopes": [
{
"Mass": 202.9723446,
"Abundance": 0.2952
},
{
"Mass": 204.9744278,
"Abundance": 0.7048
}
]
],
"Pb": [
[
"203.9730440",
"0.014"
],
[
"205.9744657",
"0.241"
],
[
"206.9758973",
"0.221"
],
[
"207.9766525",
"0.524"
},
"Pb": {
"Mass": 207.21691,
"Isotopes": [
{
"Mass": 203.973044,
"Abundance": 0.014
},
{
"Mass": 205.9744657,
"Abundance": 0.241
},
{
"Mass": 206.9758973,
"Abundance": 0.221
},
{
"Mass": 207.9766525,
"Abundance": 0.524
}
]
],
"Bi": [
[
"208.9803991",
"1"
},
"Bi": {
"Mass": 208.9804,
"Isotopes": [
{
"Mass": 208.9803991,
"Abundance": 1
}
]
],
"Th": [
[
"232.0380558",
"1"
},
"Th": {
"Mass": 232.03806,
"Isotopes": [
{
"Mass": 232.0380558,
"Abundance": 1
}
]
],
"Pa": [
[
"231.0358842",
"1"
},
"Pa": {
"Mass": 231.03588,
"Isotopes": [
{
"Mass": 231.0358842,
"Abundance": 1
}
]
],
"U": [
[
"234.0409523",
"0.000054"
],
[
"235.0439301",
"0.007204"
],
[
"238.0507884",
"0.992742"
},
"U": {
"Mass": 238.02891,
"Isotopes": [
{
"Mass": 234.0409523,
"Abundance": 0.000054
},
{
"Mass": 235.0439301,
"Abundance": 0.007204
},
{
"Mass": 238.0507884,
"Abundance": 0.992742
}
]
]
}
}
{
"name": "isotope-abundances",
"version": "1.0.0",
"version": "2.0.0",
"description": "A JavaScript library for working with isotope abundances",

@@ -5,0 +5,0 @@ "main": "index.js",

# isotope-abundances
A simple library to provide isotope abundances with JavaScript
***Please note that this package is now on version 2.0 and is no longer compatible with version 1.0. The return format of the data is now different.***
## Installation

@@ -14,6 +16,17 @@ npm install isotope-abundances --save

```
[ [ '1.00782503223', '0.999885' ],
[ '2.01410177812', '0.000115' ] ]
{
"Mass": 1.00794,
"Isotopes": [
{
"Mass": 1.00782503223,
"Abundance": 0.999885
},
{
"Mass": 2.01410177812,
"Abundance": 0.000115
}
]
}
```
The output for each isotope is an array of arrays where the first value is the mass value and the second value is the relative abundance of that isotope.
The output for each isotope is a JSON object where "Mass" contains the average mass of the atom and the "Isotopes" array contains the mass and abundance of each isotope.

@@ -20,0 +33,0 @@ ## Tests

@@ -5,9 +5,9 @@ var should = require('chai').should();

describe('Isotope Abundances', function() {
it('returns [] if no element specified', function() {
isoAbund('INVALID').should.deep.equal([]);
it('returns {} if no element specified', function() {
isoAbund('INVALID').should.deep.equal({});
});
it('two isotopes for Hydrogen', function() {
isoAbund('H').length.should.equal(2);
isoAbund('H').Isotopes.length.should.equal(2);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc