The Molecular Density Functional Theory is a collaborative work led by Daniel Borgis and Maximilien Levesque:
First of all, you need to clone this repo.
git clone --recursive https://github.com/yasahi-hpc/Mini_MDFT.gitMini-MDFT is developed with C++20, thus you need newer compilers. To use Mini-MDFT, we need the followings:
CMake 3.22+Kokkos 4.4+gcc 11.0.0+(CPUs, c++20 support is necessary)IntelLLVM 2025.0.0+(CPUs, Intel GPUs)nvcc 11.0.0+(NVIDIA GPUs)rocm 5.6.0+(AMD GPUs)
For compilation, we basically rely on the CMake options for Kokkos. For example, the compile options for A100 GPU is as follows.
cmake -B build \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=20 \
-DKokkos_ENABLE_CUDA=ON \
-DKokkos_ARCH_AMPERE80=ON \
-DKokkosFFT_ENABLE_HOST_AND_DEVICE=ON \
-DMini_MDFT_ENABLE_TESTS=ON \
-DMini_MDFT_ENABLE_INTERNAL_KOKKOS=ON \
-DMini_MDFT_ENABLE_INTERNAL_KOKKOSFFT=ON
cmake --build build -j 8To run the tests, please run the following command.
cd build
ctest --output-on-failureTo run the code, please run the following command.
cd build
./src/mini-MDFT -filename ../input/dft2.json -solute ../input/solute.json -luc_file ../data/dcf/tip3p/tip3p-ck_nonzero_nmax3_mlBenchmark tests have been implemented using Google Benchmark. In order to build the benchmark tests add the following flag when building the project:
-DMini_MDFT_ENABLE_BENCHMARKS=ONGoogle Benchmark will be automatically downloaded and built if it is not already installed in your system. In order to run the tests, go to the directory perf_test inside the build directory and run the executables, whose names will be of the form Kokkos_Benchmark_*. e.g., Kokko_Benchmark_Solvent.
- Port Mini-MDFT function by function with unit-testing
- Add docstrings for each function
- Reconstruct I/O with
json/yamlandhdf5/netcdf - Create a minimal benchmark case for integrated testing and compare the result with Fortran
- Making a PR for each modification and ask for a review if you wish
- Formatting your files by
clang-format -i <file_you_have_modified> - Feel free to use AI tools to convert Fortran code into C++, adding unit-test and docstrings, etc
Mini-MDFT is distributed under the MIT license.