Skip to content

Commit 1238bd9

Browse files
committed
all tests passing and PB_solver is correct
1 parent c702121 commit 1238bd9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/solventeffect/PB_solver.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ namespace PB_solver {
5353
*/
5454

5555
TEST_CASE("Poisson Boltzmann equation solver standard", "[PB_solver][pb_standard]") {
56-
const double prec = 1.0e-3;
57-
const double thrs = 1.0e-4;
56+
const double prec = 1.0e-5;
57+
const double thrs = 1.0e-6;
5858

5959
auto dyn_thrs = false;
6060
auto kain = 7;
6161
auto max_iter = 100;
6262
auto eps_in = 1.0;
6363
auto eps_out = 78.54;
6464
auto kappa_out = 0.054995;
65-
auto slope = 0.1;
65+
auto slope = 0.2;
6666

6767
auto R = std::vector<double>({3.7794522509156563});
6868
auto sph_coords = std::vector<mrcpp::Coord<3>>({{0.0, 0.0, 0.0}});
@@ -102,22 +102,23 @@ TEST_CASE("Poisson Boltzmann equation solver standard", "[PB_solver][pb_standard
102102
Density rho_el(false);
103103

104104
auto [Er_el, Er_nuc] = Reo->getSolver()->computeEnergies(rho_el);
105+
105106
Reo->clear();
106-
REQUIRE((Er_nuc) == Approx(-1.329978908155e-01).epsilon(thrs)); // exact is -0.1373074208 Hartree, though ours is close, i think we are a bit too far away, some parameterization issue
107+
REQUIRE((Er_nuc) == Approx(-1.358726143734e-01).epsilon(thrs)); // exact is -0.1373074208 Hartree, though ours is close, i think we are a bit too far away, some parameterization issue
107108
}
108109
}
109110

110111
TEST_CASE("Poisson Boltzmann equation solver linearized", "[PB_solver][pb_linearized]") {
111-
const double prec = 1.0e-3;
112-
const double thrs = 1.0e-4;
112+
const double prec = 1.0e-5;
113+
const double thrs = 1.0e-6;
113114

114115
auto dyn_thrs = false;
115116
auto kain = 5;
116117
auto max_iter = 200;
117118
auto eps_in = 1.0;
118119
auto eps_out = 78.54;
119120
auto kappa_out = 0.054995;
120-
auto slope = 0.1;
121+
auto slope = 0.2;
121122

122123
auto R = std::vector<double>({3.7794522509156563});
123124
auto sph_coords = std::vector<mrcpp::Coord<3>>({{0.0, 0.0, 0.0}});
@@ -159,8 +160,9 @@ TEST_CASE("Poisson Boltzmann equation solver linearized", "[PB_solver][pb_linear
159160
Density rho_el(false);
160161

161162
auto [Er_el, Er_nuc] = Reo->getSolver()->computeEnergies(rho_el);
163+
162164
Reo->clear();
163-
REQUIRE(Er_nuc == Approx(-1.329978908155e-01).epsilon(thrs)); // what we get in standard GPESolver is -1.455145361712e-01, while with PB we get -1.329978908155e-01
165+
REQUIRE(Er_nuc == Approx(-1.358725427728e-01).epsilon(thrs)); // what we get in standard GPESolver is -1.455145361712e-01, while with PB we get -1.329978908155e-01
164166
}
165167
}
166168

0 commit comments

Comments
 (0)