Materials with nonlinear properties have applications in optical switching [1], lasers, photovoltaic cells [2], imaging [2], cancer therapy [3,4], advanced computing [5,6], and communication technologies [7,8]. To improve applications, it is important to establish good methods and models to explore the optimization of nonlinear effects by increasing the nonlinear response. This work provides a way of calculating the nonlinear response of nanostructures. This helps in designing new systems without the need for doing difficult and time-consuming measurements.