Question: Use only random and mathplot lib packages.DO not use numpy. calculate _ LJ function that includes parameters for setting sigma and epsom.After writing the function,
Use only random and mathplot lib packages.DO not use numpy.
calculateLJ function that includes parameters for setting sigma
and epsom.After writing the function, perform a set of calculations with sigma
and both equal to one. Using these values, calculate the Lennard Jones potential energy for a range of distances, r from r to r in increments of Save your results in a list.
Next, perform a set of calculations where sigma
is equal to and epsom is equal to one. Then set sigma to equal to and
epsom equal to two. For each set of calculations, save your result in a list.
Visualize all three results on a graph using matplotlib.
At least five sentences explain the steps and their importance.
Write a Python time code as example below and caluclate how much it takes to calculate module above to compare performance for nsamples and nsamples
Change the code to calculate the total energy for every step. Compare timings for steps.
import time
start time.time
# put code you want to time here.
end time.time
elapsedtime end start
printelapsedtime
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
