diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index 390005d80e..9ea6739c8e 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -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]; diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index ff20dc2570..13d60e92e2 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -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; diff --git a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp index f0bc491f05..81c1599508 100644 --- a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp @@ -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]) diff --git a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp index 5167cb6a54..c22b2ca673 100644 --- a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp @@ -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; diff --git a/src/USER-FEP/pair_lj_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_soft.cpp index 53e6e61909..92abdf540a 100644 --- a/src/USER-FEP/pair_lj_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_soft.cpp @@ -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; diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index e31e275a7d..60bb7bceee 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -484,7 +484,7 @@ void PairLJCut::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; } @@ -499,7 +499,7 @@ void PairLJCut::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;