Unverified Commit f547d661 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into more-fmtlib-and-string

# Conflicts:
#	src/write_restart.cpp
parents 9ba84f37 86382854
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ void KimInit::determine_model_type_and_units(char * model_name,
      std::string mesg("Incompatible units for KIM Simulator Model, "
                       "required units = ");
      mesg += *model_units;
      error->all(FLERR,mesg.c_str());
      error->all(FLERR,mesg);
    }
  }
}
@@ -328,8 +328,7 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM
      mesg += "\n";
      mesg += "#\n";

      if (screen) fputs(mesg.c_str(),screen);
      if (logfile) fputs(mesg.c_str(),logfile);
      utils::logmesg(lmp,mesg);
    }

    fix_store->setptr("simulator_model", (void *) simulatorModel);
@@ -346,7 +345,7 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units, KIM

  std::string cmd("units ");
  cmd += model_units;
  input->one(cmd.c_str());
  input->one(cmd);

  if (model_type == SM) {
    int sim_fields, sim_lines;
@@ -519,7 +518,7 @@ void KimInit::do_variables(char *user_units, char *model_units)
                        "unit = " + units[i] + "; "
                        "from = " + from + "; "
                        "to = " + to + ".";
      error->all(FLERR,err.c_str());
      error->all(FLERR,err);
    }
    variable->internal_set(v_unit,conversion_factor);
    if (comm->me == 0) {
+3 −3
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ void KimInteractions::do_setup(int narg, char **arg)
          std::string msg("Species '");
          msg += strword;
          msg += "' is not supported by this KIM Simulator Model";
          error->all(FLERR,msg.c_str());
          error->all(FLERR,msg);
        }
        strword = strtok(NULL," \t");
      }
@@ -276,8 +276,8 @@ void KimInteractions::do_setup(int narg, char **arg)
      cmd2 += " ";
    }

    input->one(cmd1.c_str());
    input->one(cmd2.c_str());
    input->one(cmd1);
    input->one(cmd2);
  }

  // End output to log file
+11 −11
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ void KimParam::command(int narg, char **arg)
  if (!kim_param_get && !kim_param_set) {
    std::string msg("Incorrect arguments in kim_param command.\n");
    msg += "'kim_param get/set' is mandatory.";
    error->all(FLERR, msg.c_str());
    error->all(FLERR, msg);
  }

  // Check if we called a kim_init command
@@ -225,7 +225,7 @@ void KimParam::command(int narg, char **arg)
      msg += "To set the new parameter values, pair style must be assigned.\n";
      msg += "Must use 'kim_interactions' or";
      msg += "'pair_style kim ' before 'kim_param set'";
      error->all(FLERR, msg.c_str());
      error->all(FLERR, msg);
    } else {
      KIM_LengthUnit lengthUnit;
      KIM_EnergyUnit energyUnit;
@@ -296,7 +296,7 @@ void KimParam::command(int narg, char **arg)
          msg += "This Model does not have the requested '";
          msg += paramname;
          msg += "' parameter.";
          error->all(FLERR, msg.c_str());
          error->all(FLERR, msg);
        }

        // Get the index_range for the requested parameter
@@ -313,7 +313,7 @@ void KimParam::command(int narg, char **arg)
            msg += "Expected integer parameter(s) instead of '";
            msg += argtostr;
            msg += "' in index_range.";
            error->all(FLERR, msg.c_str());
            error->all(FLERR, msg);
          }

          std::string::size_type npos = argtostr.find(':');
@@ -330,7 +330,7 @@ void KimParam::command(int narg, char **arg)
              msg += "' parameter with extent of '";
              msg += SNUM(extent);
              msg += "' .";
              error->all(FLERR, msg.c_str());
              error->all(FLERR, msg);
            }
          } else {
            std::stringstream str(argtostr);
@@ -342,7 +342,7 @@ void KimParam::command(int narg, char **arg)
              msg += "' with the extent of '";
              msg += SNUM(extent);
              msg += "' .";
              error->all(FLERR, msg.c_str());
              error->all(FLERR, msg);
            }
            nubound = nlbound;
          }
@@ -350,7 +350,7 @@ void KimParam::command(int narg, char **arg)
          std::string msg("Wrong number of arguments in ");
          msg += "kim_param get command.\n";
          msg += "Index range after parameter name is mandatory.";
          error->all(FLERR, msg.c_str());
          error->all(FLERR, msg);
        }

        int const nvars = nubound - nlbound + 1;
@@ -363,7 +363,7 @@ void KimParam::command(int narg, char **arg)
          std::string msg("Wrong number of arguments in ");
          msg += "kim_param get command.\n";
          msg += "The LAMMPS variable name is mandatory.";
          error->all(FLERR, msg.c_str());
          error->all(FLERR, msg);
        }

        // indicator flag for list request
@@ -400,7 +400,7 @@ void KimParam::command(int narg, char **arg)
              msg += "' variable names or '";
              msg += varname;
              msg += " split' is mandatory.";
              error->all(FLERR, msg.c_str());
              error->all(FLERR, msg);
            }
          } else {
            std::string msg("Wrong number of arguments in ");
@@ -410,7 +410,7 @@ void KimParam::command(int narg, char **arg)
            msg += "' variable names or '";
            msg += varname;
            msg += " split/list' is mandatory.";
            error->all(FLERR, msg.c_str());
            error->all(FLERR, msg);
          }
        } else {
          varsname = new char *[1];
@@ -524,7 +524,7 @@ void KimParam::command(int narg, char **arg)
        set_cmd += " ";
        set_cmd += arg[i];
      }
      input->one(set_cmd.c_str());
      input->one(set_cmd);
    }
  } else
    error->all(FLERR, "This model has No mutable parameters.");
+2 −2
Original line number Diff line number Diff line
@@ -100,13 +100,13 @@ void kimProperty::command(int narg, char **arg)
    std::string msg("Error incorrect arguments in kim_property command.\n");
    msg += "`kim_property create/destroy/modify/remove/dump` ";
    msg += "is mandatory.";
    error->all(FLERR, msg.c_str());
    error->all(FLERR, msg);
  }

  if (comm->me == 0) {
    std::string msg;
    msg = "#=== kim-property ===========================================\n";
    input->write_echo(msg.c_str());
    input->write_echo(msg);
  }

  // Get the kim_str ptr to the data associated with a kim_property_str
+9 −9
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ void PairKIM::coeff(int narg, char **arg)
    } else {
      std::string msg("create_kim_particle_codes: symbol not found: ");
      msg += lmps_unique_elements[i];
      error->all(FLERR, msg.c_str());
      error->all(FLERR, msg);
    }
  }
  // Set the new values for PM parameters
@@ -441,7 +441,7 @@ void PairKIM::coeff(int narg, char **arg)
    if (!numberOfParameters) {
      std::string msg("Incorrect args for pair coefficients \n");
      msg += "This model has No mutable parameters.";
      error->all(FLERR, msg.c_str());
      error->all(FLERR, msg);
    }

    int kimerror;
@@ -477,7 +477,7 @@ void PairKIM::coeff(int narg, char **arg)
        msg += "This Model does not have the requested '";
        msg += paramname;
        msg += "' parameter.";
        error->all(FLERR, msg.c_str());
        error->all(FLERR, msg);
      }

      // Get the index_range for the requested parameter
@@ -493,7 +493,7 @@ void PairKIM::coeff(int narg, char **arg)
          msg += "Expected integer parameter(s) instead of '";
          msg += argtostr;
          msg += "' in index_range.";
          error->all(FLERR, msg.c_str());
          error->all(FLERR, msg);
        }

        std::string::size_type npos = argtostr.find(':');
@@ -510,7 +510,7 @@ void PairKIM::coeff(int narg, char **arg)
            msg += "' parameter with extent of '";
            msg += SNUM(extent);
            msg += "' .";
            error->all(FLERR, msg.c_str());
            error->all(FLERR, msg);
          }
        } else {
          std::stringstream str(argtostr);
@@ -522,7 +522,7 @@ void PairKIM::coeff(int narg, char **arg)
            msg += "' parameter with extent of '";
            msg += SNUM(extent);
            msg += "' .";
            error->all(FLERR, msg.c_str());
            error->all(FLERR, msg);
          }
          nubound = nlbound;
        }
@@ -530,7 +530,7 @@ void PairKIM::coeff(int narg, char **arg)
        std::string msg =
        "Wrong number of arguments for pair coefficients.\n";
        msg += "Index range after parameter name is mandatory.";
        error->all(FLERR, msg.c_str());
        error->all(FLERR, msg);
      }

      // Parameter values
@@ -561,7 +561,7 @@ void PairKIM::coeff(int narg, char **arg)
        msg += "' values are requested for '";
        msg += paramname;
        msg += "' parameter.";
        error->all(FLERR, msg.c_str());
        error->all(FLERR, msg);
      }
    }

@@ -1122,7 +1122,7 @@ void PairKIM::set_kim_model_has_flags()
                                     KIM_SUPPORT_STATUS_required)) {
      std::string msg("KIM Model requires unsupported compute argument: ");
      msg += KIM_ComputeArgumentName_ToString(computeArgumentName);
      error->all(FLERR, msg.c_str());
      error->all(FLERR, msg);
    }
  }

Loading