forked from lijiext/lammps
replace strstr with utils::strmatch
This commit is contained in:
parent
a83147ce20
commit
a7fee0a96f
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue