An essential part of any general chemistry program is the periodic table of the elements. Nobody wants to copy the whole thing by hand, and figuring out how to represent it can be a minor headache. Therefore, you should download the periodic-table library. It is fully asdf-installable and has been tested without any problems on SBCL and LispWorks.

The home page is


(use-package :elements)

;; Get the name of the element which has the symbol "Kr"
(element-name (symbol-element "Kr")) => "Krypton"

;; It isn't case sensitive
(element-name (symbol-element "kR")) => "Krypton"

;; Find the element with the electronegativity closest to 4.0
(electronegativity-element 4.0)
   :NAME "Fluorine"
   :ATOMIC-WEIGHT 18.9984
   :SYMBOL "F"

;; Get an element from its atomic number
(element-symbol (get-element 12)) => "Mg"

;; Demonstrate another use of the powerful GET-ELEMENT function.
;; Boiling point is in Kelvins
(element-boiling-point (get-element 'nitrogen)) => 77.344

It is released under the LLGPL.

ASDF-install package (obsolete)

Topics: science