A new method is presented for calculating electron densities in nonperiodic, polyatomic systems using Cartesian coordinates in three dimensions. The method blends a direct approach to spin-density-functional theory and uses (1) the ''Heaviside-Fermi level operator'' h(E(F) - (H) over cap) rather than solving Schrodinger eigenvalue problems, (2) the distributed approximating functional for discretization and interpolation, (3) a multigrid iteration procedure for accelerating the convergence, (4) a separable, nonlocal form of pseudopotential, and (5) a fast method for solving Poisson's equation in nonperiodic systems. Example calculations of the electronic structure for the Ne atom and the C-2 and O-2 dimers are presented.