Common Lisp Package: COMPOUNDS

README:

FUNCTION

Public

FORMULA-WEIGHT (COMPOUND)

The number of grams per mole of a compound

GET-COMPOUND (COMPOUND)

Return a compound designator given either a compound designator or a string in compound syntax

PARSE-COMPOUND (STRING)

Parse a compound string, such as C6 H12 O6

PPRINT-COMPOUND (COMPOUND &KEY (STREAM *STANDARD-OUTPUT*) PARENS)

Pretty print a compound, putting parens around it if `parens' is t. This is so ugly that I've come to despise it, but it works. Don't touch it unless you want it to shatter into a million little pieces.

Private

ELEMENT-NUMBER-PAIR-P (COMPOUND)

Return t if `compound' is a pair of an element and a number of that element, such as (C 6)