Skip to content
Python GUI running a hard-sphere molecular dynamics simulation.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Deprecated - I have expanded this project into mdsea, a stand-alone Python molecular dynamics library equipped with multiple analysis and visualisation tools.


"My first ever programming project." - A Tkinter GUI running a hard-sphere molecular dynamics simulation.

I developed this project for a "Scientific Computing Skills" module in the first year of my Physics Undergraduate degree. I have not modified it since the module's deadline. I have only corrected some minor bugs, to make it easier for others to try it out and play with the source.

This was developed on macOS and I've noticed that the GUI does not render so well on Linux and Windows machines. This could be fixed and will be "left as an exercise for the reader". [Hint: The WelcomePage() class in should only use the pack or grid methods (not both). This would actually be the correct way of doing things, according to the Tkinter documentation.]

If you're a beginner to Python programming, feel free to fork this project and play around with the source, to see some examples of tkinter, numpy, and scipy libraries and Python's OOP. Unless you find a minor bug or improvement which does not affect the overall project and source, please do not make any pull requests, as this project is no longer being developed.

Some snapshots of the interface and simulations:

The HomePage/WelcomePage

welcome page

The 2D Simulator Page

2D Page

2D Simulation with collisions


3D Simulation with collisions and gravity


2D Brownian Motion

Brownian Motion

Maxwell-Boltzmann Speed Distribution


You can’t perform that action at this time.