MRChemSoft / mrchem

MultiResolution Chemistry
GNU Lesser General Public License v3.0
27 stars 21 forks source link

Sanity checking the multiplicity during input parsing #402

Closed Brakjen closed 2 years ago

Brakjen commented 2 years ago

The motivation for this PR is to help prevent people (me) from submitting jobs to an HPC cluster only to find it failing due to an invalid multiplicity after waiting several hours for it to start 😭

This is a suggestion for a quick sanity check of the specified multiplicity during the input parsing, instead of performing the check only in driver.cpp. Now an invalid multiplicity can be caught during a dry run (no need to call the executable with invalid input). The original check in driver.cpp is untouched, as in principle someone could edit the program.json file directly and pass this to mrchem.x.

The following checks have been added to ./python/mrchem/api.py:

codecov[bot] commented 2 years ago

Codecov Report

Merging #402 (b8e6bad) into master (e7d4b23) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #402   +/-   ##
=======================================
  Coverage   68.91%   68.91%           
=======================================
  Files         180      180           
  Lines       14607    14607           
=======================================
  Hits        10066    10066           
  Misses       4541     4541           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e7d4b23...b8e6bad. Read the comment docs.