Version: 0.7
VTK/Qt visualiser for simulation runs. This project provides a platform for visualizing molecular dynamics simulations.
- C++17 compatible compiler
- CMake (version 3.10 or later)
- Qt6 (core and charts modules, configured for VTK)
- VTK (version 9.3.1 or later)
-
Clone the repository (if you haven't already):
git clone <repository-url> cd molecular_dynamics_playtest
-
Configure CMake: Create a build directory and run CMake from there:
mkdir build cd build cmake ..- For a Release build (optimized, no debug logging):
cmake .. -DCMAKE_BUILD_TYPE=Release
- For a Debug build (with debug logging):
cmake .. -DCMAKE_BUILD_TYPE=Debug
- For a Release build (optimized, no debug logging):
-
Build the project:
cmake --build .- Alternatively, on a multi-core system, you can speed up the build:
cmake --build . --parallel <number-of-cores>
- Alternatively, on a multi-core system, you can speed up the build:
-
Post-build (Windows): After building, you need to ensure the necessary DLLs are available to the executable. You have two options:
- Use
windeployqt(typically found in your Qt installation'sbindirectory) to automatically copy Qt-related DLLs. You may need to point it to your executable. You will still need to copy the VTK DLLs manually. - Manually copy the required DLLs from the
include/QtRuntimeandinclude/VtkRuntimedirectories (as specified inCMakeLists.txt) into your build directory (e.g.,build/bin/Releaseorbuild/bin/Debug). Theinstallcommands in CMake should handle this if you run the install step.
- Use
After building, you can install the project using:
cmake --install . --prefix <your_desired_install_location>This will copy the executable and necessary runtime DLLs to the specified location (or a default system location if --prefix is not given).
The project is also configured to be packaged into a ZIP file using CPack. To generate the package:
cd build
cpackThis will create a Molecular_Dynamics_Playtest-0.7-win64.zip (or similar, depending on your system) file.
src/: Contains the C++ source code.atoms/: Code related to atom definitions, structures, and interactions.debug/: Logging utilities.geometry/: Geometric primitives (Box, Plane, Vector) and functions.graphs/: Qt chart widgets for displaying energy data.physics/: Physics-related functions.simulation/: Core simulation logic, configuration, and data structures.ui/: User interface elements, including Qt widgets and VTK integration.
include/: Contains pre-built runtime libraries for Qt and VTK.CMakeLists.txt: The main CMake build script.README.md: This file.
Run the executable generated in the build directory (e.g., build/bin/Release/Molecular_Dynamics_Playtest.exe or build/bin/Debug/Molecular_Dynamics_Playtest.exe).