bugs your classmates have encountered: - missing/extra minus signs - messing up the order of the indices of a high-dimensional array - something*2 instead of something**2 - forgetting to divide forces by the mass - implementing the nearest image convention only for the force, not the potential energy (or the other way around) - mixed-up units - forgetting to free allocated memory other problems that could lead to strange results: - not enough statistics: not enough particles or only taking statistics once, not a few times during the simulation - simulation box too small for the length scales you are looking at - system not equilibrated yet tips: - You will very probably not find your own mistakes by reading your code. You must find other ways to check if it is doing what you meant. - Print lots of things (or use gdb). This will help you identify the symptoms of the bug. - Reduce the parameters to a simple (limiting) case where you know exactly what will happen: one-dimensional, only 2 particles, particular initial conditions, etc. This way, you can see more easily what is going wrong. - Narrow down where in your code the problem is by checking small parts of it manually numerically. - If you are truly stuck, come to me for help. Make sure to investigate as much of the symptoms of your bugs beforehand, plot things, try things. But do ask for help. Do not allow yourself to be stuck for a long time. This is frustrating and unproductive.