Commit 9cc0c8ba authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

error exit when requested element is not in potential file

parent 6e1492a8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -405,7 +405,8 @@ void PairAGNI::read_file(char *file)
      for (i = 0; i < nparams; ++i) {
        for (j = 0; j < nelements; ++j)
          if (strcmp(words[i+1],elements[j]) == 0) break;
        if (j == nelements) params[i].ielement = -1;
        if (j == nelements)
          error->all(FLERR,"No suitable parameters for requested element found");
        else params[i].ielement = j;
      }
    } else if (params && (nwords == 2) && (strcmp(words[0],"interaction") == 0)) {