Added option to KKT: delta input for energy instability, follows Egerton matlab code