Invia SMS: Chemical reaction equilibrium analysis: theory and algorithms