Lennard Jones Molecular Dynamics in C++
Simulates Lennard Jonesium using Molecular Dynamics.
The program is written in C++ and requires Boost libraries and development headers for reading the .ini file, and xdrfile for writing the trajectory to .xtc. Some of the classes I use are based on my libgmxcpp library.
- Andersen thermostat
- Velocity Verlet integrator
- Calculate RDF
- Calculate velocity distribution
- Neighbor lists
- Block error analysis
Reduced units are used.
To compile simply do:
mkdir build cd build cmake .. make make install
To run do:
If no file configuration file is specified, then the program attempts to open 'md.ini.' If the file you specify is not found, the defaults options are used for the program (printed to the screen).
When running the program an initial configuration of atoms is generated by randomly inserting them into the box according to the specified density, ensuring that the atoms are not too close to each other. Then then simulation begins.
Copyright (C) 2015 James W. Barnett firstname.lastname@example.org
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The full license is located in a text file titled "LICENSE" in the root directory of the source.
See Frenkel and Smit's Understanding Molecular Simulation as well as Allen and Tildesley's Computer Simulations of Liquids.