From 7a17780a82dcadde1e72c8f56bb796607e141e6f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 22 May 2021 13:17:58 -0400 Subject: [PATCH] consistently check for newton pair off and align error message rest of LAMMPS also add checks for required charge property for pair styles with coulomb --- src/GPU/pair_beck_gpu.cpp | 2 +- src/GPU/pair_born_coul_long_cs_gpu.cpp | 6 ++---- src/GPU/pair_born_coul_long_gpu.cpp | 6 ++---- src/GPU/pair_born_coul_wolf_cs_gpu.cpp | 5 +++-- src/GPU/pair_born_coul_wolf_gpu.cpp | 5 +++-- src/GPU/pair_born_gpu.cpp | 2 +- src/GPU/pair_buck_coul_cut_gpu.cpp | 5 +++-- src/GPU/pair_buck_coul_long_gpu.cpp | 6 ++---- src/GPU/pair_buck_gpu.cpp | 2 +- src/GPU/pair_colloid_gpu.cpp | 2 +- src/GPU/pair_coul_cut_gpu.cpp | 2 +- src/GPU/pair_coul_debye_gpu.cpp | 2 +- src/GPU/pair_coul_dsf_gpu.cpp | 2 +- src/GPU/pair_coul_long_cs_gpu.cpp | 2 +- src/GPU/pair_coul_long_gpu.cpp | 2 +- src/GPU/pair_dpd_gpu.cpp | 2 +- src/GPU/pair_dpd_tstat_gpu.cpp | 2 +- src/GPU/pair_eam_alloy_gpu.cpp | 2 +- src/GPU/pair_eam_fs_gpu.cpp | 2 +- src/GPU/pair_eam_gpu.cpp | 2 +- src/GPU/pair_gauss_gpu.cpp | 2 +- src/GPU/pair_gayberne_gpu.cpp | 2 +- src/GPU/pair_lj96_cut_gpu.cpp | 2 +- src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp | 6 ++---- src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_class2_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_class2_gpu.cpp | 2 +- src/GPU/pair_lj_cubic_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_cut_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_debye_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_dsf_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_msm_gpu.cpp | 5 ++++- src/GPU/pair_lj_cut_dipole_cut_gpu.cpp | 2 +- src/GPU/pair_lj_cut_dipole_long_gpu.cpp | 2 +- src/GPU/pair_lj_cut_gpu.cpp | 2 +- src/GPU/pair_lj_cut_tip4p_long_gpu.cpp | 10 ++++++---- src/GPU/pair_lj_expand_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_expand_gpu.cpp | 2 +- src/GPU/pair_lj_gromacs_gpu.cpp | 2 +- src/GPU/pair_lj_sdk_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_sdk_gpu.cpp | 2 +- src/GPU/pair_lj_sf_dipole_sf_gpu.cpp | 2 +- src/GPU/pair_lj_smooth_gpu.cpp | 2 +- src/GPU/pair_mie_cut_gpu.cpp | 2 +- src/GPU/pair_morse_gpu.cpp | 2 +- src/GPU/pair_resquared_gpu.cpp | 2 +- src/GPU/pair_soft_gpu.cpp | 2 +- src/GPU/pair_table_gpu.cpp | 2 +- src/GPU/pair_ufm_gpu.cpp | 2 +- src/GPU/pair_yukawa_colloid_gpu.cpp | 2 +- src/GPU/pair_yukawa_gpu.cpp | 2 +- src/GPU/pair_zbl_gpu.cpp | 2 +- 53 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/GPU/pair_beck_gpu.cpp b/src/GPU/pair_beck_gpu.cpp index c2f7caf653..d64c55bfea 100644 --- a/src/GPU/pair_beck_gpu.cpp +++ b/src/GPU/pair_beck_gpu.cpp @@ -139,7 +139,7 @@ void PairBeckGPU::compute(int eflag, int vflag) void PairBeckGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with beck/gpu pair style"); + error->all(FLERR,"Pair style beck/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index 267a018af6..e2b7d62e77 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -156,11 +156,9 @@ void PairBornCoulLongCSGPU::compute(int eflag, int vflag) void PairBornCoulLongCSGPU::init_style() { if (!atom->q_flag) - error->all(FLERR, - "Pair style born/coul/long/cs/gpu requires atom attribute q"); + error->all(FLERR, "Pair style born/coul/long/cs/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with born/coul/long/cs/gpu pair style"); + error->all(FLERR, "Pair style born/coul/long/cs/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index e24cc087da..93faf7ac94 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -151,11 +151,9 @@ void PairBornCoulLongGPU::compute(int eflag, int vflag) void PairBornCoulLongGPU::init_style() { if (!atom->q_flag) - error->all(FLERR, - "Pair style born/coul/long/gpu requires atom attribute q"); + error->all(FLERR, "Pair style born/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with born/coul/long/gpu pair style"); + error->all(FLERR, "Pair style born/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp index 233aa9331b..333f669f12 100644 --- a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp @@ -145,9 +145,10 @@ void PairBornCoulWolfCSGPU::compute(int eflag, int vflag) void PairBornCoulWolfCSGPU::init_style() { + if (!atom->q_flag) + error->all(FLERR, "Pair style born/coul/wolf/cs/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with born/coul/wolf/cs/gpu pair style"); + error->all(FLERR, "Pair style born/coul/wolf/cs/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_born_coul_wolf_gpu.cpp b/src/GPU/pair_born_coul_wolf_gpu.cpp index debbd6cbc6..5d4c5e65ff 100644 --- a/src/GPU/pair_born_coul_wolf_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_gpu.cpp @@ -143,9 +143,10 @@ void PairBornCoulWolfGPU::compute(int eflag, int vflag) void PairBornCoulWolfGPU::init_style() { + if (!atom->q_flag) + error->all(FLERR, "Pair style born/coul/wolf/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with born/coul/wolf/gpu pair style"); + error->all(FLERR, "Pair style born/coul/wolf/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_born_gpu.cpp b/src/GPU/pair_born_gpu.cpp index 2b0b8f9cd8..5da5f17aa6 100644 --- a/src/GPU/pair_born_gpu.cpp +++ b/src/GPU/pair_born_gpu.cpp @@ -135,7 +135,7 @@ void PairBornGPU::compute(int eflag, int vflag) void PairBornGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with born/gpu pair style"); + error->all(FLERR,"Pair style born/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_buck_coul_cut_gpu.cpp b/src/GPU/pair_buck_coul_cut_gpu.cpp index 363179fd2e..d377327c21 100644 --- a/src/GPU/pair_buck_coul_cut_gpu.cpp +++ b/src/GPU/pair_buck_coul_cut_gpu.cpp @@ -137,9 +137,10 @@ void PairBuckCoulCutGPU::compute(int eflag, int vflag) void PairBuckCoulCutGPU::init_style() { + if (!atom->q_flag) + error->all(FLERR, "Pair style buck/coul/cut/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with buck/coul/cut/gpu pair style"); + error->all(FLERR, "Pair style buck/coul/cut/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index c71120e319..1577a71627 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -147,11 +147,9 @@ void PairBuckCoulLongGPU::compute(int eflag, int vflag) void PairBuckCoulLongGPU::init_style() { if (!atom->q_flag) - error->all(FLERR, - "Pair style buck/coul/long/gpu requires atom attribute q"); + error->all(FLERR, "Pair style buck/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with buck/coul/long/gpu pair style"); + error->all(FLERR, "Pair style buck/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_buck_gpu.cpp b/src/GPU/pair_buck_gpu.cpp index e0c5df5306..3a27813caa 100644 --- a/src/GPU/pair_buck_gpu.cpp +++ b/src/GPU/pair_buck_gpu.cpp @@ -133,7 +133,7 @@ void PairBuckGPU::compute(int eflag, int vflag) void PairBuckGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with buck/gpu pair style"); + error->all(FLERR,"Pair style buck/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index a63c0fc808..c7ec0ec7bf 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -134,7 +134,7 @@ void PairColloidGPU::compute(int eflag, int vflag) void PairColloidGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with colloid/gpu pair style"); + error->all(FLERR,"Pair style colloid/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_coul_cut_gpu.cpp b/src/GPU/pair_coul_cut_gpu.cpp index c218bcc8ac..8637d9570b 100644 --- a/src/GPU/pair_coul_cut_gpu.cpp +++ b/src/GPU/pair_coul_cut_gpu.cpp @@ -138,7 +138,7 @@ void PairCoulCutGPU::init_style() error->all(FLERR,"Pair style coul/cut/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with coul/cut/gpu pair style"); + error->all(FLERR,"Pair style coul/cut/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_coul_debye_gpu.cpp b/src/GPU/pair_coul_debye_gpu.cpp index 388f0420ff..912dd02d60 100644 --- a/src/GPU/pair_coul_debye_gpu.cpp +++ b/src/GPU/pair_coul_debye_gpu.cpp @@ -139,7 +139,7 @@ void PairCoulDebyeGPU::init_style() error->all(FLERR,"Pair style coul/debye/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with coul/debye/gpu pair style"); + error->all(FLERR,"Pair style coul/debye/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_coul_dsf_gpu.cpp b/src/GPU/pair_coul_dsf_gpu.cpp index 9e13da23ed..042c4e2de6 100644 --- a/src/GPU/pair_coul_dsf_gpu.cpp +++ b/src/GPU/pair_coul_dsf_gpu.cpp @@ -150,7 +150,7 @@ void PairCoulDSFGPU::init_style() error->all(FLERR,"Pair style coul/dsf/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with coul/dsf/gpu pair style"); + error->all(FLERR,"Pair style coul/dsf/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index 53528defba..66648e4445 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -153,7 +153,7 @@ void PairCoulLongCSGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style coul/long/cs/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with coul/long/cs/gpu pair style"); + error->all(FLERR,"Pair style coul/long/cs/gpu requires newton pair off"); // Call init_one calculation make sure scale is correct for (int i = 1; i <= atom->ntypes; i++) { diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 463bc1e583..bdd9d679fc 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -148,7 +148,7 @@ void PairCoulLongGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with coul/long/gpu pair style"); + error->all(FLERR,"Pair style coul/long/gpu requires newton pair off"); // Call init_one calculation make sure scale is correct for (int i = 1; i <= atom->ntypes; i++) { diff --git a/src/GPU/pair_dpd_gpu.cpp b/src/GPU/pair_dpd_gpu.cpp index 936ae765df..2977e95a67 100644 --- a/src/GPU/pair_dpd_gpu.cpp +++ b/src/GPU/pair_dpd_gpu.cpp @@ -280,7 +280,7 @@ void PairDPDGPU::compute(int eflag, int vflag) void PairDPDGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with dpd/gpu pair style"); + error->all(FLERR,"Pair style dpd/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_dpd_tstat_gpu.cpp b/src/GPU/pair_dpd_tstat_gpu.cpp index 358d4a2a83..dca0895de5 100644 --- a/src/GPU/pair_dpd_tstat_gpu.cpp +++ b/src/GPU/pair_dpd_tstat_gpu.cpp @@ -299,7 +299,7 @@ void PairDPDTstatGPU::compute(int eflag, int vflag) void PairDPDTstatGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with dpd/tstat/gpu pair style"); + error->all(FLERR,"Pair style dpd/tstat/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index 5959d439fa..bc0cc1c534 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -157,7 +157,7 @@ void PairEAMAlloyGPU::compute(int eflag, int vflag) void PairEAMAlloyGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with eam/alloy/gpu pair style"); + error->all(FLERR,"Pair style eam/alloy/gpu requires newton pair off"); // convert read-in file(s) to arrays and spline them diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index 3c5cd04850..14c594f0b6 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -156,7 +156,7 @@ void PairEAMFSGPU::compute(int eflag, int vflag) void PairEAMFSGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with eam/fs/gpu pair style"); + error->all(FLERR,"Pair style eam/fs/gpu requires newton pair off"); // convert read-in file(s) to arrays and spline them diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index 345f99b817..4b5f744ffa 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -156,7 +156,7 @@ void PairEAMGPU::compute(int eflag, int vflag) void PairEAMGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with eam/gpu pair style"); + error->all(FLERR,"Pair style eam/gpu requires newton pair off"); // convert read-in file(s) to arrays and spline them diff --git a/src/GPU/pair_gauss_gpu.cpp b/src/GPU/pair_gauss_gpu.cpp index 846aa4293d..568eee74e8 100644 --- a/src/GPU/pair_gauss_gpu.cpp +++ b/src/GPU/pair_gauss_gpu.cpp @@ -131,7 +131,7 @@ void PairGaussGPU::compute(int eflag, int vflag) void PairGaussGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with gauss/gpu pair style"); + error->all(FLERR,"Pair style gauss/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 5958ac3e3e..955b7a8256 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -161,7 +161,7 @@ void PairGayBerneGPU::init_style() if (!avec) error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with gayberne/gpu pair style"); + error->all(FLERR,"Pair style gayberne/gpu requires newton pair off"); if (!atom->ellipsoid_flag) error->all(FLERR,"Pair gayberne/gpu requires atom style ellipsoid"); diff --git a/src/GPU/pair_lj96_cut_gpu.cpp b/src/GPU/pair_lj96_cut_gpu.cpp index 01bfad5155..81cea7468f 100644 --- a/src/GPU/pair_lj96_cut_gpu.cpp +++ b/src/GPU/pair_lj96_cut_gpu.cpp @@ -132,7 +132,7 @@ void PairLJ96CutGPU::init_style() cut_respa = nullptr; if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj96/cut/gpu pair style"); + error->all(FLERR,"Pair style lj96/cut/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp index ae768386c9..24aeedb7d8 100644 --- a/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_charmm_gpu.cpp @@ -128,11 +128,9 @@ void PairLJCharmmCoulCharmmGPU::compute(int eflag, int vflag) void PairLJCharmmCoulCharmmGPU::init_style() { if (!atom->q_flag) - error->all(FLERR, - "Pair style lj/charmm/coul/long/gpu requires atom attribute q"); + error->all(FLERR, "Pair style lj/charmm/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR, - "Cannot use newton pair with lj/charmm/coul/long/gpu pair style"); + error->all(FLERR, "Pair style lj/charmm/coul/long/gpu requires newton pair off"); // Repeated cutsq calculation in init_one() is required for GPU package diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index a11a3fe73e..31ee81b623 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -153,7 +153,7 @@ void PairLJCharmmCoulLongGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style lj/charmm/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/charmm/coul/long/gpu pair style"); + error->all(FLERR,"Pair style lj/charmm/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index f401b4e388..d673761faa 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -148,7 +148,7 @@ void PairLJClass2CoulLongGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style lj/class2/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/class2/coul/long/gpu pair style"); + error->all(FLERR,"Pair style lj/class2/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_class2_gpu.cpp b/src/GPU/pair_lj_class2_gpu.cpp index 84038ef99d..eab4d13ede 100644 --- a/src/GPU/pair_lj_class2_gpu.cpp +++ b/src/GPU/pair_lj_class2_gpu.cpp @@ -130,7 +130,7 @@ void PairLJClass2GPU::compute(int eflag, int vflag) void PairLJClass2GPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/class2/gpu pair style"); + error->all(FLERR,"Pair style lj/class2/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cubic_gpu.cpp b/src/GPU/pair_lj_cubic_gpu.cpp index 344f6bdb09..3a81ac402e 100644 --- a/src/GPU/pair_lj_cubic_gpu.cpp +++ b/src/GPU/pair_lj_cubic_gpu.cpp @@ -136,7 +136,7 @@ void PairLJCubicGPU::compute(int eflag, int vflag) void PairLJCubicGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cubic/gpu pair style"); + error->all(FLERR,"Pair style lj/cubic/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp index 85fe7ad676..b8d0281e9b 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp @@ -140,7 +140,7 @@ void PairLJCutCoulCutGPU::init_style() error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/coul/cut/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp index b95ebefb7c..a4f0af3e46 100644 --- a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp @@ -142,7 +142,7 @@ void PairLJCutCoulDebyeGPU::init_style() error->all(FLERR,"Pair style lj/cut/coul/debye/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/coul/debye/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/coul/debye/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp index aa7e17757d..375471c81b 100644 --- a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp @@ -152,7 +152,7 @@ void PairLJCutCoulDSFGPU::init_style() error->all(FLERR,"Pair style lj/cut/coul/dsf/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/coul/dsf/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/coul/dsf/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 1dd246e36d..4c169d970d 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -153,7 +153,7 @@ void PairLJCutCoulLongGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/coul/long/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index 16d773d699..728eb401e9 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -141,8 +141,11 @@ void PairLJCutCoulMSMGPU::init_style() { cut_respa = nullptr; + if (!atom->q_flag) + error->all(FLERR,"Pair style lj/cut/coul/cut/gpu requires atom attribute q"); + if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/coul/msm/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/coul/msm/gpu requires newton pair off"); if (force->kspace->scalar_pressure_flag) error->all(FLERR,"Must use 'kspace_modify pressure/scalar no' with GPU MSM Pair styles"); diff --git a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp index ccbd78595a..cb8c0ccd8c 100644 --- a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp @@ -144,7 +144,7 @@ void PairLJCutDipoleCutGPU::init_style() error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with dipole/cut/gpu pair style"); + error->all(FLERR,"Pair style dipole/cut/gpu requires newton pair off"); if (strcmp(update->unit_style,"electron") == 0) error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles"); diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index 7c334cb2c6..32d8ce46dd 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -156,7 +156,7 @@ void PairLJCutDipoleLongGPU::init_style() error->all(FLERR,"Pair dipole/cut/gpu requires atom attributes q, mu, torque"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with dipole/cut/gpu pair style"); + error->all(FLERR,"Pair style dipole/cut/gpu requires newton pair off"); if (strcmp(update->unit_style,"electron") == 0) error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles"); diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index ea4e9532fd..62ba6b46ed 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -136,7 +136,7 @@ void PairLJCutGPU::init_style() cut_respa = nullptr; if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp index 174f4bc521..be96ffbe71 100644 --- a/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_tip4p_long_gpu.cpp @@ -167,8 +167,9 @@ void PairLJCutTIP4PLongGPU::init_style() if (atom->tag_enable == 0) error->all(FLERR,"Pair style lj/cut/tip4p/long/gpu requires atom IDs"); if (!atom->q_flag) - error->all(FLERR, - "Pair style lj/cut/tip4p/long/gpu requires atom attribute q"); + error->all(FLERR, "Pair style lj/cut/tip4p/long/gpu requires atom attribute q"); + if (force->newton_pair) + error->all(FLERR,"Pair style lj/cut/tip4p/long/gpu requires newton pair off"); if (force->bond == nullptr) error->all(FLERR,"Must use a bond style with TIP4P potential"); if (force->angle == nullptr) @@ -219,9 +220,10 @@ void PairLJCutTIP4PLongGPU::init_style() cell_size = (cut_coul+qdist+blen) + neighbor->skin; } if (comm->cutghostuser < cell_size) { - comm->cutghostuser = cell_size; if (comm->me == 0) - error->warning(FLERR,"Increasing communication cutoff for TIP4P GPU style"); + error->warning(FLERR,"Increasing communication cutoff from {:.8} " + "to {:.8} for TIP4P GPU style",comm->cutghostuser,cell_size); + comm->cutghostuser = cell_size; } int mnf = 5e-2 * neighbor->oneatom; diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index ca49702f80..ac96913400 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -153,7 +153,7 @@ void PairLJExpandCoulLongGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/cut/coul/long/gpu pair style"); + error->all(FLERR,"Pair style lj/cut/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index c9e488d4a6..0f1e370560 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -133,7 +133,7 @@ void PairLJExpandGPU::compute(int eflag, int vflag) void PairLJExpandGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/expand/gpu pair style"); + error->all(FLERR,"Pair style lj/expand/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_gromacs_gpu.cpp b/src/GPU/pair_lj_gromacs_gpu.cpp index cd29f388d0..41ab9d2088 100644 --- a/src/GPU/pair_lj_gromacs_gpu.cpp +++ b/src/GPU/pair_lj_gromacs_gpu.cpp @@ -135,7 +135,7 @@ void PairLJGromacsGPU::compute(int eflag, int vflag) void PairLJGromacsGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/gromacs/gpu pair style"); + error->all(FLERR,"Pair style lj/gromacs/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp index 7e8428699a..5be99ae8b0 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp @@ -157,7 +157,7 @@ void PairLJSDKCoulLongGPU::init_style() if (!atom->q_flag) error->all(FLERR,"Pair style lj/sdk/coul/long/gpu requires atom attribute q"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/sdk/coul/long/gpu pair style"); + error->all(FLERR,"Pair style lj/sdk/coul/long/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_sdk_gpu.cpp b/src/GPU/pair_lj_sdk_gpu.cpp index 699780450e..09575f46c8 100644 --- a/src/GPU/pair_lj_sdk_gpu.cpp +++ b/src/GPU/pair_lj_sdk_gpu.cpp @@ -138,7 +138,7 @@ void PairLJSDKGPU::compute(int eflag, int vflag) void PairLJSDKGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with lj/sdk/gpu pair style"); + error->all(FLERR,"Pair style lj/sdk/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp index 3cd2aebc66..e8910fe316 100644 --- a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp +++ b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp @@ -143,7 +143,7 @@ void PairLJSFDipoleSFGPU::init_style() error->all(FLERR,"Pair dipole/sf/gpu requires atom attributes q, mu, torque"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with dipole/sf/gpu pair style"); + error->all(FLERR,"Pair style dipole/sf/gpu requires newton pair off"); if (strcmp(update->unit_style,"electron") == 0) error->all(FLERR,"Cannot (yet) use 'electron' units with dipoles"); diff --git a/src/GPU/pair_lj_smooth_gpu.cpp b/src/GPU/pair_lj_smooth_gpu.cpp index 1613e18fa3..5ef7b90527 100644 --- a/src/GPU/pair_lj_smooth_gpu.cpp +++ b/src/GPU/pair_lj_smooth_gpu.cpp @@ -137,7 +137,7 @@ void PairLJSmoothGPU::init_style() { //cut_respa = nullptr; - if (force->newton_pair) error->all(FLERR, "Cannot use newton pair with lj/smooth/gpu pair style"); + if (force->newton_pair) error->all(FLERR, "Pair style lj/smooth/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index 45b0ba5b80..d576808612 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -133,7 +133,7 @@ void PairMIECutGPU::init_style() cut_respa = nullptr; if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with mie/cut/gpu pair style"); + error->all(FLERR,"Pair style mie/cut/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index 77c69ef1bf..1632f39975 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -129,7 +129,7 @@ void PairMorseGPU::compute(int eflag, int vflag) void PairMorseGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with morse/gpu pair style"); + error->all(FLERR,"Pair style morse/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index 17daa3cbe3..b76a60a074 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -160,7 +160,7 @@ void PairRESquaredGPU::compute(int eflag, int vflag) void PairRESquaredGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with resquared/gpu pair style"); + error->all(FLERR,"Pair style resquared/gpu requires newton pair off"); if (!atom->ellipsoid_flag) error->all(FLERR,"Pair resquared/gpu requires atom style ellipsoid"); diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index defc7625b2..1ec80ebd38 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -134,7 +134,7 @@ void PairSoftGPU::compute(int eflag, int vflag) void PairSoftGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with soft/gpu pair style"); + error->all(FLERR,"Pair style soft/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index 318a91be55..69487935e4 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -133,7 +133,7 @@ void PairTableGPU::compute(int eflag, int vflag) void PairTableGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with table/gpu pair style"); + error->all(FLERR,"Pair style table/gpu requires newton pair off"); int ntypes = atom->ntypes; diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index 02c89b57bc..125daf9133 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -137,7 +137,7 @@ void PairUFMGPU::init_style() // cut_respa = nullptr; if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with ufm/gpu pair style"); + error->all(FLERR,"Pair style ufm/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 7170e88ba4..05aaf78d16 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -142,7 +142,7 @@ void PairYukawaColloidGPU::init_style() error->all(FLERR,"Pair yukawa/colloid/gpu requires atom style sphere"); if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with yukawa/colloid/gpu pair style"); + error->all(FLERR,"Pair style yukawa/colloid/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index 6a01d9a05b..764164c81b 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -131,7 +131,7 @@ void PairYukawaGPU::compute(int eflag, int vflag) void PairYukawaGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with yukawa/gpu pair style"); + error->all(FLERR,"Pair style yukawa/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0; diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index 68b05ac2d5..44a0e0e9ec 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -133,7 +133,7 @@ void PairZBLGPU::compute(int eflag, int vflag) void PairZBLGPU::init_style() { if (force->newton_pair) - error->all(FLERR,"Cannot use newton pair with zbl/gpu pair style"); + error->all(FLERR,"Pair style zbl/gpu requires newton pair off"); // Repeat cutsq calculation because done after call to init_style double maxcut = -1.0;