diff --git a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp index b3de7d78c0..62fa7e8641 100644 --- a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp @@ -287,8 +287,10 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/) // = 0.000240258 epsilon0e2q = 1.0; - if (strcmp(update->unit_style,"real") == 0) + if (strcmp(update->unit_style, "real") == 0) epsilon0e2q = 0.0795776 / force->qqrd2e; + else if (strcmp(update->unit_style, "lj") != 0) + error->all(FLERR, "Only unit styles 'real' and 'lj' are supported"); first = 1; compute_induced_charges(); diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index d49e84d4a5..8cd0fb4332 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -193,8 +193,10 @@ void FixPolarizeBEMICC::setup(int /*vflag*/) // = 0.000240258 epsilon0e2q = 1.0; - if (strcmp(update->unit_style,"real") == 0) + if (strcmp(update->unit_style, "real") == 0) epsilon0e2q = 0.0795776 / force->qqrd2e; + else if (strcmp(update->unit_style, "lj") != 0) + error->all(FLERR, "Only unit styles 'lj' and 'real' are supported"); compute_induced_charges(); }