A mixture of pentagons and lozenges interacting with Lennard-Jones type potentials
Channel: Nils Berglund
Date: 2022-01-15

This new molecular dynamics simulation features 1305 particles of two different types, interacting with two different variants of Lennard-Jones potentials that are not rotation symmetric. Two thirds of the particles are pentagons, and create a force field with pentagonal symmetry. The remaining third are lozenges, or rhombi, and create a field having the symmetry of a rectangle. In addition, the orientations of the particles interact with a torque depending on the difference of their orientations, and decreasing like the inverse of the square of the distance between particles. All the translational and rotational degrees of freedom are coupled to a common thermostat.  
The motivation for this simulation was to try to create a quasicrystal, similar to the second Fibonacci tiling on the page http://www.davidboeno.org/GROEUVRE/HARMONIE/CASPAR/CASPARFO.HTM 
One issue with this simulation is that the particles have difficulty rotating to produce a more close-packed arrangement. This seems to be due to the thermostat taking too much rotational energy from the particles. Forthcoming simulations will exploit other parameter values of the coupling.  
This video has two parts, showing the same evolution with two different visualizations:
Particle type: 0:00
Atomic bonds: 1:30
In the first part, the color of the particles depends only on their type, pentagons or lozenges. In the second part, it depends on the number of neighbors, defined as particles within a given distance. Blue pentagons have more neighbors than green and yellow ones, while red lozenges have more neighbors than orange and yellow ones. 
The interaction potentials in polar coordinates are given by 
V(r,phi) = (req/r)^12 - A(phi- theta)*(req/r)^6,
where req is 5 times the radius of the particles, theta is the orientation of the particle, and 
A(phi) = 1 + 2*cos(pi/10) + [1-2*cos(pi/10)]*cos(5*phi)
for pentagons, while 
A(phi) = a - b*cos(2*phi)
with a = 11.6 and b = 6.78 for lozenges (these values have been chosen such that there are four stable equilibrium positions roughly similar to those in the quasi-tiling). 
The angular coupling between particles with orientations theta1 and theta2 is proportional to -sin(n(theta2-theta1)), where n = 5 for pentagons and n = 2 for lozenges, and decays like the inverse of the square of the distance between particles.  
The temperature is controlled by a thermostat, which is here the "Nosé-Hoover-Langevin" algorithm introduced by Ben Leimkuhler,  Emad Noorizadeh and Florian Theil, see reference below. The idea of the algorithm is to couple the momenta of the system to a single random process, which fluctuates around a temperature-dependent mean value. Lower temperatures lead to lower mean values. To save on computation time, particles are placed into a "hash grid", each cell of which contains between 3 and 10 particles. Then only the influence of other particles in the same or neighboring cells is taken into account for each particle. 
The Lennard-Jones potential is strongly repulsive at short distance, and mildly attracting at long distance. It is widely used as a simple yet realistic model for the motion of electrically neutral molecules. The force results from the repulsion between electrons due to Pauli's exclusion principle, while the attractive part is a more subtle effect appearing in a multipole expansion. For more details, see https://en.wikipedia.org/wiki/Lennard-Jones_potential

Render time: 10 minutes
Color scheme: Turbo, by Anton Mikhailov
https://gist.github.com/mikhailov-work/6a308c20e494d9e0ccc29036b28faa7a

Music: "Side Show" by Causmic@Causmic

Reference: Leimkuhler, B., Noorizadeh, E. & Theil, F. A Gentle Stochastic Thermostat for Molecular Dynamics. J Stat Phys 135, 261–277 (2009). https://doi.org/10.1007/s10955-009-9734-0
http://www.maths.warwick.ac.uk/~theil/HL12-3-2009.pdf

Current version of the C code used to make these animations: 
https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html
Some outreach articles on mathematics:
https://images.math.cnrs.fr/_Berglund-Nils-1343_.html
(in French, some with a Spanish translation)