Chemis...sotope(3pm)

πŸ“¦
version 0.11 Β· 2 versions
  • 0.11 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.11 Β· fedora 44
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Chemistry::Isotope β€” the table of the isotopes exact mass data πŸ’–

okay bestie, gather round, because this is a User Contributed Perl Documentation page for Chemistry::Isotope (section 3pm), and it is genuinely so useful it's giving main character energy. it's the module that knows exactly how much every nuclide weighs. no cap. 🧚✨


✨ SYNOPSIS ✨

here's the vibe, look:

use Chemistry::Isotope ':all';

# get the exact atomic mass for an isotope
my $m  = isotope_mass(235, 92); # 235.043923094753

my $ab_table = isotope_abundance('C');
while (my ($A, $percent_ab) = each %$ab_table) {
    print "$A\t$percent_ab\n";
}
# this should print (the order may vary):
# 12    98.93
# 13    1.07

like. isotope_mass(235, 92) hands you 235.043923094753 and honestly? iconic. πŸ’…


🌸 DESCRIPTION 🌸

so this module is carrying the exact mass data from the table of the isotopes, and it has two things you can export:

  • isotope_mass β€” give it a mass number (A) and an atomic number (Z), and it returns the mass of that atom in mass units πŸ’–
  • isotope_abundance β€” give it an element symbol, and it returns a table with the natural abundance of that element's isotopes πŸ¦‹

the mass table is a whole big deal: it includes 2931 nuclides, and it's taken from <http://ie.lbl.gov/txt/awm95.txt> β€” that's G. Audi and A.H. Wapstra, Nucl. Phys. A595, 409, 1995. (yes bestie, real physics, real citation, we love to see it.)

the natural abundance table includes 288 nuclides, and it comes from the Commission on Atomic Weights and Isotopic Abundances report for the International Union of Pure and Applied Chemistry in Isotopic Compositions of the Elements 1989, Pure and Applied Chemistry, 1998, 70, 217. <http://www.iupac.org/publications/pac/1998/pdf/7001x0217.pdf> πŸ“š


πŸ”₯ FUNCTIONS πŸ”₯

isotope_mass($A, $Z)

returns the mass for the atom with the given mass number and atomic number 🫢

and if the nuclide isn't in the data table? it returns undef. no drama, just undef. πŸ’€

isotope_abundance($symbol)

returns a hash reference with the natural abundance info for the isotopes of a given element. the hash keys are the mass numbers, and the values are the abundance percentages. for example, isotope_abundance('C') gives you this whole structure:

{
    '13' => '1.07',
    '12' => '98.93'
};

carbon said "98.93% of me is the twelve one, and I said what I said." periodt. πŸ‘‘


⭐ VERSION ⭐

0.11


πŸ’œ SEE ALSO πŸ’œ


🌈 AUTHOR 🌈

Ivan Tubert-Brohman <itub@cpan.org> β€” thank you for your service, king 🫑


Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

lowkey important: those same-terms-as-Perl licensing vibes are the whole deal here, so respect them fr fr.

and that's the page, bestie! it shipped as perl v5.32.1, dated 2021-05-25, in the User Contributed Perl Documentation collection under Chemis...sotope(3pm) β€” slay, go weigh some atoms πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from