Commit a7fee0a9 authored by abhishandy's avatar abhishandy
Browse files

replace strstr with utils::strmatch

parent a83147ce
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -689,7 +689,7 @@ void PairLJCharmmCoulLong::init_style()
  int irequest;
  int respa = 0;

  if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
  if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
    if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
    if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
  }
@@ -718,7 +718,7 @@ void PairLJCharmmCoulLong::init_style()

  // set & error check interior rRESPA cutoffs

  if (strstr(update->integrate_style,"respa") &&
  if (utils::strmatch(update->integrate_style,"^respa") &&
      ((Respa *) update->integrate)->level_inner >= 0) {
    cut_respa = ((Respa *) update->integrate)->cutoff;
    cut_in_off = cut_respa[0];
+2 −2
Original line number Diff line number Diff line
@@ -659,7 +659,7 @@ void PairLJCutCoulLong::init_style()
  int irequest;
  int respa = 0;

  if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
  if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
    if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
    if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
  }
@@ -676,7 +676,7 @@ void PairLJCutCoulLong::init_style()

  // set rRESPA cutoffs

  if (strstr(update->integrate_style,"respa") &&
  if (utils::strmatch(update->integrate_style,"^respa") &&
      ((Respa *) update->integrate)->level_inner >= 0)
    cut_respa = ((Respa *) update->integrate)->cutoff;
  else cut_respa = NULL;
+3 −3
Original line number Diff line number Diff line
@@ -688,12 +688,12 @@ void PairLJCharmmCoulLongSoft::init_style()
    error->all(FLERR,
               "Pair style lj/charmm/coul/long/soft requires atom attribute q");

  // request regular or rRESPA neighbor list
  // request regular or rRESPA neighbor lists

  int irequest;
  int respa = 0;

  if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
  if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
   if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
   if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
  }
@@ -721,7 +721,7 @@ void PairLJCharmmCoulLongSoft::init_style()

  // set & error check interior rRESPA cutoffs

  if (strstr(update->integrate_style,"respa") &&
  if (utils::strmatch(update->integrate_style,"^respa") &&
      ((Respa *) update->integrate)->level_inner >= 0) {
    cut_respa = ((Respa *) update->integrate)->cutoff;
    if (MIN(cut_lj,cut_coul) < cut_respa[3])
+3 −3
Original line number Diff line number Diff line
@@ -631,12 +631,12 @@ void PairLJCutCoulLongSoft::init_style()
  if (!atom->q_flag)
    error->all(FLERR,"Pair style lj/cut/coul/long/soft requires atom attribute q");

  // request regular or rRESPA neighbor list
  // request regular or rRESPA neighbor lists

  int irequest;
  int respa = 0;

  if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
  if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
    if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
    if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
  }
@@ -653,7 +653,7 @@ void PairLJCutCoulLongSoft::init_style()

  // set rRESPA cutoffs

  if (strstr(update->integrate_style,"respa") &&
  if (utils::strmatch(update->integrate_style,"^respa") &&
      ((Respa *) update->integrate)->level_inner >= 0)
    cut_respa = ((Respa *) update->integrate)->cutoff;
  else cut_respa = NULL;
+3 −3
Original line number Diff line number Diff line
@@ -509,12 +509,12 @@ void PairLJCutSoft::coeff(int narg, char **arg)

void PairLJCutSoft::init_style()
{
  // request regular or rRESPA neighbor list
  // request regular or rRESPA neighbor lists

  int irequest;
  int respa = 0;

  if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) {
  if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) {
    if (((Respa *) update->integrate)->level_inner >= 0) respa = 1;
    if (((Respa *) update->integrate)->level_middle >= 0) respa = 2;
  }
@@ -529,7 +529,7 @@ void PairLJCutSoft::init_style()

  // set rRESPA cutoffs

  if (strstr(update->integrate_style,"respa") &&
  if (utils::strmatch(update->integrate_style,"^respa") &&
      ((Respa *) update->integrate)->level_inner >= 0)
    cut_respa = ((Respa *) update->integrate)->cutoff;
  else cut_respa = NULL;
Loading