Question: please use python 3 and make code clear and with comments please! Thanks! 1. The file mlr.py contains a function, mlr, which takes a bond

 please use python 3 and make code clear and with comments

please use python 3 and make code clear and with comments please!

Thanks!

1. The file mlr.py contains a function, mlr, which takes a bond length, r, in X, as an argument and returns the potential energy, U, in kJ - mol- of an atomic dimer. The function also takes a second argument, a string, which determines if the potential cnergy of the lithium dimer ('LiLiX') or the beryllium dimer ('BeBeX') is to be computed. The function uses a Morse/Long-range (MLR) fit of spectroscopic data to compute cach potential energy curve. (a) Use matplotlib to plot the behavior of cach function from 2 to 4 A. (b) Define a function which evaluates the first derivative of the potential energy curves using the central finite difference approximation: f(x +h)-f(1-h) 2h (1) (c) Write an algorithm which uses the steepest descent method and Barzilai-Borwein step size to search for critical points: In+1 = In -f'(X) (2) In-1 (3) f'(In) - f'(n-1) (d) Use the algorithm to find the minima on both the lithium and beryllium dimer potential energy curves. 7 1. The file mlr.py contains a function, mlr, which takes a bond length, r, in X, as an argument and returns the potential energy, U, in kJ - mol- of an atomic dimer. The function also takes a second argument, a string, which determines if the potential cnergy of the lithium dimer ('LiLiX') or the beryllium dimer ('BeBeX') is to be computed. The function uses a Morse/Long-range (MLR) fit of spectroscopic data to compute cach potential energy curve. (a) Use matplotlib to plot the behavior of cach function from 2 to 4 A. (b) Define a function which evaluates the first derivative of the potential energy curves using the central finite difference approximation: f(x +h)-f(1-h) 2h (1) (c) Write an algorithm which uses the steepest descent method and Barzilai-Borwein step size to search for critical points: In+1 = In -f'(X) (2) In-1 (3) f'(In) - f'(n-1) (d) Use the algorithm to find the minima on both the lithium and beryllium dimer potential energy curves. 7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!