Periodic boundary conditions in ab initio calculations. II. Brillouin-zone sampling for aperiodic systems.