We present an algorithm for generating all derivative superstructures--for
arbitrary parent structures and for any number of atom types. This algorithm
enumerates superlattices and atomic configurations in a geometry-independent
way. The key concept is to use the quotient group associated with each
superlattice to determine all unique atomic configurations. The run time of the
algorithm scales linearly with the number of unique structures found. We show
several applications demonstrating how the algorithm can be used in materials
design problems. We predict an altogether new crystal structure in Cd-Pt and
Pd-Pt, and several new ground states in Pd-rich and Pt-rich binary systems