diff --git a/CMakeLists.txt b/CMakeLists.txt index 5305e8697..0c16e1d69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories(src/GPU) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # clang-tidy -set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,mpi-*,openmp-*) +#set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=-*,mpi-*,openmp-*) #Versioning set (GOMC_VERSION_MAJOR 2) diff --git a/src/moves/TargetedSwap.h b/src/moves/TargetedSwap.h index 11bf6d2a3..1565e2e97 100644 --- a/src/moves/TargetedSwap.h +++ b/src/moves/TargetedSwap.h @@ -421,7 +421,7 @@ inline uint TargetedSwap::GetBoxPairAndMol(const double subDraw, state = PickMolInSubVolume(); #if ENSEMBLE == GCMC - if (state == mv::fail_state::NO_MOL_OF_KIND_IN_BOX && sourceBox == mv::BOX1) { + if (state == mv::fail_state::NO_MOL_OF_KIND_IN_BOX && sourceBox == mv::BOX1 && hasSubVolume[sourceBox]) { std::cout << "Error: There are no molecules of kind " << molRef.kinds[kindIndex].name << " left in reservoir.\n"; exit(EXIT_FAILURE);