Skip to content

This project is developed on the basis of a course named - "High Performance Computing: Molecular dynamics with C++" in University of Freiburg

License

Notifications You must be signed in to change notification settings

Dwaipayan-R-C/MolecularDynamicsCpp

Repository files navigation

Skeleton

This project is developed for a course named - "High Performance Computing: Molecular dynamics with C++" at University of Freiburg. Skeleton for numerical projects with C++. This skeleton uses CMake and automatically downloads Eigen3 and Googletest. To accomplish this course successfully, I cordially thank IMTEK Simulation Department to guide through the process. Also we use Ovito to visualize our atoms and use Numpy, Matplotlib for plots.

Report - High Performance Computing - Molecular dynamics with C++

Folder Structure

.
├── main                                # main file to run the milestone (executable)
│   ├── srcs                            # contains all the source files
│   |   ├── berendseb_thermostat.cpp    
│   |   ├── domain.cpp 
│   |   ├── gupta.cpp 
│   |   ├── ih.C 
│   |   ├── lj_direct_summation.cpp 
│   |   ├── milestones.cpp 
│   |   ├── neighbors.cpp 
│   |   ├── verlet.cpp 
│   |   ├── xyz.cpp 
│   |   └── ... 
│   ├── data                            # contains all the data
│   ├── header                          # contains all the header files
│   ├── plot_code                       # contains all the plots
│   ├── tests                           # contains all the googletests written
│   ├── xyz                             # all xyz inputs are here created using ih.C
│   ├── xyz_output                      # all xyz outputs from different milestones are stored here    
│   |   └── ...                                
│   └── ...
└── ...     

Experiments:

  1. Berendsen Thermostat:
    We use a thermostat to to remove excess energy from the system that is generated from implementing boundary condition for e.g. energy introduced by work performed on our system. We setup a molecular dynamics simulation initially as we are typically far from the equilibrium. And to achieve this equilibrium we might heat the system. Thus, we provide the system with an additional energy by factoring the velocity and then allow it to relax for some time.

  1. Energy conservation for MPI and serialized:
    Energy conservation is an important test to verify if our code and verlet integration is successful in propagating the simulation with time. This simulation is ran with 8 processes.

animated

Also, we present potential energy and kinetic energy vs timestep with adding heat to the system every 2000 fs.

3. Nanowire simulation:
We present the snapshots of the isometric view of the large Nanowire with 51500 atoms and calculated at temperature = 0 K. The red color denotes the HCP lattice, brown being the FCC and yellow denotes the other atoms.

animated

Run

To run the project, navigate to the source code and create this directory,

mkdir build                                                         # Create a build folder
cd build                                                            # inside that folder
cmake ..                                                            # configure the cmake filer
make                                                                # build the project
./myproject                                                         # run the make file
tests/myproject_tests

and to create clusters,

g++ ih.C -o ./build/cluster_file.out                                # create a project file
../build/cluster_file.out 6 2.885 2.74379 >../xyz/custom_923.xyz    # run the project file

About

This project is developed on the basis of a course named - "High Performance Computing: Molecular dynamics with C++" in University of Freiburg

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages