function index = atomfind(names,lookup)
%  Find the index of the atom given its name.
%
%  $BEGIN
%  $HEADER atomfind
%  function index = atomfind(names,lookup)
%
%  Find the index of the atom given its name.
%  Returns -1 if no name is found.
%
%  $HEADER REFERENCE
%
%  $HEADER PROGRAMMER
%  John W. Craft, Jr.
%  University of Houston, (2005)
%
%  $HEADER VERSION
%  1.0.0
%
%  Example
%  atomfind(names,lookup)
%
%  See Also atomdis
%  
%  $END
%

[m,n] = size(names);

for i = 1:m
  if strcmp (names(i) , lookup )   
    index = i;
    return;
  end
end

% If no matching name if found
index = -1;

return

