Optimization of single-particle basis for exactly soluble models of correlated electrons