Write a function that takes the grid as input, and returns the total energy of the
system. Tip: For all monomers, use equation (4) to calculate the energy between the
monomer and all of its nearest neighbors. The energy of the system is the sum of all
the monomer energies (divided by some integer that account for the overcounting of
interactions). You may introduce a dimensionless quantity E/α if you wish. Calculate
the energy of the grid you presented in 1b).
Write a function that takes the grid as input, and returns the total energy of the system. Tip: For all monomers, use equation (4) to calculate the energy between the monomer and all of its nearest neighbors. The energy of the system is the sum of all the monomer energies (divided by some integer that account for the overcounting of interactions). You may introduce a dimensionless quantity E/α if you wish. Calculate the energy of the grid you presented in 1b).