# Molecular dynamics method to simulate a simple fluid

I need to implement the molecular dynamics method to simulate a simple fluid that interacts through the Lennard-Jones potential in a 2D simulation. The idea is to explore how the total energy of the system (kinetic + potential) and the particle trajectories depend on the size of the chosen time step.

I took a piece of code that does part of the job(I will upload it here) but I would like a algorithm to helpe-me to finish. I will try to summarize what I understood until now:

1. Initially it sets the physical parameters and parameters of simulation
• temperature
• density
• number of particles
• size of the box
1. It initializes the vectors and lattice
• position and velocity vectors x,y and vx,vy
• distributes the particles in a square centered lattice
• Chooses velocities uniformly on a unit circle
• Normalizes the velocities according to the energy equipartition theore
• make the total momentum of the particles equal to zero
1. Creates a verlet list to define neighbors

My doubts are:

How and when to use Lennard Jones potential and Verlet Velocities in the code ? Does someone have an example algorithm or can put it in a manner that I can follow the steps?

The code until now: MolecularDynamics_2DfluidSimulation

• "Computer Simulation of Liquids" by Allen and Tildesley. The book contains FORTRAN and Python examples (github.com/Allen-Tildesley/examples/tree/master/python_examples) for various kinds of simulation exercises. This would be the best reference for your project. Oct 18, 2022 at 3:33
• Hey that's my line @Magic_Number Oct 18, 2022 at 21:18