logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Chemistry::Isotope - Table of the isotopes exact mass data

Author

       Ivan Tubert-Brohman <itub@cpan.org>

Description

       This module contains the exact mass data from the table of the isotopes.  It has an exportable function,
       isotope_mass, which returns the mass of an atom in mass units given its mass number (A) and atomic number
       (Z); and a function isotope_abundance which returns a table with the natural abundance of the isotopes
       given an element symbol.

       The table of the masses includes 2931 nuclides and is taken from <http://ie.lbl.gov/txt/awm95.txt> (G.
       Audi and A.H. Wapstra, Nucl. Phys. A595, 409, 1995)

       The table of natural abundances includes 288 nuclides and is taken 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)
       Return the mass for the atom with the given mass number and atomic number, or undef if the nuclide is not
       in the data table.

   isotope_abundance($symbol)
       Returns a hash reference with the natural abundance information 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') returns the following structure:

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

Name

       Chemistry::Isotope - Table of the isotopes exact mass data

See Also

       Chemistry::Atom

       The PerlMol website <http://www.perlmol.org/>

Synopsis

           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

Version

       0.11

See Also