

          HP 48 G Series Periodic Table Library

         Copyright (c) Hewlett-Packard 1989-1993


1.  Introduction

The HP 48 Periodic Table Library is a RAM-based version
of the Periodic Table application that was originally
distributed in the HP 82211A HP Solve Equation Library
Card. This application is freeware, and may be
distributed freely as long as this copyright notice is
retained.


2.  Keystroke Identification

Text items that you enter, such as a name, number, or
molecular formula are written as you would type them.
Primary keys are enclosed in brackets ([]), such as
[ALPHA] or [ENTER]. Menu keys are enclosed in braces
({}), such as {PERTB}. The shift keys are written as
[leftshift] and [rightshift]. The arrow keys are written
as [v] (downarrow), [^] (leftarrow), [<] (leftarrow), and
[>] (rightarrow).


3.  Installing the Periodic Table

The Periodic Table is implemented as a library object,
with library ID number 703. To install the library,
perform the following steps:

   + Download the library ptlib to the HP 48 in binary
     mode.

   + Recall the library to the stack.

   + Purge the variable that the library was stored in.

   + Store the library in a port, such as port 0. For
     instance, when the library object is in level one of
     the stack, execute 0 [STO].

   + Turn the calculator off, then on again. The
     calculator will perform a system halt, which updates
     the system configuration to recognize the new
     library. The Periodic Table library will
     automatically attach itself to the HOME directory.

   + NOTE: This library will NOT work on the S Series.


4.  Removing the Periodic Table Library

To remove the Periodic Table library, perform the
following steps:

   + Ensure that the library does not appear on the stack
     as "Library 703:...". Either store the library in a
     variable or execute NEWOB to create a unique copy.

   + Switch to the HOME directory.

   + Enter the port-tagged library number. For instance,
     if the Periodic Table Library is stored in port 0
     enter :0:703, or if the library is store in port 2
     enter :2:703.

   + Duplicate the library number, execute DETACH
     ([leftshift] [LIBRARY] {DETAC}), then execute PURGE.

   + You may also wish to purge any instances of the
     reserved variable PTpar (described below).


5.  The Reserved Variable PTpar

The Periodic Table application saves information in a
variable named PTpar. This information includes the last
element viewed, the last property viewed, and the order
of properties in the property catalog.

When the Periodic Table is started, the current directory
is searched for the existence of PTpar. If this variable
does not exist, a new copy will be created.


6.  Periodic Table Version

Press [rightshift] [LIBRARY] {PRTBL} {PTVER} to display
the version number of the Periodic Table Library.


7.  Using the Periodic Table

To start the Periodic Table, execute PERTBL (press
[rightshift] [LIBRARY] {PRTBL} {PERTB}). The main
Periodic Table display shows a picture of the periodic
table. Each square represents one element. The black
pointer (1) marks the location of the current element.
For the current element, the display also shows the
element name (2), mass number (3), symbol (4), atomic
number (5), atomic weight (6), density (7), and physical
state (9) - solid, liquid, gas, or synthetic - at
standard temperature for gases and at room temperature
for others.

 ͻ
                SODIUM                                
  Ŀ             (2)               Ŀ               
                                                  
  Ŀ                   Ĵ (3) N   N     
                               23 NN  N (4) 
  Ĵ                   Ĵ     N N N     
  ۳ (1)                        11 N  NN aa  
  Ĵ (5) N   N aaa 
                                   
  Ĵ               
                                   
  Ĵ AT WT: (6)    
                     22.98977      
                 
                                               
                                         
                                                      
        Ŀ   DENSITY (7)   
                         0.97          
        Ĵ                 
 (8)SOL                                
                         
                                                      
 ͹
   TABLE    NAME    SYMB    ATWT    DENS    QUIT 
 ͼ

Each of these properties is listed fully with units in
the catalog of properties - see "Finding Element
Properties".

The Periodic Table is a special environment in which you
can find information about elements and molecules. The
following diagram shows how to switch among the displays
and catalogs.


      {TABLE}            {NAME}              {SYMB}
                                              
                                              
 ͻ   ͻ   ͻ
                                                   
  Grid Display     Name Catalog     Symbol Catalog 
                                                   
 ͼ   ͼ   ͼ
       
        [ENTER]        [ENTER]             [ENTER]
                                            
                                            
                                            
[ENTER]                                      
                 ͻ           
                          
                   Property List 
                                 
     {EXIT}        ͼ
                             
                 
                      {PLOT}  [ATTN]
                               
                               
                   ͻ
                                  
   Ķ Property Plot 
                                   
                    ͼ

In the main Periodic Table display, you can perform the
operations listed in the following table.


[v][^][<][>]  Moves the pointer in the table, wrapping
              around rows or columns. With [rightshift],
              moves the pointer to the extreme of the
              current row or column. [<] or [>] wraps to
              the adjacent row. [^] or [v] moves to or
              from the rare-earth area.

[alpha]       Enter the characters for a symbol or
              molecular formula, then press [ENTER].
              This moves the pointer to the element
              having the symbol entered, or calculates
              molecular weights. Multiple character entry
              is allowed.

{ATWT}        Puts the atomic weight of the current
              element on the stack.

{DENS}        Puts the density of the current element on
              the stack.

{QUIT}        Exits from the application.

[ATTN]        Exits from the application.


7.1  Using Catalogs

The Periodic Table uses catalogs to display lists of
names, symbols, or properties. These catalogs share a
common set of procedures for moving around, and are
similar to those built into the Equation Library and the
Constants Library.

The following table lists the operations you can perform.


[^]      Moves the highlight up through the catalog.
         (The highlight can wrap around to the bottom.)
         [leftshift][^] moves the highlight to the top of
         the display or up one display. [rightshift][^]
         moves the highlight to the top of the catalog.

[v]      Moves the highlight down through the catalog.
         (The highlight can wrap around to the top.)
         [leftshift][v] moves the highlight to the bottom
         of the display or down one display.
         [rightshift][v] moves the highlight to the
         bottom of the catalog.

[alpha]  Moves the highlight to the next line starting
         with the alpha character you type. (The
         highlight can wrap around to the top.)


7.2  Finding Element Names and Symbols

The Periodic Table provides two catalogs containing names
and symbols of elements in alphabetical order. You can
use these catalogs to find names or symbols or to make a
certain element the current element:


   + To find the symbol for a certain element name, press
     {NAME}. Use [^] and [v] to move to the element, or
     use [alpha] to enter the first letter of the name.

   + To find the name for a certain element symbol, press
     {SYMB}. Use [^] and [v] to move to the element, or
     use [alpha] to enter the first letter of the symbol.

   + To make a certain element the current element, do
     either of the previous steps, then press {TABLE}.

You can also find element properties from the name and
symbol catalogs - see the next topic.


7.3  Finding Element Properties

The Periodic Table contains a collection of physical
properties of elements, such as melting-point temperature
and heat of vaporization. Values are based on the
"Periodic Table of the Elements" published by the
Sargent-Welch Scientific Company - they may differ from
values from other sources.

To display the catalog of properties for a certain
element, follow these steps:


  1.  Select the element in one of these ways:

       + Move the pointer to the element in the Periodic
         Table display.

       + Press [alpha], type the symbol for the element,
         then press [ENTER].

       + Get the name or symbol catalog, then move the
         highlight to the element.

  2.  Press [ENTER].

The catalog shows each property name and value, including
units (if units are used).

The property catalog provides the operations listed in
the following table (including the operations common to
all catalogs). The property you point to last is the one
that's highlighted in the next property catalog.


[^][v]       Moves the highlight up or down the catalog.

[alpha]      Moves the highlight to specified alpha line.

[ENTER]      Shows a wide (...) item completely - press
             [ENTER] or [ATTN] to return to the catalog.

{PLOT}       Plots the highlighted property as a function
             of atomic number. (See "Plotting
             Properties".)

{UNIT*}      Indicates units used.

{UNIT}       Indicates units not used.

{MOVE}       Moves the highlighted property to the top of
             the catalog for this and future catalogs.

{->STK}      Puts the highlighted property in level 1 of
             the stack.

{EXIT}       Returns to the Periodic Table display at
             this element.

[ATTN]       Exits the Periodic Table application.

The following table lists the properties in the order
they're included in the Periodic Table, plus the type of
object associated with each property. Certain properties
are not numeric - they're represented as string objects.

                  Properties of Elements

ͻ
                Property            Object  Property 
                                     Type    Number  
Ķ
 Atomic Number                      Real        1    
 Mass Number*                       Real        2    
 Atomic Weight                      Unit        3    
 Density*                           Unit        4    
 Oxidation States*                  String      5    
 Electronic Configuration           String      6    
 State                              String      7    
 Melting Point                      Unit        8    
 Boiling Point                      Unit        9    
 Heat of Vaporization               Unit       10    
 Heat of Fusion                     Unit       11    
 Specific Heat                      Unit       12    
 Group (U.S. customary)             String     13    
 Family                             String     14    
 Crystal Structure                  String     15    
 Atomic Volume*                     Unit       16    
 Atomic Radius                      Unit       17    
 Covalent Radius                    Unit       18    
 Thermal Conductivity*              Unit       19    
 Electrical Conductivity*           Unit       20    
 First Ionization Potential         Unit       21    
 Electronegativity (Pauling's nbr.) Unit       22    
 Oxide Behavior                     String     23    
 Element Name**                     String     24    
 Element Symbol**                   Name       25    
ͼ
  * See the notes that follow this table.
 ** Not included in the property catalog, but listed in
    the title of the catalog.

Notes about properties: Mass number for a stable element
is based on the isotope with the highest percent
abundance; for a radioactive element, it's based on the
longest half-life. Density for a gas is at 273 K with
units of g/l; for others, it's at 300 K with units
g/cm^3. Oxidation states are in order of most stable to
least stable. Atomic volume for a gas is for its liquid
state at the boiling point; for others, it's derived from
the density at 300 K. Thermal conductivity is measured
at 300 K. Electrical conductivity is measured at 293 K.

Some properties for certain elements are annotated with
special information, such as indicating estimated values
or special conditions. For example, the note for the
atomic weight of francium indicates that the value is for
francium's most stable form. Such properties appear in
the catalog with * as the first character - you can
search for this annotation by pressing [alpha] [X]
(multiply). To see the property and annotation,
highlight it and press [ENTER].

If you have one or more properties that you use
frequently, you can change the catalog to make these
properties always appear at the top of the catalog. To
move a property to the top of the catalog (for this and
future catalogs), highlight the property you want at the
top, then press {MOVE}. (Note that this does not affect
the property numbers listed in the previous table.)  To
restore all properties to their original order, purge the
variable PTpar.


7.4  Plotting Properties

You can plot any numeric-valued property as a function of
atomic number for all elements. (You can't plot
non-numeric properties.)  This is useful for finding
elements with certain characteristics and for observing
the periodic nature of many properties.

To plot a property, follow these steps:

  1.  Get a property catalog for any element.

  2.  Highlight the property you want to plot.

  3.  Press {PLOT}.

The plot includes a pointer just below the plot marking
the current element. The bottom line gives the name,
symbol, and property value for the current element.

You can scale the plot to find certain elements or
values. You can return to the property catalog for the
original element or to the Periodic Table display for
another element.


[<][>]       Moves the pointer to the left or right.
             With [leftshift], moves the pointer 10
             elements left or right. With [rightshift]
             moves the pointer to the first or last
             element.

[ENTER]      Returns to the Periodic Table display at the
             element marked by the plot pointer.

[ATTN]       Returns to the previous property catalog.


7.5  Putting Information on the Stack

You can put information on the stack from the Periodic
Table display, from a catalog of properties, or from a
command:


   + From the Periodic Table display, press {ATWT} to put
     the atomic weight of the current element on the
     stack, or press {DENS} to put its density on the
     stack.

   + In a property catalog, press {->STK} to put any
     highlighted property on the stack.

   + From outside the Periodic Table, use the PTPROP
     command to put its density on the stack. (See
     "Using Periodic Table Commands" later in this
     document.)


7.6  Choosing Unit Options

The Periodic Table properties and commands have two
choices for units: SI units or no units (implied SI
units). The numeric values don't change for these
choices, but the type of objects put on the stack does
depend on your choice.

The choice of units usage is represented by the state of
flag 61. If flag 61 is clear, units are used; units are
used if the flag is set.

In any catalog of properties, you can choose SI units or
no units by pressing the {UNITS} menu key. {UNIT*} means
SI units are used, {UNITS} means units are not used.


7.7  Calculating Molecular Weights

You can calculate the molecular weight of any compound
using the Periodic Table:

   + From the Periodic Table display, press [alpha],
     enter the formula for the compound, then press
     [ENTER]. Use [<-] to correct typing mistakes. The
     operation is described below.

   + From outside the Periodic Table, use the MOLWT
     command. (See "Using Periodic Table Commands" later
     in this document.)

When you press [alpha] in the Periodic Table display, the
application prompts for the molecular formula and
automatically locks the alpha keyboard on. The
application accepts any formula containing combinations
of items listed below. (If you enter only an element
symbol, the pointer moves to that element instead.)


   + Element symbols (letters). Only the first letter of
     a two- or three- letter symbol is uppercase (use
     [leftshift] to enter lowercase letters) - NiN and
     NIN are different compounds. Letters that don't
     form valid symbols aren't accepted.

   + Subscripts (numbers). Indicate multiples of the
     preceding element or group. Decimal numbers are
     allowed.

   + Groups (parentheses). Join elements, subscripts, and
     groups. Use [leftshift][()] for (. Use
     [rightshift][()] for ), or unlock alpha and press
     [>].

These are samples of valid molecular formulas:


INPUT:          MEANING:
   
NaF             NaF

H2SO4           H SO
                 2  4

Mg(OH)2         Mg(OH)
                      2

Zn3(Fe(CN)6)2   Zn [Fe(CN) ]
                  3       6 2


Press [ENTER] to calculate the molecular weight. Then


   + To put the molecular weight and formula on the stack
     (and return to the Periodic Table display), press
     [ENTER].

   + To just return to the Periodic Table display, press
     [ATTN].

The molecular weight contains SI units if you're using
units - otherwise, no units are included. You can change
this option in the property catalog for any element - see
"Choosing Unit Options" earlier in this document.


8.  Using Periodic Table Commands


The Periodic Table Library includes four commands that
you can execute from the menu, in the command line, and
in programs. You can view the command names by pressing
[rightshift] [LIBRARY] {PRTBL} [rightshift] [VIEW].


ͻ
   Key   Programmable          Description           
           Command                                   
Ķ
 {PERTB}    PERTBL    Starts the Periodic Table.  It 
                      doesn't affect the stack.      
                                                     
 {PTPRO}    PTPROP    Returns the specified property 
                      for the specified element.     
                                                     
 {MOLW}     MOLWT     Returns the molecular weight   
                      for the specified molecular    
                      formula.                       
                                                     
 {PTVER}    PTVER     Displays the version number of 
                      the Periodic Table Library.    
ͼ



8.1  Getting Properties with a Command

You can get element properties using the PTPROP command
instead of using the Periodic Table display. PTPROP
takes the element's symbol or atomic number from level 2,
and the property number from level 1. Define the element
using either its symbol (a name, such as 'Si') or its
atomic number (such as 14). Define the property using
the property number (such as 9 for the boiling point
temperature). Property numbers are listed in the
"Properties of Elements" table under "Finding Element
Properties" earlier in this document.

For example, both of these program segments return the
boiling-point temperature for silicon:

                << ... 'Si' 9 PTPROP ... >>
                 << ... 14 9 PTPROP ... >>

If you use PTPROP as an algebraic function, you must use
the symbol to define the element - you can't use its
atomic number. For example, this program segment is
valid:

             << ... 'PTPROP(Si,9)' EVAL ... >>

Note that if units are not used (flag 61 set) a real
number is returned instead of a unit object.


8.2  Calculating Molecular Weights with a Command

You can calculate molecular weights using the MOLWT
command instead of using the Periodc Table display. With
certain restrictions, you can define the molecular
formula in either of two forms:


   + A string, such as "H2O". Valid for any formula.

   + A name, such as 'H2O'. Valid only for formulas
     without parentheses.

You can store a molecular formula in a variable, then use
the variable name with MOLWT. You should do this when
you want to use MOLWT in an expression and the formula
contains parentheses or matches an HP 48 command name.

You must use care when naming a variable that contains a
formula string or name. Make sure the variable name
itself isn't a valid formula - for example, start the
variable name with a lowercase letter. (If the variable
name is a valid formula, using MOLWT with the variable
name returns the molecular weight for the variable name,
not for the formula it contains.)

For example, if you store the formula for ethyl alcohol
("C2H6O") in variables SUDS and HOPS, 'MOLWT(SUDS)'
[EVAL] gives the molecular weight for ethyl alcohol, but
'MOLWT(HOPS)' gives the weight for hydrogen-oxygen-
phosphorus-sulfur. ("SUDS isn't a valid molecular
formula, but "HOPS" is.)

If your formula is the same as an HP 48 reserved word,
such as SIN, you must supply it as a string.
