@mainpage PSE Molecular Dynamics
Project for the Practical Course: PSE Molecular Dynamics by Group C: Lukas, Severin, Tony.
NOTE: This is not the complete README. This document only contains compiling instructions and an overview. The READMEs in the
./doc_pagesdirectory contain detailed feature overviews and examples.
⚠️ If you have slow internet: We fetch three packages with FetchContent, thus the initial CMake-build may take some time (~1min)
⚠️ File structure: Please put thebuilddirectory (the directory you executemake) directly in the root project path, else the automatically generated files will not work properly. Like such:MolSim . ├── CMakeLists.txt ├── Doxyfile ├── README.md ├── build/ ├── cmake/ ├── doc_pages/ ├── input/ ├── libs/ ├── media/ ├── src/ └── test/
Basics for compiling a CMake program:
- gcc/g++ version 11.10 (used by us)
- CMake 3.20 (used by us)
Also, you need the xerces-c library for the parsers we use in the program:
- Ubuntu
sudo apt install libxerces-c-dev
- Arch
sudo pacman -S xerces-c
- Homebrew
brew install xerces-c
-
Clone the repo
git clone https://github.com/wngTn/MolSim.git
-
Create the build directory and cd into it:
mkdir build && cd build
-
Build the Makefile without our tests
cmake .. -DBUILD_TEST=OFF
-
Compile everything (without our tests)
make # use "make -j" for faster compilation
The general program call is:
./MolSim [-x <XML_file>] [-i <input_file>] [-g <generator input>] [-e <end_time>] [-d <delta_t>] [-w <writer>] [-c <calculator>] [-b <brownian_motion_velocity_mean>] [-r] [-m <execution_mode>]| Flag | Possible Values | Explanation | Default |
|---|---|---|---|
i |
path/to/file |
This is the relative or absolute path to your input_file. |
None |
x |
path/to/file |
This is the relative or absolute path to your XML_file. |
None |
g |
path/to/file |
Specify an input file used for the ParticleGenerator. | None |
e |
<double> | The end_time value | 1000 |
d |
<double> | The delta_t value | 0.14 |
w |
v, vtk, x, xyz | Specifies the output writer, consequently also the output file format | v (vtk) |
c |
g, grav, gravitation, lj, lennardjones | Declares what forces between the particles should be calculated | lj (lennardjones) |
b |
<double> | The brownian motion velocity mean. Will be discarded for the JSON file generated particles | None |
r |
None | Specifies whether random particles should be generated. | None |
m |
normal, debug, benchmark | Specifies which execution mode should be used. Debug to enable logging, normal to disable logging or benchmark to disable all output files | normal |
⚠️ Random generated files only support the input file format of assignment 1. Also, you will need Python 3 to use it.
⚠️ You should mostly use XML input files only
Example:
./MolSim -g ../input_assignment_2.json -e 5 -d 0.0002This will use:
- input_assignment_2.json as
input_filefor the ParticleGenerator - 5 as
end_time, - 0.0002 as
delta_t - vtk as
writer(default) - lennardjones as
calculator(default) - 0.1 as
brownian motion velocity mean(set in the input_file) - normal execution mode (default)
You should mostly just need the XML option, which is the preferred mode of input and the only inputmode that supports all features.
- Create the build directory and cd into it:
mkdir build && cd build - Build everything, including the tests in the build directory by turning on the option:
cmake .. -DBUILD_TEST=ON- Compile everything, including the tests:
make # use "make -j6" for faster compilation- Simply run
ctestin the build directory:
ctestIf you do not want to compile the tests, you can turn off the build option in the CMake by executing cmake without any arguments (Step 2):
cmake .. # Makefile won't build the tests anymoreSee the different READMEs in
/doc_pages/for in depth explanations of all features, examples, media and more.
- Basics with gravitational force
- GTest
- Logging
- LennardJonesPotential
- JSON input files
- First Benchmarks
- XML Parser using the xsdcxx compiler
- Linked Cell method
- boundary conditions
- more benchmarks
- Thermostat
- Gravity
- Checkpointing
- Performance measurements on Linux Cluster
- profiling & optimizations
- Benchmarking
- Membranes
- multiple Parallelization strategies using OpenMP
- different statistic writers
- immovable particles
- smoothed LennardJones and new Thermostat
- data plotting using R
- Install homebrew (taken from https://brew.sh/)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Install xerces-c:
brew install xerces-c- Install GCC 11.1.0:
brew install gcc- Create a build directory and cd into it:
mkdir build && cd build- Execute CMake and set gcc and g++ compiler you just installed:
cmake .. -DCMAKE_C_COMPILER=<path to your gcc-11> -DCMAKE_CXX_COMPILER=<path to your g++-11>If you have installed gcc via homebrew on an M1 (Pro),
then the default path to your gcc-11 is: /opt/homebrew/Cellar/gcc/11.2.0_1/bin/gcc-11.
The default path to your g++-11 is: /opt/homebrew/Cellar/gcc/11.2.0_1/bin/g++-11.
- And finally you can compile everything:
make -j