  We present an open-source Thermochemical Equilibrium Abundances (TEA) code
that calculates the abundances of gaseous molecular species. The code is based
on the methodology of White et al. (1958) and Eriksson (1971). It applies Gibbs
free-energy minimization using an iterative, Lagrangian optimization scheme.
Given elemental abundances, TEA calculates molecular abundances for a
particular temperature and pressure or a list of temperature-pressure pairs. We
tested the code against the method of Burrows & Sharp (1999), the free
thermochemical equilibrium code CEA (Chemical Equilibrium with Applications),
and the example given by White et al. (1958). Using their thermodynamic data,
TEA reproduces their final abundances, but with higher precision. We also
applied the TEA abundance calculations to models of several hot-Jupiter
exoplanets, producing expected results. TEA is written in Python in a modular
format. There is a start guide, a user manual, and a code document in addition
to this theory paper. TEA is available under a reproducible-research,
open-source license via https://github.com/dzesmin/TEA.
