diff --git a/.travis.yml b/.travis.yml index b71d2ee15..6f0b91c09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,7 +126,7 @@ script: --prefix=$HOME/Software/pcmsolver - cd build - ../.ci/ci_build.sh - - travis_wait python ../.ci/ci_test.py ctest --output-on-failure --verbose --parallel 2 + - travis_wait 40 python ../.ci/ci_test.py ctest --output-on-failure --verbose --parallel 2 - python ../.ci/ci_print_failing.py after_success: - | diff --git a/src/bin/run_pcm.cpp b/src/bin/run_pcm.cpp index f0eb55e39..43d83cebe 100644 --- a/src/bin/run_pcm.cpp +++ b/src/bin/run_pcm.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -88,6 +89,7 @@ int main(int argc, char * argv[]) { TIMER_OFF("Computing ASC"); // Compute energy and print it out pcmsolver_out << "Solvation energy = " + << std::setprecision(std::numeric_limits::digits10) << context_.computePolarizationEnergy("MEP", "ASC") << std::endl; pcmsolver_out << "DONE!" << std::endl; diff --git a/tests/benchmark/CMakeLists.txt b/tests/benchmark/CMakeLists.txt new file mode 100644 index 000000000..5c00c230c --- /dev/null +++ b/tests/benchmark/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copy input files to ${PROJECT_BINARY_DIR}/tests/standalone (aka ${CMAKE_CURRENT_BINARY_DIR}) +file( + COPY + standalone_bubble.pcm + standalone_water-in-oil.pcm + standalone_water-fake.pcm + DESTINATION + ${CMAKE_CURRENT_BINARY_DIR} + ) + +add_test( + NAME + pcmsolver_standalone-bubble + COMMAND + ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/go_pcm.py + --exe=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} + --inp=standalone_bubble.pcm + WORKING_DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR} + ) +set_tests_properties(pcmsolver_standalone-bubble + PROPERTIES + LABELS "pcmsolver;standalone;bubble" + ENVIRONMENT PYTHONPATH=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/${PYMOD_INSTALL_LIBDIR}:$ENV{PYTHONPATH} + ) + +add_test( + NAME + pcmsolver_standalone-water-in-oil + COMMAND + ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/go_pcm.py + --exe=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} + --inp=standalone_water-in-oil.pcm + WORKING_DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR} + ) +set_tests_properties(pcmsolver_standalone-water-in-oil + PROPERTIES + LABELS "pcmsolver;standalone;water-in-oil" + ENVIRONMENT PYTHONPATH=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/${PYMOD_INSTALL_LIBDIR}:$ENV{PYTHONPATH} + ) + +add_test( + NAME + pcmsolver_standalone-water-fake + COMMAND + ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/go_pcm.py + --exe=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} + --inp=standalone_water-fake.pcm + WORKING_DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR} + ) +set_tests_properties(pcmsolver_standalone-water-fake + PROPERTIES + LABELS "pcmsolver;standalone;water-fake" + ENVIRONMENT PYTHONPATH=${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/${PYMOD_INSTALL_LIBDIR}:$ENV{PYTHONPATH} + ) diff --git a/tests/benchmark/standalone_bubble.pcm b/tests/benchmark/standalone_bubble.pcm new file mode 100644 index 000000000..6e0535fec --- /dev/null +++ b/tests/benchmark/standalone_bubble.pcm @@ -0,0 +1,36 @@ +UNITS = ANGSTROM +CODATA = 1998 +MEDIUM +{ + PROBERADIUS = 1.385 + SOLVENT = EXPLICIT + GREEN + { + TYPE=VACUUM + DER = NUMERICAL + } + GREEN + { + CENTER = 3.0 + WIDTH = 1.0 + TYPE = SPHERICALDIFFUSE + PROFILE = LOG + EPS1 = 1. + EPS2 = 80. + DER = NUMERICAL + INTERFACEORIGIN = [0.0, 0.0, 0.0] + MAXL = 30 + } +} + +MOLECULE +{ + # X, Y, Z, Q + GEOMETRY = [0.0, 0.0, 0.0, 1.0] +} + +CAVITY +{ + TYPE = GEPOL + SPHERES = [ 0.00, 0.00, 0.00, 1.80] +} diff --git a/tests/benchmark/standalone_water-fake.pcm b/tests/benchmark/standalone_water-fake.pcm new file mode 100644 index 000000000..68d68964a --- /dev/null +++ b/tests/benchmark/standalone_water-fake.pcm @@ -0,0 +1,36 @@ +UNITS = ANGSTROM +CODATA = 1998 +MEDIUM +{ + PROBERADIUS = 1.385 + SOLVENT = EXPLICIT + GREEN + { + TYPE=VACUUM + DER = NUMERICAL + } + GREEN + { + CENTER = 3.0 + WIDTH = 1.0 + TYPE = SPHERICALDIFFUSE + PROFILE = LOG + EPS1 = 80. + EPS2 = 80. + DER = NUMERICAL + INTERFACEORIGIN = [0.0, 0.0, 0.0] + MAXL = 30 + } +} + +MOLECULE +{ + # X, Y, Z, Q + GEOMETRY = [3.0, 0.0, 0.0, 1.0] +} + +CAVITY +{ + TYPE = GEPOL + SPHERES = [ 0.00, 0.00, 0.00, 1.80] +} diff --git a/tests/benchmark/standalone_water-in-oil.pcm b/tests/benchmark/standalone_water-in-oil.pcm new file mode 100644 index 000000000..a3f649a3d --- /dev/null +++ b/tests/benchmark/standalone_water-in-oil.pcm @@ -0,0 +1,36 @@ +UNITS = ANGSTROM +CODATA = 1998 +MEDIUM +{ + PROBERADIUS = 1.385 + SOLVENT = EXPLICIT + GREEN + { + TYPE=VACUUM + DER = NUMERICAL + } + GREEN + { + CENTER = 3.0 + WIDTH = 1.0 + TYPE = SPHERICALDIFFUSE + PROFILE = LOG + EPS1 = 80. + EPS2 = 2. + DER = NUMERICAL + INTERFACEORIGIN = [0.0, 0.0, 0.0] + MAXL = 30 + } +} + +MOLECULE +{ + # X, Y, Z, Q + GEOMETRY = [6.0, 0.0, 0.0, 1.0] +} + +CAVITY +{ + TYPE = GEPOL + SPHERES = [ 0.00, 0.00, 0.00, 1.80] +} diff --git a/tests/bi_operators/CMakeLists.txt b/tests/bi_operators/CMakeLists.txt index 9322935ff..e305a8312 100644 --- a/tests/bi_operators/CMakeLists.txt +++ b/tests/bi_operators/CMakeLists.txt @@ -9,14 +9,18 @@ endif() # Copy reference files to ${PROJECT_BINARY_DIR}/tests/bi_operators (aka ${CMAKE_CURRENT_BINARY_DIR}) list(APPEND reference_files + erfsphericaldiffuse_D_collocation.npy + erfsphericaldiffuse_S_collocation.npy + logsphericaldiffuse_D_collocation.npy + logsphericaldiffuse_S_collocation.npy tanhsphericaldiffuse_D_collocation.npy - uniformdielectric_D_purisima.npy - vacuum_D_purisima.npy tanhsphericaldiffuse_S_collocation.npy - uniformdielectric_S_collocation.npy - vacuum_S_collocation.npy uniformdielectric_D_collocation.npy + uniformdielectric_D_purisima.npy + uniformdielectric_S_collocation.npy vacuum_D_collocation.npy + vacuum_D_purisima.npy + vacuum_S_collocation.npy ) file(COPY ${reference_files} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/tests/bi_operators/bi_operators_collocation.cpp b/tests/bi_operators/bi_operators_collocation.cpp index ccc6afcec..0d5befc01 100644 --- a/tests/bi_operators/bi_operators_collocation.cpp +++ b/tests/bi_operators/bi_operators_collocation.cpp @@ -37,12 +37,14 @@ #include "green/SphericalDiffuse.hpp" #include "green/UniformDielectric.hpp" #include "green/Vacuum.hpp" +#include "green/dielectric_profile/OneLayerErf.hpp" #include "green/dielectric_profile/OneLayerTanh.hpp" #include "utils/MathUtils.hpp" using namespace pcm; using bi_operators::Collocation; using cavity::GePolCavity; +using dielectric_profile::OneLayerErf; using dielectric_profile::OneLayerTanh; using green::SphericalDiffuse; using green::UniformDielectric; @@ -116,6 +118,39 @@ SCENARIO("A collocation integrator with approximate diagonal elements", } } + /*! \class Collocation + * \test \b CollocationTest_logsphericaldiffuse tests the evaluation + * by collocation of the spherical diffuse matrix representations of S and D + */ + AND_WHEN("the spherical diffuse with a log profile Green's function is used") { + double epsilon1 = 2.0; + double epsilon2 = 80.0; + double width = 5.0; + double sphereRadius = 20.0; + SphericalDiffuse<> gf( + epsilon1, epsilon2, width, sphereRadius, Eigen::Vector3d::Zero(), 5); + THEN("the matrix elements of S are") { + results = op.computeS(cavity, gf); + reference = + cnpy::custom::npy_load("logsphericaldiffuse_S_collocation.npy"); + for (int i = 0; i < cavity.size(); ++i) { + for (int j = 0; j < cavity.size(); ++j) { + REQUIRE(reference(i, j) == Approx(results(i, j))); + } + } + } + AND_THEN("the matrix elements of D are") { + results = op.computeD(cavity, gf); + reference = + cnpy::custom::npy_load("logsphericaldiffuse_D_collocation.npy"); + for (int i = 0; i < cavity.size(); ++i) { + for (int j = 0; j < cavity.size(); ++j) { + REQUIRE(reference(i, j) == Approx(results(i, j))); + } + } + } + } + /*! \class Collocation * \test \b CollocationTest_tanhsphericaldiffuse tests the evaluation * by collocation of the spherical diffuse matrix representations of S and D @@ -148,5 +183,38 @@ SCENARIO("A collocation integrator with approximate diagonal elements", } } } + + /*! \class Collocation + * \test \b CollocationTest_erfsphericaldiffuse tests the evaluation + * by collocation of the spherical diffuse matrix representations of S and D + */ + AND_WHEN("the spherical diffuse with a erf profile Green's function is used") { + double epsilon1 = 2.0; + double epsilon2 = 80.0; + double width = 5.0; + double sphereRadius = 20.0; + SphericalDiffuse gf( + epsilon1, epsilon2, width, sphereRadius, Eigen::Vector3d::Zero(), 5); + THEN("the matrix elements of S are") { + results = op.computeS(cavity, gf); + reference = + cnpy::custom::npy_load("erfsphericaldiffuse_S_collocation.npy"); + for (int i = 0; i < cavity.size(); ++i) { + for (int j = 0; j < cavity.size(); ++j) { + REQUIRE(reference(i, j) == Approx(results(i, j))); + } + } + } + AND_THEN("the matrix elements of D are") { + results = op.computeD(cavity, gf); + reference = + cnpy::custom::npy_load("erfsphericaldiffuse_D_collocation.npy"); + for (int i = 0; i < cavity.size(); ++i) { + for (int j = 0; j < cavity.size(); ++j) { + REQUIRE(reference(i, j) == Approx(results(i, j))); + } + } + } + } } } diff --git a/tests/bi_operators/erfsphericaldiffuse_D_collocation.npy b/tests/bi_operators/erfsphericaldiffuse_D_collocation.npy new file mode 100644 index 000000000..b62158341 Binary files /dev/null and b/tests/bi_operators/erfsphericaldiffuse_D_collocation.npy differ diff --git a/tests/bi_operators/erfsphericaldiffuse_S_collocation.npy b/tests/bi_operators/erfsphericaldiffuse_S_collocation.npy new file mode 100644 index 000000000..febb7fd64 Binary files /dev/null and b/tests/bi_operators/erfsphericaldiffuse_S_collocation.npy differ diff --git a/tests/bi_operators/logsphericaldiffuse_D_collocation.npy b/tests/bi_operators/logsphericaldiffuse_D_collocation.npy new file mode 100644 index 000000000..2e4785ce1 Binary files /dev/null and b/tests/bi_operators/logsphericaldiffuse_D_collocation.npy differ diff --git a/tests/bi_operators/logsphericaldiffuse_S_collocation.npy b/tests/bi_operators/logsphericaldiffuse_S_collocation.npy new file mode 100644 index 000000000..3835fe6e9 Binary files /dev/null and b/tests/bi_operators/logsphericaldiffuse_S_collocation.npy differ diff --git a/tests/bi_operators/tanhsphericaldiffuse_D_collocation.npy b/tests/bi_operators/tanhsphericaldiffuse_D_collocation.npy index a16abf62d..189db0a86 100644 Binary files a/tests/bi_operators/tanhsphericaldiffuse_D_collocation.npy and b/tests/bi_operators/tanhsphericaldiffuse_D_collocation.npy differ diff --git a/tests/bi_operators/tanhsphericaldiffuse_S_collocation.npy b/tests/bi_operators/tanhsphericaldiffuse_S_collocation.npy index 83cad39da..04691996b 100644 Binary files a/tests/bi_operators/tanhsphericaldiffuse_S_collocation.npy and b/tests/bi_operators/tanhsphericaldiffuse_S_collocation.npy differ diff --git a/tests/bi_operators/uniformdielectric_D_collocation.npy b/tests/bi_operators/uniformdielectric_D_collocation.npy index 6020f69ce..8e3a4de8b 100644 Binary files a/tests/bi_operators/uniformdielectric_D_collocation.npy and b/tests/bi_operators/uniformdielectric_D_collocation.npy differ diff --git a/tests/bi_operators/uniformdielectric_D_purisima.npy b/tests/bi_operators/uniformdielectric_D_purisima.npy index 97251d44a..fe3fabdf5 100644 Binary files a/tests/bi_operators/uniformdielectric_D_purisima.npy and b/tests/bi_operators/uniformdielectric_D_purisima.npy differ diff --git a/tests/bi_operators/uniformdielectric_S_collocation.npy b/tests/bi_operators/uniformdielectric_S_collocation.npy index 496aed54f..1585c6a75 100644 Binary files a/tests/bi_operators/uniformdielectric_S_collocation.npy and b/tests/bi_operators/uniformdielectric_S_collocation.npy differ diff --git a/tests/bi_operators/update_reference_files.cpp b/tests/bi_operators/update_reference_files.cpp index e3c6529f9..1ad4fdaf8 100644 --- a/tests/bi_operators/update_reference_files.cpp +++ b/tests/bi_operators/update_reference_files.cpp @@ -42,6 +42,7 @@ #include "green/SphericalDiffuse.hpp" #include "green/UniformDielectric.hpp" #include "green/Vacuum.hpp" +#include "green/dielectric_profile/OneLayerErf.hpp" #include "green/dielectric_profile/OneLayerTanh.hpp" #include "utils/MathUtils.hpp" @@ -50,6 +51,7 @@ using bi_operators::Collocation; using bi_operators::Numerical; using bi_operators::Purisima; using cavity::GePolCavity; +using dielectric_profile::OneLayerErf; using dielectric_profile::OneLayerTanh; using green::AnisotropicLiquid; using green::IonicLiquid; @@ -59,7 +61,9 @@ using green::Vacuum; void save_vacuum_collocation(); void save_uniform_dielectric_collocation(); +void save_log_spherical_diffuse_collocation(); void save_tanh_spherical_diffuse_collocation(); +void save_erf_spherical_diffuse_collocation(); void save_vacuum_purisima(); void save_uniform_dielectric_purisima(); @@ -68,13 +72,17 @@ void save_vacuum_numerical(); void save_uniform_dielectric_numerical(); void save_ionic_liquid_numerical(); void save_anisotropic_liquid_numerical(); +void save_log_spherical_diffuse_numerical(); void save_tanh_spherical_diffuse_numerical(); +void save_erf_spherical_diffuse_numerical(); int main() { initBohrToAngstrom(bohrToAngstrom); save_vacuum_collocation(); save_uniform_dielectric_collocation(); + save_log_spherical_diffuse_collocation(); save_tanh_spherical_diffuse_collocation(); + save_erf_spherical_diffuse_collocation(); save_vacuum_purisima(); save_uniform_dielectric_purisima(); @@ -113,6 +121,28 @@ void save_uniform_dielectric_collocation() { cnpy::custom::npy_save("uniformdielectric_D_collocation.npy", D_results); } +void save_log_spherical_diffuse_collocation() { + double epsilon1 = 2.0; + double epsilon2 = 80.0; + double width = 5.0; + double sphereRadius = 20.0; + Eigen::Vector3d offset; + offset << 1.0, 2.0, 3.0; + Molecule molec = dummy<0>(1.44 / bohrToAngstrom(), offset); + double area = 10.0; + GePolCavity cavity(molec, area, 0.0, 100.0); + + Collocation op; + + SphericalDiffuse<> gf( + epsilon1, epsilon2, width, sphereRadius, Eigen::Vector3d::Zero(), 5); + + Eigen::MatrixXd S_results = op.computeS(cavity, gf); + cnpy::custom::npy_save("logsphericaldiffuse_S_collocation.npy", S_results); + Eigen::MatrixXd D_results = op.computeD(cavity, gf); + cnpy::custom::npy_save("logsphericaldiffuse_D_collocation.npy", D_results); +} + void save_tanh_spherical_diffuse_collocation() { double epsilon1 = 2.0; double epsilon2 = 80.0; @@ -135,6 +165,28 @@ void save_tanh_spherical_diffuse_collocation() { cnpy::custom::npy_save("tanhsphericaldiffuse_D_collocation.npy", D_results); } +void save_erf_spherical_diffuse_collocation() { + double epsilon1 = 2.0; + double epsilon2 = 80.0; + double width = 5.0; + double sphereRadius = 20.0; + Eigen::Vector3d offset; + offset << 1.0, 2.0, 3.0; + Molecule molec = dummy<0>(1.44 / bohrToAngstrom(), offset); + double area = 10.0; + GePolCavity cavity(molec, area, 0.0, 100.0); + + Collocation op; + + SphericalDiffuse gf( + epsilon1, epsilon2, width, sphereRadius, Eigen::Vector3d::Zero(), 5); + + Eigen::MatrixXd S_results = op.computeS(cavity, gf); + cnpy::custom::npy_save("erfsphericaldiffuse_S_collocation.npy", S_results); + Eigen::MatrixXd D_results = op.computeD(cavity, gf); + cnpy::custom::npy_save("erfsphericaldiffuse_D_collocation.npy", D_results); +} + void save_vacuum_purisima() { Molecule molec = dummy<0>(1.44 / bohrToAngstrom()); double area = 10.0; @@ -229,6 +281,28 @@ void save_anisotropic_liquid_numerical() { cnpy::custom::npy_save("anisotropicliquid_D_numerical.npy", D_results); } +void save_log_spherical_diffuse_numerical() { + double epsilon1 = 2.0; + double epsilon2 = 80.0; + double width = 5.0; + double sphereRadius = 10.0; + Eigen::Vector3d offset; + offset << 1.0, 2.0, 3.0; + Molecule molec = dummy<0>(1.44 / bohrToAngstrom(), offset); + double area = 10.0; + GePolCavity cavity(molec, area, 0.0, 100.0); + + Numerical op; + + SphericalDiffuse<> gf( + epsilon1, epsilon2, width, sphereRadius, Eigen::Vector3d::Zero(), 3); + + Eigen::MatrixXd S_results = op.computeS(cavity, gf); + cnpy::custom::npy_save("logsphericaldiffuse_S_numerical.npy", S_results); + Eigen::MatrixXd D_results = op.computeD(cavity, gf); + cnpy::custom::npy_save("logsphericaldiffuse_D_numerical.npy", D_results); +} + void save_tanh_spherical_diffuse_numerical() { double epsilon1 = 2.0; double epsilon2 = 80.0; @@ -250,3 +324,25 @@ void save_tanh_spherical_diffuse_numerical() { Eigen::MatrixXd D_results = op.computeD(cavity, gf); cnpy::custom::npy_save("tanhsphericaldiffuse_D_numerical.npy", D_results); } + +void save_erf_spherical_diffuse_numerical() { + double epsilon1 = 2.0; + double epsilon2 = 80.0; + double width = 5.0; + double sphereRadius = 10.0; + Eigen::Vector3d offset; + offset << 1.0, 2.0, 3.0; + Molecule molec = dummy<0>(1.44 / bohrToAngstrom(), offset); + double area = 10.0; + GePolCavity cavity(molec, area, 0.0, 100.0); + + Numerical op; + + SphericalDiffuse gf( + epsilon1, epsilon2, width, sphereRadius, Eigen::Vector3d::Zero(), 3); + + Eigen::MatrixXd S_results = op.computeS(cavity, gf); + cnpy::custom::npy_save("erfsphericaldiffuse_S_numerical.npy", S_results); + Eigen::MatrixXd D_results = op.computeD(cavity, gf); + cnpy::custom::npy_save("erfsphericaldiffuse_D_numerical.npy", D_results); +} diff --git a/tests/bi_operators/vacuum_D_collocation.npy b/tests/bi_operators/vacuum_D_collocation.npy index 57fef2585..b5f5498be 100644 Binary files a/tests/bi_operators/vacuum_D_collocation.npy and b/tests/bi_operators/vacuum_D_collocation.npy differ diff --git a/tests/bi_operators/vacuum_D_purisima.npy b/tests/bi_operators/vacuum_D_purisima.npy index 8562747e3..458185a5d 100644 Binary files a/tests/bi_operators/vacuum_D_purisima.npy and b/tests/bi_operators/vacuum_D_purisima.npy differ diff --git a/tests/bi_operators/vacuum_S_collocation.npy b/tests/bi_operators/vacuum_S_collocation.npy index 571d50f1a..b89386877 100644 Binary files a/tests/bi_operators/vacuum_S_collocation.npy and b/tests/bi_operators/vacuum_S_collocation.npy differ diff --git a/tests/green/green_spherical_diffuse.cpp b/tests/green/green_spherical_diffuse.cpp index 5643e40ae..f634ccc5a 100644 --- a/tests/green/green_spherical_diffuse.cpp +++ b/tests/green/green_spherical_diffuse.cpp @@ -42,28 +42,180 @@ using green::SphericalDiffuse; SCENARIO("Evaluation of the spherical diffuse Green's function and its derivatives", "[green][green_spherical_diffuse]") { + int maxL = 10; + // High dielectric constant inside + double eps1 = 80.0; + // Low dielectric constant outside + double eps2 = 2.0; + double sphereRadius = 100.0; + double width = 5.0; + // Evaluation inside the sphere + Eigen::Vector3d source1 = (Eigen::Vector3d() << 1.0, 0.0, 0.0).finished(); + Eigen::Vector3d sourceNormal1 = source1; + sourceNormal1.normalize(); + Eigen::Vector3d probe1 = (Eigen::Vector3d() << 2.0, 0.0, 0.0).finished(); + Eigen::Vector3d probeNormal1 = probe1; + probeNormal1.normalize(); + // Evaluation outside the sphere + Eigen::Vector3d source2 = (Eigen::Vector3d() << 150.0, 150.0, 150.0).finished(); + Eigen::Vector3d sourceNormal2 = source2; + sourceNormal2.normalize(); + Eigen::Vector3d probe2 = (Eigen::Vector3d() << 151.0, 150.0, 150.0).finished(); + Eigen::Vector3d probeNormal2 = probe2; + probeNormal2.normalize(); + GIVEN("A permittivity profile modelled by the logarithmic profile") { + WHEN("the spherical droplet is centered at the origin") { + Eigen::Vector3d sphereCenter = Eigen::Vector3d::Zero(); + SphericalDiffuse<> gf(eps1, eps2, width, sphereRadius, sphereCenter, maxL); + THEN("the value of the Green's function inside the droplet is") { + double value = 0.0204749331147813275; + double gf_value = gf.kernelS(source1, probe1); + INFO("ref_value = " << std::setprecision( + std::numeric_limits::digits10) + << value); + INFO("gf_value = " << std::setprecision( + std::numeric_limits::digits10) + << gf_value); + REQUIRE(value == Approx(gf_value)); + } + AND_THEN("the value of the Green's function outside the droplet is") { + double value = 0.488060362514614432; + double gf_value = gf.kernelS(source2, probe2); + INFO("ref_value = " << std::setprecision( + std::numeric_limits::digits10) + << value); + INFO("gf_value = " << std::setprecision( + std::numeric_limits::digits10) + << gf_value); + REQUIRE(value == Approx(gf_value)); + } + THEN("the value of the Green's function directional derivative wrt the probe " + "point inside the droplet is") { + double derProbe = -0.0124999765635167015; + double gf_derProbe = gf.derivativeProbe(probeNormal1, source1, probe1); + INFO("ref_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << derProbe); + INFO("gf_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derProbe); + REQUIRE(derProbe == Approx(gf_derProbe)); + } + AND_THEN("the value of the Green's function directional derivative wrt the " + "probe point outside the droplet is") { + double derProbe = -0.290662079075743041; + double gf_derProbe = gf.derivativeProbe(probeNormal2, source2, probe2); + INFO("ref_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << derProbe); + INFO("gf_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derProbe); + REQUIRE(derProbe == Approx(gf_derProbe)); + } + THEN("the value of the Green's function directional derivative wrt the source " + "point inside the droplet is") { + double derSource = 0.00937504723103055326; + double gf_derSource = gf.derivativeSource(sourceNormal1, source1, probe1); + INFO("ref_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << derSource); + INFO("gf_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derSource); + REQUIRE(derSource == Approx(gf_derSource)); + } + AND_THEN("the value of the Green's function directional derivative wrt the " + "source point outside the droplet is") { + double derSource = -0.938830970128590181; + double gf_derSource = gf.derivativeSource(sourceNormal2, source2, probe2); + INFO("ref_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << derSource); + INFO("gf_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derSource); + REQUIRE(derSource == Approx(gf_derSource)); + } + } + + AND_WHEN("the spherical droplet is centered away from the origin") { + Eigen::Vector3d sphereCenter = + (Eigen::Vector3d() << 25.0, 0.0, 0.0).finished(); + SphericalDiffuse<> gf(eps1, eps2, width, sphereRadius, sphereCenter, maxL); + THEN("the value of the Green's function inside the droplet is") { + double value = 0.0173845118865096904; + double gf_value = gf.kernelS(source1, probe1); + INFO("ref_value = " << std::setprecision( + std::numeric_limits::digits10) + << value); + INFO("gf_value = " << std::setprecision( + std::numeric_limits::digits10) + << gf_value); + REQUIRE(value == Approx(gf_value)); + } + AND_THEN("the value of the Green's function outside the droplet is") { + double value = 0.501844654162973303; + double gf_value = gf.kernelS(source2, probe2); + INFO("ref_value = " << std::setprecision( + std::numeric_limits::digits10) + << value); + INFO("gf_value = " << std::setprecision( + std::numeric_limits::digits10) + << gf_value); + REQUIRE(value == Approx(gf_value)); + } + THEN("the value of the Green's function directional derivative wrt the probe " + "point inside the droplet is") { + double derProbe = -0.012483438527558649; + double gf_derProbe = gf.derivativeProbe(probeNormal1, source1, probe1); + INFO("ref_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << derProbe); + INFO("gf_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derProbe); + REQUIRE(derProbe == Approx(gf_derProbe)); + } + AND_THEN("the value of the Green's function directional derivative wrt the " + "probe point outside the droplet is") { + double derProbe = -0.291257922496734878; + double gf_derProbe = gf.derivativeProbe(probeNormal2, source2, probe2); + INFO("ref_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << derProbe); + INFO("gf_derProbe = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derProbe); + REQUIRE(derProbe == Approx(gf_derProbe)); + } + THEN("the value of the Green's function directional derivative wrt the source " + "point inside the droplet is") { + double derSource = 0.0124835646475064677; + double gf_derSource = gf.derivativeSource(sourceNormal1, source1, probe1); + INFO("ref_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << derSource); + INFO("gf_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derSource); + REQUIRE(derSource == Approx(gf_derSource)); + } + AND_THEN("the value of the Green's function directional derivative wrt the " + "source point outside the droplet is") { + double derSource = 5.01504540067754245; + double gf_derSource = gf.derivativeSource(sourceNormal2, source2, probe2); + INFO("ref_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << derSource); + INFO("gf_derSource = " + << std::setprecision(std::numeric_limits::digits10) + << gf_derSource); + REQUIRE(derSource == Approx(gf_derSource)); + } + } + } GIVEN("A permittivity profile modelled by the hyperbolic tangent function") { - int maxL = 10; - // High dielectric constant inside - double eps1 = 80.0; - // Low dielectric constant outside - double eps2 = 2.0; - double sphereRadius = 100.0; - double width = 5.0; - // Evaluation inside the sphere - Eigen::Vector3d source1 = (Eigen::Vector3d() << 1.0, 0.0, 0.0).finished(); - Eigen::Vector3d sourceNormal1 = source1; - sourceNormal1.normalize(); - Eigen::Vector3d probe1 = (Eigen::Vector3d() << 2.0, 0.0, 0.0).finished(); - Eigen::Vector3d probeNormal1 = probe1; - probeNormal1.normalize(); - // Evaluation outside the sphere - Eigen::Vector3d source2 = (Eigen::Vector3d() << 150.0, 150.0, 150.0).finished(); - Eigen::Vector3d sourceNormal2 = source2; - sourceNormal2.normalize(); - Eigen::Vector3d probe2 = (Eigen::Vector3d() << 151.0, 150.0, 150.0).finished(); - Eigen::Vector3d probeNormal2 = probe2; - probeNormal2.normalize(); WHEN("the spherical droplet is centered at the origin") { Eigen::Vector3d sphereCenter = Eigen::Vector3d::Zero(); SphericalDiffuse gf( @@ -219,27 +371,6 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ } GIVEN("A permittivity profile modelled by the error function") { - int maxL = 3; - // High dielectric constant inside - double eps1 = 80.0; - // Low dielectric constant outside - double eps2 = 2.0; - double sphereRadius = 100.0; - double width = 5.0; - // Evaluation inside the sphere - Eigen::Vector3d source1 = (Eigen::Vector3d() << 1.0, 0.0, 0.0).finished(); - Eigen::Vector3d sourceNormal1 = source1; - sourceNormal1.normalize(); - Eigen::Vector3d probe1 = (Eigen::Vector3d() << 2.0, 0.0, 0.0).finished(); - Eigen::Vector3d probeNormal1 = probe1; - probeNormal1.normalize(); - // Evaluation outside the sphere - Eigen::Vector3d source2 = (Eigen::Vector3d() << 150.0, 150.0, 150.0).finished(); - Eigen::Vector3d sourceNormal2 = source2; - sourceNormal2.normalize(); - Eigen::Vector3d probe2 = (Eigen::Vector3d() << 151.0, 150.0, 150.0).finished(); - Eigen::Vector3d probeNormal2 = probe2; - probeNormal2.normalize(); WHEN("the spherical droplet is centered at the origin") { Eigen::Vector3d sphereCenter = Eigen::Vector3d::Zero(); SphericalDiffuse gf( @@ -256,7 +387,7 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ REQUIRE(value == Approx(gf_value)); } AND_THEN("the value of the Green's function outside the droplet is") { - double value = 16.4638334471119663; + double value = 0.546459075558889285; double gf_value = gf.kernelS(source2, probe2); INFO("ref_value = " << std::setprecision( std::numeric_limits::digits10) @@ -280,7 +411,7 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ } AND_THEN("the value of the Green's function directional derivative wrt the " "probe point outside the droplet is") { - double derProbe = -7.06834149583279725; + double derProbe = -0.292047321249766512; double gf_derProbe = gf.derivativeProbe(probeNormal2, source2, probe2); INFO("ref_derProbe = " << std::setprecision(std::numeric_limits::digits10) @@ -304,7 +435,7 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ } AND_THEN("the value of the Green's function directional derivative wrt the " "source point outside the droplet is") { - double derSource = -10.8295013604120527; + double derSource = -2.1857233870498094; double gf_derSource = gf.derivativeSource(sourceNormal2, source2, probe2); INFO("ref_derSource = " << std::setprecision(std::numeric_limits::digits10) @@ -333,7 +464,7 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ REQUIRE(value == Approx(gf_value)); } AND_THEN("the value of the Green's function outside the droplet is") { - double value = -1.64961265861670991; + double value = 0.372262125530776311; double gf_value = gf.kernelS(source2, probe2); INFO("ref_value = " << std::setprecision( std::numeric_limits::digits10) @@ -357,7 +488,7 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ } AND_THEN("the value of the Green's function directional derivative wrt the " "probe point outside the droplet is") { - double derProbe = 1.03455899307935972; + double derProbe = -0.27916006373779334; double gf_derProbe = gf.derivativeProbe(probeNormal2, source2, probe2); INFO("ref_derProbe = " << std::setprecision(std::numeric_limits::digits10) @@ -381,7 +512,7 @@ SCENARIO("Evaluation of the spherical diffuse Green's function and its derivativ } AND_THEN("the value of the Green's function directional derivative wrt the " "source point outside the droplet is") { - double derSource = -6.97655723591150689; + double derSource = 3.4616694327527231; double gf_derSource = gf.derivativeSource(sourceNormal2, source2, probe2); INFO("ref_derSource = " << std::setprecision(std::numeric_limits::digits10) diff --git a/tests/iefpcm/CMakeLists.txt b/tests/iefpcm/CMakeLists.txt index bd15601e3..5ad1c8733 100644 --- a/tests/iefpcm/CMakeLists.txt +++ b/tests/iefpcm/CMakeLists.txt @@ -1,7 +1,9 @@ add_library(iefpcm-tests OBJECT iefpcm_anisotropic-gepol-point.cpp iefpcm_anisotropic-symmetry.cpp - iefpcm_diffuse-gepol-point.cpp + iefpcm_tanh-spherical-diffuse-gepol-point.cpp + iefpcm_erf-spherical-diffuse-gepol-point.cpp + iefpcm_log-spherical-diffuse-gepol-point.cpp iefpcm_gepol-C2H4_D2h.cpp iefpcm_gepol-NH3.cpp iefpcm_gepol-NH3_from-file.cpp @@ -19,9 +21,20 @@ add_Catch_test(iefpcm_gepol-NH3 "solver;iefpcm;iefpcm_gepol-NH3") # iefpcm_anisotropic-symmetry.cpp test add_Catch_test(iefpcm_anisotropic-symmetry "solver;iefpcm;iefpcm_anisotropic-symmetry;anisotropic") -# iefpcm_diffuse-gepol-point.cpp test -add_Catch_test(iefpcm_diffuse-gepol-point "solver;iefpcm;iefpcm_diffuse-gepol-point;anisotropic") -set_tests_properties(iefpcm_diffuse-gepol-point PROPERTIES COST 200.0) +# iefpcm_tanh-spherical-diffuse-gepol-point.cpp test +add_Catch_test(iefpcm_tanh-spherical-diffuse-gepol-point + "solver;iefpcm;iefpcm_tanh-spherical-diffuse-gepol-point;anisotropic") +set_tests_properties(iefpcm_tanh-spherical-diffuse-gepol-point PROPERTIES COST 200.0) + +# iefpcm_erf-spherical-diffuse-gepol-point.cpp test +add_Catch_test(iefpcm_erf-spherical-diffuse-gepol-point + "solver;iefpcm;iefpcm_erf-spherical-diffuse-gepol-point;anisotropic") +set_tests_properties(iefpcm_erf-spherical-diffuse-gepol-point PROPERTIES COST 200.0) + +# iefpcm_log-spherical-diffuse-gepol-point.cpp test +add_Catch_test(iefpcm_log-spherical-diffuse-gepol-point + "solver;iefpcm;iefpcm_log-spherical-diffuse-gepol-point;anisotropic") +set_tests_properties(iefpcm_log-spherical-diffuse-gepol-point PROPERTIES COST 200.0) # iefpcm_gepol-point.cpp test add_Catch_test(iefpcm_gepol-point "solver;iefpcm;iefpcm_gepol-point") diff --git a/tests/iefpcm/iefpcm_erf-spherical-diffuse-gepol-point.cpp b/tests/iefpcm/iefpcm_erf-spherical-diffuse-gepol-point.cpp new file mode 100644 index 000000000..677328571 --- /dev/null +++ b/tests/iefpcm/iefpcm_erf-spherical-diffuse-gepol-point.cpp @@ -0,0 +1,138 @@ +/* + * PCMSolver, an API for the Polarizable Continuum Model + * Copyright (C) 2018 Roberto Di Remigio, Luca Frediani and contributors. + * + * This file is part of PCMSolver. + * + * PCMSolver is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PCMSolver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with PCMSolver. If not, see . + * + * For information on the complete list of contributors to the + * PCMSolver API, see: + */ + +#include "catch.hpp" + +#include + +#include + +#include "TestingMolecules.hpp" +#include "bi_operators/Collocation.hpp" +#include "cavity/GePolCavity.hpp" +#include "green/DerivativeTypes.hpp" +#include "green/SphericalDiffuse.hpp" +#include "green/Vacuum.hpp" +#include "green/dielectric_profile/OneLayerErf.hpp" +#include "solver/IEFSolver.hpp" +#include "utils/Molecule.hpp" + +using namespace pcm; +using bi_operators::Collocation; +using cavity::GePolCavity; +using dielectric_profile::OneLayerErf; +using green::SphericalDiffuse; +using green::Vacuum; +using solver::IEFSolver; + +SCENARIO("Test solver for the IEFPCM for a point charge in a spherical diffuse " + "environment modelled with an error function profile and a GePol cavity", + "[solver][iefpcm][iefpcm_erf-spherical-diffuse-gepol-point][anisotropic]") { + GIVEN("An anisotropic environment modelled as a spherical diffuse permittivity") { + Eigen::Vector3d offset; + offset << 10.0, -5.00, 5.00; + double eps1 = 2.0; + double eps2 = 80.0; + double center = 10.0; + double width = 5.0; + Vacuum<> gf_i; + bool symm = true; + + Collocation op; + + double charge = 8.0; + double totalASC = -7.8743539512; + /*! \class IEFSolver + * \test \b pointChargeDiffuseGePol tests IEFSolver using a point charge with a + * GePol cavity and a spherical diffuse interface + * The spherical diffuse interface is centered at the origin, while the point + * charge is away from the origin. + */ + WHEN("the spherical diffuse layer is centered at the origin and the charge is " + "away from the origin") { + Molecule point = dummy<0>(2.0, offset); + double area = 1.0; + double probeRadius = 0.0; + double minRadius = 100.0; + GePolCavity cavity(point, area, probeRadius, minRadius); + + int maxL = 5; + SphericalDiffuse gf_o( + eps1, eps2, width, center, Eigen::Vector3d::Zero(), maxL); + IEFSolver solver(symm); + solver.buildSystemMatrix(cavity, gf_i, gf_o, op); + int size = cavity.size(); + Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge, offset); + for (int i = 0; i < size; ++i) { + INFO("fake_mep(" << i << ") = " << fake_mep(i)); + } + THEN("the apparent surface charge is") { + Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size); + fake_asc = solver.computeCharge(fake_mep); + double totalFakeASC = fake_asc.sum(); + for (int i = 0; i < size; ++i) { + INFO("fake_asc(" << i << ") = " << fake_asc(i)); + } + + CAPTURE(totalASC); + CAPTURE(totalFakeASC); + CAPTURE(totalASC - totalFakeASC); + REQUIRE(totalASC == Approx(totalFakeASC)); + } + } + + AND_WHEN("the spherical diffuse layers is centered away from the origin and the " + "charge is at the origin") { + Molecule point = dummy<0>(2.0); + double area = 1.0; + double probeRadius = 0.0; + double minRadius = 100.0; + GePolCavity cavity(point, area, probeRadius, minRadius); + + int maxL = 5; + SphericalDiffuse gf_o(eps1, eps2, width, center, offset, maxL); + + IEFSolver solver(symm); + solver.buildSystemMatrix(cavity, gf_i, gf_o, op); + + int size = cavity.size(); + Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge); + for (int i = 0; i < size; ++i) { + INFO("fake_mep(" << i << ") = " << fake_mep(i)); + } + THEN("the apparent surface charge is") { + Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size); + fake_asc = solver.computeCharge(fake_mep); + double totalFakeASC = fake_asc.sum(); + for (int i = 0; i < size; ++i) { + INFO("fake_asc(" << i << ") = " << fake_asc(i)); + } + + CAPTURE(totalASC); + CAPTURE(totalFakeASC); + CAPTURE(totalASC - totalFakeASC); + REQUIRE(totalASC == Approx(totalFakeASC)); + } + } + } +} diff --git a/tests/iefpcm/iefpcm_log-spherical-diffuse-gepol-point.cpp b/tests/iefpcm/iefpcm_log-spherical-diffuse-gepol-point.cpp new file mode 100644 index 000000000..13abf7727 --- /dev/null +++ b/tests/iefpcm/iefpcm_log-spherical-diffuse-gepol-point.cpp @@ -0,0 +1,136 @@ +/* + * PCMSolver, an API for the Polarizable Continuum Model + * Copyright (C) 2018 Roberto Di Remigio, Luca Frediani and contributors. + * + * This file is part of PCMSolver. + * + * PCMSolver is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * PCMSolver is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with PCMSolver. If not, see . + * + * For information on the complete list of contributors to the + * PCMSolver API, see: + */ + +#include "catch.hpp" + +#include + +#include + +#include "TestingMolecules.hpp" +#include "bi_operators/Collocation.hpp" +#include "cavity/GePolCavity.hpp" +#include "green/DerivativeTypes.hpp" +#include "green/SphericalDiffuse.hpp" +#include "green/Vacuum.hpp" +#include "solver/IEFSolver.hpp" +#include "utils/Molecule.hpp" + +using namespace pcm; +using bi_operators::Collocation; +using cavity::GePolCavity; +using green::SphericalDiffuse; +using green::Vacuum; +using solver::IEFSolver; + +SCENARIO("Test solver for the IEFPCM for a point charge in a spherical diffuse " + "environment modelled with a logarithmic profile and a GePol cavity", + "[solver][iefpcm][iefpcm_log-spherical-diffuse-gepol-point][anisotropic]") { + GIVEN("An anisotropic environment modelled as a spherical diffuse permittivity") { + Eigen::Vector3d offset; + offset << 10.0, -5.00, 5.00; + double eps1 = 2.0; + double eps2 = 80.0; + double center = 10.0; + double width = 5.0; + Vacuum<> gf_i; + bool symm = true; + + Collocation op; + + double charge = 8.0; + double totalASC = -7.8597028962; + /*! \class IEFSolver + * \test \b pointChargeDiffuseGePol tests IEFSolver using a point charge with a + * GePol cavity and a spherical diffuse interface + * The spherical diffuse interface is centered at the origin, while the point + * charge is away from the origin. + */ + WHEN("the spherical diffuse layer is centered at the origin and the charge is " + "away from the origin") { + Molecule point = dummy<0>(2.0, offset); + double area = 1.0; + double probeRadius = 0.0; + double minRadius = 100.0; + GePolCavity cavity(point, area, probeRadius, minRadius); + + int maxL = 5; + SphericalDiffuse<> gf_o( + eps1, eps2, width, center, Eigen::Vector3d::Zero(), maxL); + IEFSolver solver(symm); + solver.buildSystemMatrix(cavity, gf_i, gf_o, op); + int size = cavity.size(); + Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge, offset); + for (int i = 0; i < size; ++i) { + INFO("fake_mep(" << i << ") = " << fake_mep(i)); + } + THEN("the apparent surface charge is") { + Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size); + fake_asc = solver.computeCharge(fake_mep); + double totalFakeASC = fake_asc.sum(); + for (int i = 0; i < size; ++i) { + INFO("fake_asc(" << i << ") = " << fake_asc(i)); + } + + CAPTURE(totalASC); + CAPTURE(totalFakeASC); + CAPTURE(totalASC - totalFakeASC); + REQUIRE(totalASC == Approx(totalFakeASC)); + } + } + + AND_WHEN("the spherical diffuse layers is centered away from the origin and the " + "charge is at the origin") { + Molecule point = dummy<0>(2.0); + double area = 1.0; + double probeRadius = 0.0; + double minRadius = 100.0; + GePolCavity cavity(point, area, probeRadius, minRadius); + + int maxL = 5; + SphericalDiffuse<> gf_o(eps1, eps2, width, center, offset, maxL); + + IEFSolver solver(symm); + solver.buildSystemMatrix(cavity, gf_i, gf_o, op); + + int size = cavity.size(); + Eigen::VectorXd fake_mep = computeMEP(cavity.elements(), charge); + for (int i = 0; i < size; ++i) { + INFO("fake_mep(" << i << ") = " << fake_mep(i)); + } + THEN("the apparent surface charge is") { + Eigen::VectorXd fake_asc = Eigen::VectorXd::Zero(size); + fake_asc = solver.computeCharge(fake_mep); + double totalFakeASC = fake_asc.sum(); + for (int i = 0; i < size; ++i) { + INFO("fake_asc(" << i << ") = " << fake_asc(i)); + } + + CAPTURE(totalASC); + CAPTURE(totalFakeASC); + CAPTURE(totalASC - totalFakeASC); + REQUIRE(totalASC == Approx(totalFakeASC)); + } + } + } +} diff --git a/tests/iefpcm/iefpcm_diffuse-gepol-point.cpp b/tests/iefpcm/iefpcm_tanh-spherical-diffuse-gepol-point.cpp similarity index 94% rename from tests/iefpcm/iefpcm_diffuse-gepol-point.cpp rename to tests/iefpcm/iefpcm_tanh-spherical-diffuse-gepol-point.cpp index 629ca4100..920fdc51e 100644 --- a/tests/iefpcm/iefpcm_diffuse-gepol-point.cpp +++ b/tests/iefpcm/iefpcm_tanh-spherical-diffuse-gepol-point.cpp @@ -45,10 +45,11 @@ using green::SphericalDiffuse; using green::Vacuum; using solver::IEFSolver; -SCENARIO("Test solver for the IEFPCM for a point charge in a spherical diffuse " - "environment and a GePol cavity", - "[solver][iefpcm][iefpcm_diffuse-gepol-point][anisotropic]") { - GIVEN("An isotropic environment modelled as a spherical diffuse permittivity") { +SCENARIO( + "Test solver for the IEFPCM for a point charge in a spherical diffuse " + "environment and a GePol cavity", + "[solver][iefpcm][iefpcm_tanh-spherical-diffuse-gepol-point][anisotropic]") { + GIVEN("An anisotropic environment modelled as a spherical diffuse permittivity") { Eigen::Vector3d offset; offset << 10.0, -5.00, 5.00; double eps1 = 2.0;