From 4a8aaf9f46dd31bd54b468fdb445cb0b9d38ceed Mon Sep 17 00:00:00 2001 From: Trung Nguyen Date: Thu, 2 Mar 2023 14:52:01 -0600 Subject: [PATCH] Added the missing factor 4\pi in epsilon0e2q to other units --- src/DIELECTRIC/fix_polarize_bem_gmres.cpp | 8 ++++---- src/DIELECTRIC/fix_polarize_bem_icc.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp index e31337d0fd..14a645bb30 100644 --- a/src/DIELECTRIC/fix_polarize_bem_gmres.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_gmres.cpp @@ -311,13 +311,13 @@ void FixPolarizeBEMGMRES::setup(int /*vflag*/) epsilon0e2q = 1.0; if (strcmp(update->unit_style, "real") == 0) - epsilon0e2q = 0.000240263377163643; + epsilon0e2q = 0.000240263377163643 * (4 * MY_PI); else if (strcmp(update->unit_style, "metal") == 0) - epsilon0e2q = 0.00553386738300813; + epsilon0e2q = 0.00553386738300813 * (4 * MY_PI); else if (strcmp(update->unit_style, "si") == 0) - epsilon0e2q = 8.854187812813e-12; + epsilon0e2q = 8.854187812813e-12 * (4 * MY_PI); else if (strcmp(update->unit_style, "nano") == 0) - epsilon0e2q = 0.000345866711328125; + epsilon0e2q = 0.000345866711328125 * (4 * MY_PI); else if (strcmp(update->unit_style, "lj") != 0) error->all(FLERR, "Only unit styles 'lj', 'real', 'metal', 'si' and 'nano' are supported"); diff --git a/src/DIELECTRIC/fix_polarize_bem_icc.cpp b/src/DIELECTRIC/fix_polarize_bem_icc.cpp index 0d503d87a7..177332546a 100644 --- a/src/DIELECTRIC/fix_polarize_bem_icc.cpp +++ b/src/DIELECTRIC/fix_polarize_bem_icc.cpp @@ -214,13 +214,13 @@ void FixPolarizeBEMICC::setup(int /*vflag*/) epsilon0e2q = 1.0; if (strcmp(update->unit_style, "real") == 0) - epsilon0e2q = 0.000240263377163643; + epsilon0e2q = 0.000240263377163643 * (4 * MY_PI); else if (strcmp(update->unit_style, "metal") == 0) - epsilon0e2q = 0.00553386738300813; + epsilon0e2q = 0.00553386738300813 * (4 * MY_PI); else if (strcmp(update->unit_style, "si") == 0) - epsilon0e2q = 8.854187812813e-12; + epsilon0e2q = 8.854187812813e-12 * (4 * MY_PI); else if (strcmp(update->unit_style, "nano") == 0) - epsilon0e2q = 0.000345866711328125; + epsilon0e2q = 0.000345866711328125 * (4 * MY_PI); else if (strcmp(update->unit_style, "lj") != 0) error->all(FLERR, "Only unit styles 'lj', 'real', 'metal', 'si' and 'nano' are supported");