We present results of evolutionary simulations based on density functional calculations of a potentially new type of energetic materials called extended solids: P-N and N-H. High-density structures with covalent bonds generated using variable and fixed concentration methods were analysed in terms of thermo-dynamical stability and agreement with experimental X-ray diffraction (XRD) spectra. X-ray diffraction spectra were calculated using a virtual diffraction algorithm that computes kinematic diffraction intensity in three-dimensional reciprocal space before being reduced to a two-theta line profile. Calculated XRD patterns were used to search for the structure of extended solids present at experimental pressures by optimizing data according to experimental XRD peak position, peak intensity and theoretically calculated enthalpy. Elastic constants has been calculated for thermodynamically stable structures of P-N system.