“One of the continuing scandals in the physical sciences is that it remains in general impossible to predict the structure of even the simplest crystalline solids from a knowledge of their chemical composition.” J. Maddox Nature335, 201(1988)
This is finally changing with approaches including: genetic algorithms, metadynamics, graph theory and so on …
A simple recipe
1. Make a random unit cell
2. Throw a given number of atoms, of given type into the unit cell
3. Relax carefully under quantum mechanical forces and stress
4. Repeat
5. Look for lowest enthalpy or most “interesting” structures