From f62b317d376bccb56dc4521a63a15b54cdf12054 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 20 Jun 2011 16:42:39 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6452 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/GRANULAR/fix_freeze.cpp | 2 +- src/GRANULAR/fix_wall_gran.cpp | 4 ++-- src/KSPACE/pair_coul_long.cpp | 2 +- src/KSPACE/pair_lj_charmm_coul_long.cpp | 4 ++-- src/KSPACE/pair_lj_cut_coul_long.cpp | 4 ++-- src/MANYBODY/fix_qeq_comb.cpp | 4 ++-- src/MOLECULE/fix_bond_break.cpp | 2 +- src/MOLECULE/fix_bond_create.cpp | 2 +- src/POEMS/fix_poems.cpp | 2 +- src/USER-AWPMD/fix_nve_awpmd.cpp | 2 +- src/USER-CG-CMM/pair_cg_cmm_coul_cut.cpp | 2 +- src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp | 2 +- src/USER-CG-CMM/pair_cmm_common.cpp | 2 +- src/USER-CUDA/fix_addforce_cuda.cpp | 4 ++-- src/USER-CUDA/fix_aveforce_cuda.cpp | 4 ++-- src/USER-CUDA/fix_enforce2d_cuda.cpp | 2 +- src/USER-CUDA/fix_freeze_cuda.cpp | 2 +- src/USER-CUDA/fix_gravity_cuda.cpp | 2 +- src/USER-CUDA/fix_nh_cuda.cpp | 4 ++-- src/USER-CUDA/fix_nve_cuda.cpp | 2 +- src/USER-CUDA/fix_set_force_cuda.cpp | 4 ++-- src/USER-CUDA/fix_shake_cuda.cpp | 6 +++--- src/USER-CUDA/pair_born_coul_long_cuda.cpp | 2 +- src/USER-CUDA/pair_buck_coul_cut_cuda.cpp | 2 +- src/USER-CUDA/pair_buck_coul_long_cuda.cpp | 2 +- src/USER-CUDA/pair_buck_cuda.cpp | 2 +- src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.cpp | 2 +- src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.cpp | 2 +- src/USER-CUDA/pair_cg_cmm_coul_long_cuda.cpp | 2 +- src/USER-CUDA/pair_cg_cmm_cuda.cpp | 2 +- src/USER-CUDA/pair_gran_hooke_cuda.cpp | 2 +- src/USER-CUDA/pair_lj96_cut_cuda.cpp | 2 +- src/USER-CUDA/pair_lj_cut_coul_long_cuda.cpp | 4 ++-- src/USER-CUDA/pair_lj_cut_cuda.cpp | 2 +- src/USER-CUDA/pair_lj_cut_experimental_cuda.cpp | 2 +- src/USER-CUDA/pair_lj_expand_cuda.cpp | 2 +- src/USER-CUDA/pair_morse_cuda.cpp | 2 +- src/USER-EFF/fix_nve_eff.cpp | 2 +- src/USER-EWALDN/pair_buck_coul.cpp | 4 ++-- src/USER-EWALDN/pair_lj_coul.cpp | 4 ++-- src/USER-IMD/fix_imd.cpp | 2 +- src/USER-REAXC/fix_qeq_reax.cpp | 2 +- src/USER-SMD/fix_smd.cpp | 4 ++-- src/fix_addforce.cpp | 4 ++-- src/fix_aveforce.cpp | 4 ++-- src/fix_drag.cpp | 4 ++-- src/fix_dt_reset.cpp | 2 +- src/fix_efield.cpp | 4 ++-- src/fix_enforce2d.cpp | 2 +- src/fix_gravity.cpp | 4 ++-- src/fix_indent.cpp | 4 ++-- src/fix_langevin.cpp | 4 ++-- src/fix_lineforce.cpp | 2 +- src/fix_move.cpp | 2 +- src/fix_nh.cpp | 4 ++-- src/fix_nve.cpp | 2 +- src/fix_nve_limit.cpp | 2 +- src/fix_nve_noforce.cpp | 2 +- src/fix_orient_fcc.cpp | 4 ++-- src/fix_planeforce.cpp | 2 +- src/fix_rigid.cpp | 2 +- src/fix_setforce.cpp | 4 ++-- src/fix_shake.cpp | 6 +++--- src/fix_spring.cpp | 4 ++-- src/fix_spring_rg.cpp | 4 ++-- src/fix_spring_self.cpp | 4 ++-- src/fix_store_force.cpp | 4 ++-- src/fix_tmd.cpp | 2 +- src/fix_ttm.cpp | 4 ++-- src/fix_viscous.cpp | 4 ++-- src/fix_wall.cpp | 4 ++-- src/fix_wall_region.cpp | 4 ++-- src/neighbor.cpp | 2 +- src/pair_lj96_cut.cpp | 4 ++-- src/pair_lj_cut.cpp | 4 ++-- 75 files changed, 111 insertions(+), 111 deletions(-) diff --git a/src/GRANULAR/fix_freeze.cpp b/src/GRANULAR/fix_freeze.cpp index bd4b76a92c..997337a67b 100644 --- a/src/GRANULAR/fix_freeze.cpp +++ b/src/GRANULAR/fix_freeze.cpp @@ -68,7 +68,7 @@ void FixFreeze::init() void FixFreeze::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { int nlevels_respa = ((Respa *) update->integrate)->nlevels; diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index d8da32fc1a..9758283399 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -215,7 +215,7 @@ void FixWallGran::init() { dt = update->dt; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; // set pairstyle from granular pair style @@ -233,7 +233,7 @@ void FixWallGran::init() void FixWallGran::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index c2d01d1526..fd8d90b3f7 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -246,7 +246,7 @@ void PairCoulLong::init_style() // set & error check interior rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(update->integrate_style,"respa") && ((Respa *) update->integrate)->level_inner >= 0) { cut_respa = ((Respa *) update->integrate)->cutoff; if (cut_coul < cut_respa[3]) diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index d87d0c2ba1..539cf34f73 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -714,7 +714,7 @@ void PairLJCharmmCoulLong::init_style() int irequest; - if (update->whichflag == 1 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -761,7 +761,7 @@ void PairLJCharmmCoulLong::init_style() // set & error check interior rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index fb9617bfca..7ab653b58b 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -655,7 +655,7 @@ void PairLJCutCoulLong::init_style() int irequest; - if (update->whichflag == 1 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -691,7 +691,7 @@ void PairLJCutCoulLong::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(update->integrate_style,"respa") && ((Respa *) update->integrate)->level_inner >= 0) cut_respa = ((Respa *) update->integrate)->cutoff; else cut_respa = NULL; diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index 3ef515acdd..d1537f78bf 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -116,7 +116,7 @@ void FixQEQComb::init() comb = (PairComb *) force->pair_match("comb",1); if (comb == NULL) error->all("Must use pair_style comb with fix qeq/comb"); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; ngroup = group->count(igroup); @@ -128,7 +128,7 @@ void FixQEQComb::init() void FixQEQComb::setup(int vflag) { firstflag = 1; - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/MOLECULE/fix_bond_break.cpp b/src/MOLECULE/fix_bond_break.cpp index 118d8b2cb6..2b9f44e1e6 100755 --- a/src/MOLECULE/fix_bond_break.cpp +++ b/src/MOLECULE/fix_bond_break.cpp @@ -147,7 +147,7 @@ void FixBondBreak::init() "dihedrals, or impropers"); } - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } diff --git a/src/MOLECULE/fix_bond_create.cpp b/src/MOLECULE/fix_bond_create.cpp index 68689c4209..be7491fe53 100755 --- a/src/MOLECULE/fix_bond_create.cpp +++ b/src/MOLECULE/fix_bond_create.cpp @@ -206,7 +206,7 @@ void FixBondCreate::init() neighbor->requests[irequest]->pair = 0; neighbor->requests[irequest]->fix = 1; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 77d06affee..8fe57abaa1 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -353,7 +353,7 @@ void FixPOEMS::init() // rRESPA info - if (strcmp(update->integrate_style,"respa") == 0) { + if (strstr(update->integrate_style,"respa")) { step_respa = ((Respa *) update->integrate)->step; nlevels_respa = ((Respa *) update->integrate)->nlevels; } diff --git a/src/USER-AWPMD/fix_nve_awpmd.cpp b/src/USER-AWPMD/fix_nve_awpmd.cpp index d4349b47c8..418b942ecd 100644 --- a/src/USER-AWPMD/fix_nve_awpmd.cpp +++ b/src/USER-AWPMD/fix_nve_awpmd.cpp @@ -62,7 +62,7 @@ void FixNVEAwpmd::init() dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; awpmd_pair=(PairAWPMDCut *)force->pair; diff --git a/src/USER-CG-CMM/pair_cg_cmm_coul_cut.cpp b/src/USER-CG-CMM/pair_cg_cmm_coul_cut.cpp index 87b9db2ba8..7b270b351c 100644 --- a/src/USER-CG-CMM/pair_cg_cmm_coul_cut.cpp +++ b/src/USER-CG-CMM/pair_cg_cmm_coul_cut.cpp @@ -73,7 +73,7 @@ void PairCGCMMCoulCut::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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-CG-CMM/pair_cg_cmm_coul_long.cpp b/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp index 567f92e930..2947b3ce64 100644 --- a/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp +++ b/src/USER-CG-CMM/pair_cg_cmm_coul_long.cpp @@ -97,7 +97,7 @@ void PairCGCMMCoulLong::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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-CG-CMM/pair_cmm_common.cpp b/src/USER-CG-CMM/pair_cmm_common.cpp index 8dc7e9cace..043716e9f0 100644 --- a/src/USER-CG-CMM/pair_cmm_common.cpp +++ b/src/USER-CG-CMM/pair_cmm_common.cpp @@ -187,7 +187,7 @@ void PairCMMCommon::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; diff --git a/src/USER-CUDA/fix_addforce_cuda.cpp b/src/USER-CUDA/fix_addforce_cuda.cpp index acb83aa133..acf4d6d7ec 100644 --- a/src/USER-CUDA/fix_addforce_cuda.cpp +++ b/src/USER-CUDA/fix_addforce_cuda.cpp @@ -99,7 +99,7 @@ void FixAddForceCuda::init() { if(not cu_foriginal) cu_foriginal = new cCudaData (foriginal,4); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -109,7 +109,7 @@ void FixAddForceCuda::setup(int vflag) { MYDBG( printf("# CUDA: FixAddForceCuda::setup\n"); ) - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) { Cuda_FixAddForceCuda_Init(&cuda->shared_data); cuda->cu_f->upload(); diff --git a/src/USER-CUDA/fix_aveforce_cuda.cpp b/src/USER-CUDA/fix_aveforce_cuda.cpp index 06d81ad182..10b4555e86 100644 --- a/src/USER-CUDA/fix_aveforce_cuda.cpp +++ b/src/USER-CUDA/fix_aveforce_cuda.cpp @@ -101,7 +101,7 @@ void FixAveForceCuda::init() { if(not cu_foriginal) cu_foriginal = new cCudaData (foriginal,4); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; // ncount = total # of atoms in group @@ -114,7 +114,7 @@ void FixAveForceCuda::init() void FixAveForceCuda::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) { Cuda_FixAveForceCuda_Init(&cuda->shared_data); cuda->cu_f->upload(); diff --git a/src/USER-CUDA/fix_enforce2d_cuda.cpp b/src/USER-CUDA/fix_enforce2d_cuda.cpp index 3ad0a0bbcc..91a1661c08 100644 --- a/src/USER-CUDA/fix_enforce2d_cuda.cpp +++ b/src/USER-CUDA/fix_enforce2d_cuda.cpp @@ -90,7 +90,7 @@ void FixEnforce2DCuda::init() void FixEnforce2DCuda::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) { Cuda_FixEnforce2dCuda_Init(&cuda->shared_data); cuda->cu_f->upload(); diff --git a/src/USER-CUDA/fix_freeze_cuda.cpp b/src/USER-CUDA/fix_freeze_cuda.cpp index c9ff85e4ec..d52642280e 100644 --- a/src/USER-CUDA/fix_freeze_cuda.cpp +++ b/src/USER-CUDA/fix_freeze_cuda.cpp @@ -90,7 +90,7 @@ void FixFreezeCuda::setup(int vflag) { MYDBG( printf("# CUDA: FixFreezeCuda::setup\n"); ) - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) { Cuda_FixFreezeCuda_Init(&cuda->shared_data); cuda->cu_f->upload(); diff --git a/src/USER-CUDA/fix_gravity_cuda.cpp b/src/USER-CUDA/fix_gravity_cuda.cpp index fbd902d170..0c69dffcc1 100644 --- a/src/USER-CUDA/fix_gravity_cuda.cpp +++ b/src/USER-CUDA/fix_gravity_cuda.cpp @@ -135,7 +135,7 @@ void FixGravityCuda::setup(int vflag) { MYDBG( printf("# CUDA: FixGravityCuda::setup\n"); ) - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) { Cuda_FixGravityCuda_Init(&cuda->shared_data); cuda->cu_f->upload(); diff --git a/src/USER-CUDA/fix_nh_cuda.cpp b/src/USER-CUDA/fix_nh_cuda.cpp index 4152e56244..45cfd2616a 100644 --- a/src/USER-CUDA/fix_nh_cuda.cpp +++ b/src/USER-CUDA/fix_nh_cuda.cpp @@ -547,7 +547,7 @@ void FixNHCuda::init() if (force->kspace) kspace_flag = 1; else kspace_flag = 0; - if (strcmp(update->integrate_style,"respa") == 0) { + if (strstr(update->integrate_style,"respa")) { nlevels_respa = ((Respa *) update->integrate)->nlevels; step_respa = ((Respa *) update->integrate)->step; dto = 0.5*step_respa[0]; @@ -1550,7 +1550,7 @@ void FixNHCuda::reset_dt() // If using respa, then remap is performed in innermost level - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) dto = 0.5*step_respa[0]; p_freq_max = 0.0; diff --git a/src/USER-CUDA/fix_nve_cuda.cpp b/src/USER-CUDA/fix_nve_cuda.cpp index a3e8e73abf..88ef34dbfe 100644 --- a/src/USER-CUDA/fix_nve_cuda.cpp +++ b/src/USER-CUDA/fix_nve_cuda.cpp @@ -83,7 +83,7 @@ void FixNVECuda::init() dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; triggerneighsq= cuda->shared_data.atom.triggerneighsq; diff --git a/src/USER-CUDA/fix_set_force_cuda.cpp b/src/USER-CUDA/fix_set_force_cuda.cpp index 39fbb1e62a..bd9665c8cc 100644 --- a/src/USER-CUDA/fix_set_force_cuda.cpp +++ b/src/USER-CUDA/fix_set_force_cuda.cpp @@ -82,7 +82,7 @@ void FixSetForceCuda::init() { if(not cu_foriginal) cu_foriginal = new cCudaData (foriginal,3); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -92,7 +92,7 @@ void FixSetForceCuda::setup(int vflag) { MYDBG( printf("# CUDA: FixSetForceCuda::setup\n"); ) - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) { Cuda_FixSetForceCuda_Init(&cuda->shared_data); cuda->cu_f->upload(); diff --git a/src/USER-CUDA/fix_shake_cuda.cpp b/src/USER-CUDA/fix_shake_cuda.cpp index 46220e3f69..20883889cf 100644 --- a/src/USER-CUDA/fix_shake_cuda.cpp +++ b/src/USER-CUDA/fix_shake_cuda.cpp @@ -336,7 +336,7 @@ void FixShakeCuda::init() // could have changed locations in fix list since created // set ptrs to rRESPA variables - if (strcmp(update->integrate_style,"respa") == 0) { + if (strstr(update->integrate_style,"respa")) { for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"RESPA") == 0) ifix_respa = i; nlevels_respa = ((Respa *) update->integrate)->nlevels; @@ -431,7 +431,7 @@ void FixShakeCuda::setup(int vflag) // half timestep constraint on pre-step, full timestep thereafter - if (strcmp(update->integrate_style,"verlet") == 0) { + if (strstr(update->integrate_style,"verlet")) { dtv = update->dt; dtfsq = 0.5 * update->dt * update->dt * force->ftm2v; post_force(vflag); @@ -2603,7 +2603,7 @@ void FixShakeCuda::unpack_comm(int n, int first, double *buf) void FixShakeCuda::reset_dt() { - if (strcmp(update->integrate_style,"verlet") == 0) { + if (strstr(update->integrate_style,"verlet")) { dtv = update->dt; dtfsq = update->dt * update->dt * force->ftm2v; } else { diff --git a/src/USER-CUDA/pair_born_coul_long_cuda.cpp b/src/USER-CUDA/pair_born_coul_long_cuda.cpp index 2648099408..8e107a515b 100644 --- a/src/USER-CUDA/pair_born_coul_long_cuda.cpp +++ b/src/USER-CUDA/pair_born_coul_long_cuda.cpp @@ -139,7 +139,7 @@ void PairBornCoulLongCuda::init_style() int irequest; - if (strcmp(update->integrate_style,"respa") == 0) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); + if (strstr(update->integrate_style,"respa")) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); irequest = neighbor->request(this); neighbor->requests[irequest]->full = 1; diff --git a/src/USER-CUDA/pair_buck_coul_cut_cuda.cpp b/src/USER-CUDA/pair_buck_coul_cut_cuda.cpp index 1826243197..76d56d4263 100644 --- a/src/USER-CUDA/pair_buck_coul_cut_cuda.cpp +++ b/src/USER-CUDA/pair_buck_coul_cut_cuda.cpp @@ -132,7 +132,7 @@ void PairBuckCoulCutCuda::init_style() int irequest; - if (strcmp(update->integrate_style,"respa") == 0) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); + if (strstr(update->integrate_style,"respa")) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); irequest = neighbor->request(this); neighbor->requests[irequest]->full = 1; diff --git a/src/USER-CUDA/pair_buck_coul_long_cuda.cpp b/src/USER-CUDA/pair_buck_coul_long_cuda.cpp index abab491846..e825ee90bc 100644 --- a/src/USER-CUDA/pair_buck_coul_long_cuda.cpp +++ b/src/USER-CUDA/pair_buck_coul_long_cuda.cpp @@ -137,7 +137,7 @@ void PairBuckCoulLongCuda::init_style() int irequest; - if (strcmp(update->integrate_style,"respa") == 0) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); + if (strstr(update->integrate_style,"respa")) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); irequest = neighbor->request(this); neighbor->requests[irequest]->full = 1; diff --git a/src/USER-CUDA/pair_buck_cuda.cpp b/src/USER-CUDA/pair_buck_cuda.cpp index 53dfbbfc85..a4c4f15bd3 100644 --- a/src/USER-CUDA/pair_buck_cuda.cpp +++ b/src/USER-CUDA/pair_buck_cuda.cpp @@ -129,7 +129,7 @@ void PairBuckCuda::init_style() int irequest; - if (strcmp(update->integrate_style,"respa") == 0) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); + if (strstr(update->integrate_style,"respa")) error->all("Integrate Style Respa is not supported by pair style buck/coul/long/cuda"); irequest = neighbor->request(this); neighbor->requests[irequest]->full = 1; diff --git a/src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.cpp b/src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.cpp index c0128777da..2a4f7d2a97 100644 --- a/src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.cpp +++ b/src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.cpp @@ -157,7 +157,7 @@ void PairCGCMMCoulCutCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.cpp b/src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.cpp index 6637c3dc89..12b9169dc5 100644 --- a/src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.cpp +++ b/src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.cpp @@ -157,7 +157,7 @@ void PairCGCMMCoulDebyeCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_cg_cmm_coul_long_cuda.cpp b/src/USER-CUDA/pair_cg_cmm_coul_long_cuda.cpp index fe8038900e..2e8e2d0c90 100644 --- a/src/USER-CUDA/pair_cg_cmm_coul_long_cuda.cpp +++ b/src/USER-CUDA/pair_cg_cmm_coul_long_cuda.cpp @@ -158,7 +158,7 @@ void PairCGCMMCoulLongCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_cg_cmm_cuda.cpp b/src/USER-CUDA/pair_cg_cmm_cuda.cpp index c08bf45b55..f7db7ef96b 100644 --- a/src/USER-CUDA/pair_cg_cmm_cuda.cpp +++ b/src/USER-CUDA/pair_cg_cmm_cuda.cpp @@ -156,7 +156,7 @@ void PairCGCMMCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_gran_hooke_cuda.cpp b/src/USER-CUDA/pair_gran_hooke_cuda.cpp index bcdefac7f4..6d3dd73248 100644 --- a/src/USER-CUDA/pair_gran_hooke_cuda.cpp +++ b/src/USER-CUDA/pair_gran_hooke_cuda.cpp @@ -149,7 +149,7 @@ void PairGranHookeCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_lj96_cut_cuda.cpp b/src/USER-CUDA/pair_lj96_cut_cuda.cpp index 2550be94ac..c5ad2b1ad1 100644 --- a/src/USER-CUDA/pair_lj96_cut_cuda.cpp +++ b/src/USER-CUDA/pair_lj96_cut_cuda.cpp @@ -139,7 +139,7 @@ void PairLJ96CutCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_lj_cut_coul_long_cuda.cpp b/src/USER-CUDA/pair_lj_cut_coul_long_cuda.cpp index bdf4c367df..3498421f17 100644 --- a/src/USER-CUDA/pair_lj_cut_coul_long_cuda.cpp +++ b/src/USER-CUDA/pair_lj_cut_coul_long_cuda.cpp @@ -133,7 +133,7 @@ void PairLJCutCoulLongCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -177,7 +177,7 @@ void PairLJCutCoulLongCuda::init_style() cuda->shared_data.pair.cut_coulsq_global=cut_coulsq; // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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-CUDA/pair_lj_cut_cuda.cpp b/src/USER-CUDA/pair_lj_cut_cuda.cpp index 52c2cf7d03..0d8304ad9b 100644 --- a/src/USER-CUDA/pair_lj_cut_cuda.cpp +++ b/src/USER-CUDA/pair_lj_cut_cuda.cpp @@ -139,7 +139,7 @@ void PairLJCutCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_lj_cut_experimental_cuda.cpp b/src/USER-CUDA/pair_lj_cut_experimental_cuda.cpp index 1cc3881628..408eb21935 100644 --- a/src/USER-CUDA/pair_lj_cut_experimental_cuda.cpp +++ b/src/USER-CUDA/pair_lj_cut_experimental_cuda.cpp @@ -138,7 +138,7 @@ void PairLJCutExperimentalCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_lj_expand_cuda.cpp b/src/USER-CUDA/pair_lj_expand_cuda.cpp index 045fa6bce1..a326c633f5 100644 --- a/src/USER-CUDA/pair_lj_expand_cuda.cpp +++ b/src/USER-CUDA/pair_lj_expand_cuda.cpp @@ -141,7 +141,7 @@ void PairLJExpandCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-CUDA/pair_morse_cuda.cpp b/src/USER-CUDA/pair_morse_cuda.cpp index ed67c11854..2ad2bb7ea4 100644 --- a/src/USER-CUDA/pair_morse_cuda.cpp +++ b/src/USER-CUDA/pair_morse_cuda.cpp @@ -138,7 +138,7 @@ void PairMorseCuda::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { } else diff --git a/src/USER-EFF/fix_nve_eff.cpp b/src/USER-EFF/fix_nve_eff.cpp index 134317ddeb..392f6b7862 100644 --- a/src/USER-EFF/fix_nve_eff.cpp +++ b/src/USER-EFF/fix_nve_eff.cpp @@ -58,7 +58,7 @@ void FixNVEEff::init() dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; } diff --git a/src/USER-EWALDN/pair_buck_coul.cpp b/src/USER-EWALDN/pair_buck_coul.cpp index 41a611a5a9..bb2f4f0ed0 100644 --- a/src/USER-EWALDN/pair_buck_coul.cpp +++ b/src/USER-EWALDN/pair_buck_coul.cpp @@ -237,7 +237,7 @@ void PairBuckCoul::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -273,7 +273,7 @@ void PairBuckCoul::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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-EWALDN/pair_lj_coul.cpp b/src/USER-EWALDN/pair_lj_coul.cpp index 81a15a0bda..b6ee94bbda 100644 --- a/src/USER-EWALDN/pair_lj_coul.cpp +++ b/src/USER-EWALDN/pair_lj_coul.cpp @@ -235,7 +235,7 @@ void PairLJCoul::init_style() int irequest; - if (update->whichflag == 0 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 0 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -271,7 +271,7 @@ void PairLJCoul::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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-IMD/fix_imd.cpp b/src/USER-IMD/fix_imd.cpp index 758947dd6d..790121254b 100644 --- a/src/USER-IMD/fix_imd.cpp +++ b/src/USER-IMD/fix_imd.cpp @@ -342,7 +342,7 @@ int FixIMD::setmask() /* ---------------------------------------------------------------------- */ void FixIMD::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; return; diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 0ae8ea74a8..6a2bba5d8e 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -294,7 +294,7 @@ void FixQEqReax::init() init_shielding(); init_taper(); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } diff --git a/src/USER-SMD/fix_smd.cpp b/src/USER-SMD/fix_smd.cpp index 239b3655c5..4d251d3fe3 100644 --- a/src/USER-SMD/fix_smd.cpp +++ b/src/USER-SMD/fix_smd.cpp @@ -154,7 +154,7 @@ void FixSMD::init() zn = dz/r_old; } - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -162,7 +162,7 @@ void FixSMD::init() void FixSMD::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index 34f9adb166..fa5c3be606 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -183,7 +183,7 @@ void FixAddForce::init() update->whichflag == 2 && estyle == NONE) error->all("Must use variable energy with fix addforce"); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -191,7 +191,7 @@ void FixAddForce::init() void FixAddForce::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_aveforce.cpp b/src/fix_aveforce.cpp index 8d0865c19a..b4fd4f333a 100644 --- a/src/fix_aveforce.cpp +++ b/src/fix_aveforce.cpp @@ -154,7 +154,7 @@ void FixAveForce::init() if (xstyle == EQUAL || ystyle == EQUAL || zstyle == EQUAL) varflag = EQUAL; else varflag = CONSTANT; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -162,7 +162,7 @@ void FixAveForce::init() void FixAveForce::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { diff --git a/src/fix_drag.cpp b/src/fix_drag.cpp index 2d93d4a66f..357495bd67 100644 --- a/src/fix_drag.cpp +++ b/src/fix_drag.cpp @@ -65,7 +65,7 @@ int FixDrag::setmask() void FixDrag::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -73,7 +73,7 @@ void FixDrag::init() void FixDrag::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_dt_reset.cpp b/src/fix_dt_reset.cpp index 2e6e48c643..8991a879e5 100644 --- a/src/fix_dt_reset.cpp +++ b/src/fix_dt_reset.cpp @@ -109,7 +109,7 @@ void FixDtReset::init() // set rRESPA flag respaflag = 0; - if (strcmp(update->integrate_style,"respa") == 0) respaflag = 1; + if (strstr(update->integrate_style,"respa")) respaflag = 1; // check for DCD or XTC dumps diff --git a/src/fix_efield.cpp b/src/fix_efield.cpp index 78eca23a81..31c7ba147a 100644 --- a/src/fix_efield.cpp +++ b/src/fix_efield.cpp @@ -130,7 +130,7 @@ void FixEfield::init() varflag = EQUAL; else varflag = CONSTANT; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -138,7 +138,7 @@ void FixEfield::init() void FixEfield::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_enforce2d.cpp b/src/fix_enforce2d.cpp index 45b77cbf35..c08c1ecdce 100644 --- a/src/fix_enforce2d.cpp +++ b/src/fix_enforce2d.cpp @@ -52,7 +52,7 @@ void FixEnforce2D::init() void FixEnforce2D::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { int nlevels_respa = ((Respa *) update->integrate)->nlevels; diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index 7d7c362875..7c25edf769 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -106,7 +106,7 @@ int FixGravity::setmask() void FixGravity::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; dt = update->dt; @@ -120,7 +120,7 @@ void FixGravity::init() void FixGravity::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index e4601b713b..dd6f7490ee 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -147,7 +147,7 @@ void FixIndent::init() error->all("Variable for fix indent is not equal style"); } - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -155,7 +155,7 @@ void FixIndent::init() void FixIndent::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 5e40a7c28b..c47670af68 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -211,7 +211,7 @@ void FixLangevin::init() if (temperature && temperature->tempbias) which = BIAS; else which = NOBIAS; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -219,7 +219,7 @@ void FixLangevin::init() void FixLangevin::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index 639489c6a1..9f3f6b241b 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -55,7 +55,7 @@ int FixLineForce::setmask() void FixLineForce::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { int nlevels_respa = ((Respa *) update->integrate)->nlevels; diff --git a/src/fix_move.cpp b/src/fix_move.cpp index 1aa8449234..f04de3f153 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -360,7 +360,7 @@ void FixMove::init() if (vzvarstr && vzvarstyle == ATOM) velocityflag = 1; } - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 93ea414dc1..674511a241 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -608,7 +608,7 @@ void FixNH::init() if (force->kspace) kspace_flag = 1; else kspace_flag = 0; - if (strcmp(update->integrate_style,"respa") == 0) { + if (strstr(update->integrate_style,"respa")) { nlevels_respa = ((Respa *) update->integrate)->nlevels; step_respa = ((Respa *) update->integrate)->step; dto = 0.5*step_respa[0]; @@ -1556,7 +1556,7 @@ void FixNH::reset_dt() // If using respa, then remap is performed in innermost level - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) dto = 0.5*step_respa[0]; p_freq_max = 0.0; diff --git a/src/fix_nve.cpp b/src/fix_nve.cpp index 3417bba635..bb500561ae 100644 --- a/src/fix_nve.cpp +++ b/src/fix_nve.cpp @@ -52,7 +52,7 @@ void FixNVE::init() dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; } diff --git a/src/fix_nve_limit.cpp b/src/fix_nve_limit.cpp index ad14aa1fc9..2fed70c49e 100644 --- a/src/fix_nve_limit.cpp +++ b/src/fix_nve_limit.cpp @@ -62,7 +62,7 @@ void FixNVELimit::init() vlimitsq = (xlimit/dtv) * (xlimit/dtv); ncount = 0; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; } diff --git a/src/fix_nve_noforce.cpp b/src/fix_nve_noforce.cpp index 0945030093..b0095ab180 100644 --- a/src/fix_nve_noforce.cpp +++ b/src/fix_nve_noforce.cpp @@ -47,7 +47,7 @@ void FixNVENoforce::init() { dtv = update->dt; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; } diff --git a/src/fix_orient_fcc.cpp b/src/fix_orient_fcc.cpp index 6630616940..088c01785f 100644 --- a/src/fix_orient_fcc.cpp +++ b/src/fix_orient_fcc.cpp @@ -193,7 +193,7 @@ int FixOrientFCC::setmask() void FixOrientFCC::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; // need a full neighbor list, built whenever re-neighboring occurs @@ -216,7 +216,7 @@ void FixOrientFCC::init_list(int id, NeighList *ptr) void FixOrientFCC::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_planeforce.cpp b/src/fix_planeforce.cpp index 77af2570f4..0cf0ee2b92 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -55,7 +55,7 @@ int FixPlaneForce::setmask() void FixPlaneForce::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { int nlevels_respa = ((Respa *) update->integrate)->nlevels; diff --git a/src/fix_rigid.cpp b/src/fix_rigid.cpp index 0d276cc348..82687de44c 100644 --- a/src/fix_rigid.cpp +++ b/src/fix_rigid.cpp @@ -501,7 +501,7 @@ void FixRigid::init() dtf = 0.5 * update->dt * force->ftm2v; dtq = 0.5 * update->dt; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; // extended = 1 if any particle in a rigid body is finite size diff --git a/src/fix_setforce.cpp b/src/fix_setforce.cpp index 18ab22ae7d..897aad56a9 100644 --- a/src/fix_setforce.cpp +++ b/src/fix_setforce.cpp @@ -163,7 +163,7 @@ void FixSetForce::init() varflag = EQUAL; else varflag = CONSTANT; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; // cannot use non-zero forces for a minimization since no energy is integrated @@ -186,7 +186,7 @@ void FixSetForce::init() void FixSetForce::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { diff --git a/src/fix_shake.cpp b/src/fix_shake.cpp index a32448d2c7..fca15216f3 100644 --- a/src/fix_shake.cpp +++ b/src/fix_shake.cpp @@ -304,7 +304,7 @@ void FixShake::init() // could have changed locations in fix list since created // set ptrs to rRESPA variables - if (strcmp(update->integrate_style,"respa") == 0) { + if (strstr(update->integrate_style,"respa")) { for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"RESPA") == 0) ifix_respa = i; nlevels_respa = ((Respa *) update->integrate)->nlevels; @@ -399,7 +399,7 @@ void FixShake::setup(int vflag) // half timestep constraint on pre-step, full timestep thereafter - if (strcmp(update->integrate_style,"verlet") == 0) { + if (strstr(update->integrate_style,"verlet")) { dtv = update->dt; dtfsq = 0.5 * update->dt * update->dt * force->ftm2v; post_force(vflag); @@ -2417,7 +2417,7 @@ void FixShake::unpack_comm(int n, int first, double *buf) void FixShake::reset_dt() { - if (strcmp(update->integrate_style,"verlet") == 0) { + if (strstr(update->integrate_style,"verlet")) { dtv = update->dt; dtfsq = update->dt * update->dt * force->ftm2v; } else { diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index 170cd19772..d6666f2b47 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -130,7 +130,7 @@ void FixSpring::init() masstotal = group->mass(igroup); if (styleflag == COUPLE) masstotal2 = group->mass(igroup2); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -138,7 +138,7 @@ void FixSpring::init() void FixSpring::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_spring_rg.cpp b/src/fix_spring_rg.cpp index 6337967ddb..e4d55eba2d 100644 --- a/src/fix_spring_rg.cpp +++ b/src/fix_spring_rg.cpp @@ -68,7 +68,7 @@ void FixSpringRG::init() rg0_flag = 0; } - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -76,7 +76,7 @@ void FixSpringRG::init() void FixSpringRG::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index c36092c3f3..849d7c4787 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -106,7 +106,7 @@ int FixSpringSelf::setmask() void FixSpringSelf::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -114,7 +114,7 @@ void FixSpringSelf::init() void FixSpringSelf::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index 6af760c9d9..5d1e52b64d 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -67,7 +67,7 @@ int FixStoreForce::setmask() void FixStoreForce::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -75,7 +75,7 @@ void FixStoreForce::init() void FixStoreForce::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_tmd.cpp b/src/fix_tmd.cpp index b2dfd90138..50865b200a 100644 --- a/src/fix_tmd.cpp +++ b/src/fix_tmd.cpp @@ -175,7 +175,7 @@ void FixTMD::init() dtv = update->dt; dtf = update->dt * force->ftm2v; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) step_respa = ((Respa *) update->integrate)->step; } diff --git a/src/fix_ttm.cpp b/src/fix_ttm.cpp index 4347239f1b..ff037a7804 100644 --- a/src/fix_ttm.cpp +++ b/src/fix_ttm.cpp @@ -213,7 +213,7 @@ void FixTTM::init() for (int iznode = 0; iznode < nznodes; iznode++) net_energy_transfer_all[ixnode][iynode][iznode] = 0; - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -221,7 +221,7 @@ void FixTTM::init() void FixTTM::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force_setup(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_viscous.cpp b/src/fix_viscous.cpp index cbe9aee062..770eee5593 100644 --- a/src/fix_viscous.cpp +++ b/src/fix_viscous.cpp @@ -71,7 +71,7 @@ int FixViscous::setmask() void FixViscous::init() { - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -79,7 +79,7 @@ void FixViscous::init() void FixViscous::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 3839b34192..fdff4a11fb 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -195,7 +195,7 @@ void FixWall::init() for (int m = 0; m < nwall; m++) precompute(m); - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -203,7 +203,7 @@ void FixWall::init() void FixWall::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index a337d58b12..d1a637efea 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -149,7 +149,7 @@ void FixWallRegion::init() offset = coeff3*r4inv*r4inv*rinv - coeff4*r2inv*rinv; } - if (strcmp(update->integrate_style,"respa") == 0) + if (strstr(update->integrate_style,"respa")) nlevels_respa = ((Respa *) update->integrate)->nlevels; } @@ -157,7 +157,7 @@ void FixWallRegion::init() void FixWallRegion::setup(int vflag) { - if (strcmp(update->integrate_style,"verlet") == 0) + if (strstr(update->integrate_style,"verlet")) post_force(vflag); else { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); diff --git a/src/neighbor.cpp b/src/neighbor.cpp index e8ecccc9a0..141841d80d 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -317,7 +317,7 @@ void Neighbor::init() // rRESPA cutoffs int respa = 0; - if (update->whichflag == 1 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; } diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index ccdab6e751..758ef0ab58 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -490,7 +490,7 @@ void PairLJ96Cut::init_style() int irequest; - if (update->whichflag == 1 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -524,7 +524,7 @@ void PairLJ96Cut::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(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 21d8cc50af..5af7e1c89b 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -484,7 +484,7 @@ void PairLJCut::init_style() int irequest; - if (update->whichflag == 1 && strcmp(update->integrate_style,"respa") == 0) { + if (update->whichflag == 1 && strstr(update->integrate_style,"respa")) { int respa = 0; if (((Respa *) update->integrate)->level_inner >= 0) respa = 1; if (((Respa *) update->integrate)->level_middle >= 0) respa = 2; @@ -518,7 +518,7 @@ void PairLJCut::init_style() // set rRESPA cutoffs - if (strcmp(update->integrate_style,"respa") == 0 && + if (strstr(update->integrate_style,"respa") && ((Respa *) update->integrate)->level_inner >= 0) cut_respa = ((Respa *) update->integrate)->cutoff; else cut_respa = NULL;