The geometrical structures and stability of non-conjugated C5H10 and C3H8N2 singlet and triplet diradical molecules have been investigated at the UCCSD/6-311g** level. The effects of molecular structure, radical position, amount of Hartree Hork (HF) exchange and spin multiplicity on the nonlinear optical (NLO) coefficients have been also investigated. The reliable UCCSD results show that the triplets of all diradical molecules are more stable compared to their singlet analogues. In addition, the alpha(s) and beta(tot) values of C5H10 and C3H8N2 triplet diradical molecules have been investigated by the UBHandHLYP, UB3LYP, UBLYP, UHF and UCCSD methods. The investigation shows that the variations in alpha(s) and beta(tot) values are closely connected to the amount of HF exchange. The increasing amount of HF exchange results in monotonic decreases in alpha(s) and beta(tot) values, while the alpha(s) and beta(tot) values of singlet diradical molecules and the gamma(s) of C5H10 and C3H8N2 singlet and triplet diradical molecules have been studied by the UBHandHLYP method. The results illustrate that the NLO coefficients for our studied non-conjugated carbon and nitrogen diradical species can be tuned by molecular structure, radical position and spin multiplicity, which are very significant for designing NLO materials.