Modify the potential function in the script

Dear all,

If I want to replace the bond and angle, non-bond potential functions in the script-Boltzmann inversion with Harmonic potential functions and LJ potentials, how should I change them?I'm very rusty when it comes to scripting. thank you very much.