Theoretical and experimental investigations of nitropyrene on silver for nonlinear optical and metal ion sensing applications