The importance of this example is that all the mathematical steps in the derivation and the generation of the final source code are performed in a manner that can be checked algorithmically.

This is the MathML (xhtml) output from the model derivation.

- Partition function definition
- Specialize to two particles in two dimensions
- Definition of Lennard-Jones potential
- Specialize to Lennard-Jones potential
- Trapezoidal rule for integration

- do_int.py Perform the top level integration
- ptrap_gen.py Implementation of the trapezoidal rule (fixed 4/26/2011)

The code for this is located in my github sympy fork, in the derivation_modeling branch. The added code in is in the `prototype/`

directory, with a few small hacks in the rest of the sympy code to make it work. See the Readme.txt file in that directory for more information about the files there.

To generate the MathML/xhtml output, run quadrature/trapezoid.py, stat_mech/lj.py, and stat_mech/int_lj_n2d2.py. To generate the python code, run stat_mech/final.py (generates do_int.py), and run quadrature/convert_trap.py (generates ptrap_gen.py)