function res=au(mult,unit)
  persistent au_data=struct("angstrom",1.8897261,...
                            "meter",1.889726e10,...
                            "m",1.889726e10,...
                            "newton",12137805,...
                            "newton/m",12137805/1.889726e10,...
                            "amu",1822.8885,...
                            "carbon",12.0*1822.8885,...
                            "oxygen",15.994914*1822.8885,...
                            "joule/mol",3.8087989d-7);
  
  if isfield(au_data,unit)
    res=au_data.(unit)*mult;
  else
    error ("unknown unit");
  endif
endfunction

