Skip to content

Commit

Permalink
Fix GOMC-WSU#405 Check that RCut and RCutLow are not negative
Browse files Browse the repository at this point in the history
  • Loading branch information
LSchwiebert committed Jan 19, 2022
1 parent be3a380 commit 2731215
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/ConfigSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,14 @@ void ConfigSetup::verifyInputs(void)
std::cout << "Error: Cutoff is not specified!" << std::endl;
exit(EXIT_FAILURE);
}

if(sys.ff.cutoff < 0.0) {
std::cout << "Error: Cutoff cannot be negative!" << std::endl;
exit(EXIT_FAILURE);
}
if(sys.ff.cutoffLow < 0.0) {
sys.ff.cutoffLow = 0.0;
printf("Warning: Short Range Cutoff cannot be negative. Initializing to zero.\n");
}
if(sys.elect.ewald && (sys.elect.tolerance == DBL_MAX)) {
std::cout << "Error: Tolerance is not specified!" << std::endl;
exit(EXIT_FAILURE);
Expand Down

0 comments on commit 2731215

Please sign in to comment.