NAME
Chemistry::PeriodicTable - Provide access to chemical element properties
VERSION
version 0.0501
SYNOPSIS
use Chemistry::PeriodicTable ();
my $pt = Chemistry::PeriodicTable->new;
my $filename = $pt->as_file;
my $headers = $pt->header;
my $symbols = $pt->symbols; # element properties keyed by symbol
$pt->number('H'); # 1
$pt->number('hydrogen'); # 1
$pt->name(1); # Hydrogen
$pt->name('H'); # Hydrogen
$pt->symbol(1); # H
$pt->symbol('hydrogen'); # H
$pt->value('H', 'weight'); # 1.00794
$pt->value(118, 'weight'); # 294
$pt->value('hydrogen', 'Atomic Radius'); # 0.79
DESCRIPTION
Chemistry::PeriodicTable
provides access to chemical element properties.
ATTRIBUTES
symbols
$symbols = $pt->symbols;
The computed hash-reference of the element properties keyed by symbol.
header
$headers = $pt->header;
The computed array-reference of the property headers.
These are:
0 Atomic Number
1 Element
2 Symbol
3 Atomic Weight
4 Period
5 Group
6 Phase
7 Most Stable Crystal
8 Type
9 Ionic Radius
10 Atomic Radius
11 Electronegativity
12 First Ionization Potential
13 Density
14 Melting Point (K)
15 Boiling Point (K)
16 Isotopes
17 Specific Heat Capacity
18 Electron Configuration
19 Display Row
20 Display Column
METHODS
new
$pt = Chemistry::PeriodicTable->new;
Create a new Chemistry::PeriodicTable
object.
as_file
$filename = $pt->as_file;
Return the data filename location.
number
$n = $pt->number($symbol);
$n = $pt->number($name);
Return the atomic number of either a symbol or name.
name
$n = $pt->name($number);
$n = $pt->name($symbol);
Return the atom name of either an atomic number or symbol.
symbol
$s = $pt->symbol($number);
$s = $pt->symbol($name);
Return the atomic symbol of either an atomic number or name.
value
$v = $pt->value($number, $string);
$v = $pt->value($name, $string);
$v = $pt->value($symbol, $string);
Return the atomic value of the atomic number, name, or symbol and a string indicating a unique part of a header name.
SEE ALSO
The t/01-methods.t file.
https://ptable.com/#Properties
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2023 by Gene Boggs.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)