  We derive ab initio local Hubbard models for several optical lattice
potentials of current interest, including the honeycomb and Kagom\'{e}
lattices, verifying their accuracy on each occasion by comparing the
interpolated band structures against the originals. To achieve this, we
calculate the maximally-localized generalized Wannier basis by implementing the
steepest-descent algorithm of Marzari and Vanderbilt [N. Marzari and D.
Vanderbilt, Phys. Rev. B 56, 12847 (1997)] directly in one and two dimensions.
To avoid local minima we develop an initialization procedure that is both
robust and requires no prior knowledge of the optimal Wannier basis. The MATLAB
code that implements our full procedure is freely available online at
http://ccpforge.cse.rl.ac.uk/gf/project/mlgws/.
