def scaps_script_generator(calc_param):
    """
    Generate SCAPS simulation input script as a string.
    """
    return "\n".join(["//Script file made by Python",
                       "set quitscript.quitSCAPS",
                       "load allscapssettingsfile {}".format(calc_param['def']),
                       "set errorhandling.overwritefile",
                       "set layer1.mun %f" % calc_param['mu_n_l'],
                       "set layer1.defect1.Ntotal %f" % calc_param['Nt_SnS_l'],
                       "set layer2.chi %f" % calc_param['EA_ZnOS_l'],
                       "set interface1.IFdefect1.Ntotal %f" % calc_param['Nt_i_l'],
                       "action workingpoint.temperature %f" % calc_param['T_l'],
                        "action iv.startv %f" % 0.0,
                        "action iv.stopv %f" % calc_param['V_max'],
                        "action iv.increment %f" % 0.02,
                        "action intensity.T %f" % calc_param['ill_l'],
                        "calculate"])