pylj#

pylj runs molecular dynamics and Metropolis Monte Carlo simulations of atoms interacting through pair potentials, in two dimensions, and draws them as they run. It is a teaching code, written in Python and NumPy.

Installation#

pip install pylj

pylj needs Python 3.11 or later. To watch the figures redraw you need a Jupyter notebook; start each notebook with %matplotlib inline. In a script, a viewer’s fig is a matplotlib figure that can be saved.

Contents#

Citing pylj#

McCluskey, A. R., Morgan, B. J., Edler, K. J., and Parker, S. C. (2018). pylj: A teaching tool for classical atomistic simulation. Journal of Open Source Education, 1(2), 19. https://doi.org/10.21105/jose.00019

pylj.__cite__() opens the paper in a browser. Development is on GitHub.