I have made these demos below such that you can experiment with running Molecular Dynamics simulations. I assume that you have installed LAMMPS as described in "Installing LAMMPS" and that your installation it works. What you should get out of a simulation is a series of pictures and a movie of how the system evolves. After running a demo, try modifying it and see what happens. The laws of nature are yours to play with! You can e.g. change the number of particles which at constant volume also changes the pressure. Hence increasing the number of particles you typically end up with a crystal, until the density is so high at the system explodes because particles are forced to be on top of each other. You can change the temperature and see what happens. Even more fun is to design new molecules and see what they do.
Gas of particles
Create a folder e.g. gas under your user folder. Download gas.lam and put it in that folder. Start a command shell, navigate to the gas folder (e.g. command cd gas), and run a LAMMPS simulation using gas.lam to setup the simulation by executing lmp_serial -in gas.lam . After the simulation is completed you can look at the JPEG pictures in the img folder or play the movie.avi. All the subsequent examples are run in the same way.
The system comprises 100 particles in a 2D box. The boundaries are periodic, such that particles e.g. exiting on one side enters the box from the opposite side. Periodic boundary conditions are quite typical. We often simulate quite small systems, where e.g. reflective boundaries would be a relatively strong perturbation of the system. The particles interact via a soft repulsive potential, such that they repel each other when they are close, but they have a finite energy when they are on top of each other. The dynamics is given Newtons equation of motion, such that the energy and momentum is conserved in the collisions. Try changing the temperature or number of particles and see what happens!
Create a folder e.g. brownian and download brownian.lam to that folder. Run a simulation by executing lmp_serial -in brownian.lam in the brownian folder. After the simulation is completed you can look at the JPEG pictures in the img folder or play the movie.avi.
The simulation is identical to the above, except that one large Brownian particle (green) is also present and the density of the solvent particles are somewhat higher than before. Due to collisions with the solvent the brownian particle is randomly kicked around and executes a random walk. Try changing the mass or size of the particle, you can also add more brownian particles. You can also try download brownian_langevin.lam. Here the solvent is replaced by a Langevin dynamics where the particle feels a stochastic kick and a friction force modelling the effects of the solvent. This is an implicit solvent model, and it runs many times faster than the simulation where the solvent is modeled explicitly.
Download lj.lam and put it in a folder. Start a command shell and run lmp_serial -in lj.lam in the folder where you saved cryst.lam. After the simulation is completed you can look at the JPEG pictures in the img folder or play the movie.avi.
The Lennard-Jones potential models the attraction between noble gas atoms due to dispersion interactions. It is strongly repulsive at short distances, but attractive at intermediate distances. This system was studied with Molecular Dynamics techniques back in 1967 by "Computer "Experiments" on Classical Fluids. I. Thermodynamical Properties of Lennard-Jones Molecules" Loup Verlet Phys. Rev. 159, 98 (1967). The Langevin thermostat adds a friction on each particle that extract heat from the system, but it also adds a random force kick to each particle that injects heat into the system. The combined effect models the system being in contact with a heat bath with a specified temperature. Try playing with the density and temperature and see what phases you get. During the simulation the radial distribution function is sampled which is shown to the right, which shows the typical shell structure of a dense liquid. Try plotting the lj.rdf file for various phases (column 2 is radial distance, column 3 is the probability of particles at this distance).
Melting a crystaline LJ cluster
Download cryst.lam and put it in a folder. Start a command shell and run lmp_serial -in cryst.lam in the folder where you saved cryst.lam. After the simulation is completed you can look at the JPEG pictures in the img folder or play the movie.avi.
500 particles are put into the middle of a 2D box with periodic boundaries. These particles interact via a Lennard-Jones potential. At T=0 the particles are in a crystalline state, at T=0.5 they melt into a diffuse liquid droplet, if you heat it further it turns into a gas. Try to change the number of particles, or the start and end temperatures!