def potential(r):
    U = 4.0 * (np.power(r, -12) - np.power(r, -6))
return U

def total_energy(x):
    E = 0.0
for i in range(N):
    for j in range(i):
        E += potential(np.sqrt(np.sum((x[i] - x[j]) ** 2)))
return E
how to write this in most effecient way