File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -550,14 +550,17 @@ void Meddle::GaussCheck() const {
550550 double gauss_nuclear_asc = GaussEstimate (input_.molecule ().charges (),
551551 input_.outsideStaticGreenParams ().epsilon ,
552552 input_.correction ());
553- double difference = total_nuclear_asc - gauss_nuclear_asc;
553+ double abs_rel_diff =
554+ std::abs ((total_nuclear_asc - gauss_nuclear_asc) / gauss_nuclear_asc);
554555 std::stringstream tmp;
555- if (!utils::isZero (difference , 1.0e-2 )) {
556+ if (!utils::isZero (abs_rel_diff , 1.0e-2 )) {
556557 std::ostringstream errmsg;
557- errmsg << " The Gauss' theorem (" << gauss_nuclear_asc << " ) " ;
558+ errmsg
559+ << " Absolute value of the relative difference between the Gauss' theorem ("
560+ << gauss_nuclear_asc << " ) " ;
558561 errmsg << " and computed (" << total_nuclear_asc << " ) values " ;
559- errmsg << " of the total nuclear ASC differ significantly (" << difference << " ). "
560- << std::endl;
562+ errmsg << " of the total nuclear ASC higher than threshold (" << abs_rel_diff
563+ << " ). " << std::endl;
561564 errmsg << " Consider changing the average area of the cavity finite elements."
562565 << std::endl;
563566 errmsg
You can’t perform that action at this time.
0 commit comments