Skip to content
Snippets Groups Projects
Commit c71a5e3b authored by Carlo Camilloni's avatar Carlo Camilloni
Browse files

GRID: more informative error message when looking for values outside the grid

[makedoc]
parent 43b67fc0
No related branches found
No related tags found
No related merge requests found
...@@ -143,6 +143,8 @@ Version 2.2.3 () ...@@ -143,6 +143,8 @@ Version 2.2.3 ()
For users: For users:
- Updated patch for gromacs 5.1.x to fix a problem when plumed was trying to write to an already - Updated patch for gromacs 5.1.x to fix a problem when plumed was trying to write to an already
closed gromacs log file. closed gromacs log file.
- When looking for a value outside the GRID now the error include the name of the responsible
collective variable
For developers: For developers:
......
...@@ -171,7 +171,7 @@ Grid::index_t Grid::getIndex(const vector<unsigned> & indices) const { ...@@ -171,7 +171,7 @@ Grid::index_t Grid::getIndex(const vector<unsigned> & indices) const {
if(indices[i]>=nbin_[i]) { if(indices[i]>=nbin_[i]) {
std::string is; std::string is;
Tools::convert(i,is); Tools::convert(i,is);
std::string msg="ERROR: the system is looking for a value outside the grid along the " + is; std::string msg="ERROR: the system is looking for a value outside the grid along the " + is + " ("+getArgNames()[i]+")";
plumed_merror(msg+" index!"); plumed_merror(msg+" index!");
} }
index_t index=indices[dimension_-1]; index_t index=indices[dimension_-1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment