# Homework Help: Lennard-Jones Force Formula Python Program

1. Dec 10, 2012

### eximius

I'm not looking for the answer, I just want some help with understanding the question. The main thing I'm stuck on is the characteristic binding energy and the characteristic molecular size. I've tried searching for these but I'm finding a lot of different stuff.

1. The problem statement, all variables and given/known data
All to be done in Python.

2. Relevant equations

F = (-24*bind)*(((2.0/r)*(sigma/r)**12) -((1.0/r)*(sigma/r)**6))

3. The attempt at a solution

This is what I've done so far. I'm not even sure if the formula function is correct. Because the plot I get begins at a high value fort the Force but falls quickly to zero and remains at zero.

Code (Text):
def lgfunc(bind,sigma,r):
'''
Function to calculate force between two particles using
Lennard-Jones formula
'''
F = (-24*bind)*(((2.0/r)*(sigma/r)**12) -((1.0/r)*(sigma/r)**6))

return F

#For H2 -

bind = 4.48*1.6e-19
sigma = 2.92e-10
r = linspace(0,5e-9,50000)

plot(r,lgfunc(bind,sigma,r),'r.')

Any and all help would be greatly appreciated. Thanks