A new direct-space method forab initiosolution of crystal structures from powder diffraction data is presented. The approach consists of a combined global minimization ofRwpand the potential energy of the system. This method was tested on two organic compounds with known structure and also applied successfully in the structure determination of the previously unknown structure of melamine pyrophosphate.