We investigate the Einstein relation for the diffusivity-mobility ratio (DMR) for n-i-p-i and the microstructures of nonlinear optical compounds on the basis of a newly formulated electron dispersion law. The corresponding results for III-V, ternary and quaternary materials form a special case of our generalized analysis. The respective DMRs for II-VI, IV-VI and stressed materials have been studied. It has been found that taking CdGeAs2, Cd3As2, InAs, InSb, Hg1−xCdxTe, In1−xGaxAsyP1−y lattices matched to InP, CdS, PbTe, PbSnTe and Pb1−xSnxSe and stressed InSb as examples that the DMR increases with increasing electron concentration in various manners with different numerical magnitudes which reflect the different signatures of the n-i-p-i systems and the corresponding microstructures. We have suggested an experimental method of determining the DMR in this case and the present simplified analysis is in agreement with the suggested relationship. In addition, our results find three applications in the field of quantum effect devices.