function t=teql(p,j)
% teql: find equilibrium temperature for given pressure
% function t=teql(p,j)
% Argument List:
% Argument   Gives
%    p      pressure in kPa
%    j      indices of compounds in cnms that you want
%           the temperature for.  If you omit this, all
%           the compounds will have equil. temps. found.
% t is given in Tdeg units and is the equilibrium temperature at
%	the pressure specified
% Ex: start301
%     Specify the compounds you want
%     teql(13.684)

global Aabc
if nargin ==1
   t=atk((Aabc(:,2)./(Aabc(:,1)-log(p)))-Aabc(:,3));
else
   t=atk((Aabc(j,2)./(Aabc(j,1)-log(p)))-Aabc(j,3));
end
