diff --git a/src/driver.cpp b/src/driver.cpp index a19f997fb..2967a11f8 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -983,7 +983,7 @@ void driver::rsp::calc_properties(const json &json_prop, Molecule &mol, int dir, * construct all operator which are present in this input. Option to set * perturbation order of the operators. */ -void driver::build_fock_operator(const json &json_fock, Molecule &mol, FockBuilder &F, int order) { +void driver::build_fock_operator(const json &json_fock, Molecule &mol, FockBuilder &F, int order, bool is_dynamic) { auto &nuclei = mol.getNuclei(); auto Phi_p = mol.getOrbitals_p(); auto X_p = mol.getOrbitalsX_p(); diff --git a/src/environment/Permittivity.h b/src/environment/Permittivity.h index 8cd9a0b13..09e73a337 100644 --- a/src/environment/Permittivity.h +++ b/src/environment/Permittivity.h @@ -65,7 +65,7 @@ class Permittivity final : public StepFunction { */ double evalf(const mrcpp::Coord<3> &r) const override; - void printHeader() const override { detail::print_header("Solvation Cavity", this->formulation, getValueIn(), getValueOut()); } + void printParameters() const override { detail::print_header("Permittivity", this->formulation, getValueIn(), getValueOut()); } private: std::string formulation{"exponential"}; diff --git a/src/environment/StepFunction.cpp b/src/environment/StepFunction.cpp index 8d9e4507d..7d5a35e7f 100644 --- a/src/environment/StepFunction.cpp +++ b/src/environment/StepFunction.cpp @@ -36,6 +36,7 @@ void print_header(const std::string &header, const std::string &formulation, dou print_utils::text(0, "Formulation", formulation, true); print_utils::scalar(0, "Value inside Cavity", in_value, "(in)", 6); print_utils::scalar(0, "Value outside Cavity", out_value, "(out)", 6); + mrcpp::print::separator(0, '=', 2); } } // namespace detail @@ -43,67 +44,4 @@ StepFunction::StepFunction(std::shared_ptr cavity, double val_in : in(val_in) , out(val_out) , cavity{std::move(cavity)} {} - -void StepFunction::printParameters() const { - // Collect relevant quantities - auto c_pin = this->cavity; - - auto coords = c_pin->getCoordinates(); - auto radii = c_pin->getRadii(); - auto radii_0 = c_pin->getOriginalRadii(); - auto alphas = c_pin->getRadiiScalings(); - auto sigmas = c_pin->getWidths(); - auto betas = c_pin->getWidthScalings(); - - // Set widths - auto w0 = mrcpp::Printer::getWidth() - 1; - auto w1 = 5; - auto w2 = 9; - auto w3 = 6; - auto w4 = 10; - auto w5 = w0 - w1 - w2 - 3 * w3 - 3 * w4; - - // Build table column headers - std::stringstream o_head; - o_head << std::setw(w1) << "N"; - o_head << std::setw(w2) << "R_0"; - o_head << std::setw(w3 + 1) << "Alpha"; - o_head << std::setw(w3 - 1) << "Beta"; - o_head << std::setw(w3) << "Sigma"; - o_head << std::setw(w5) << "Radius"; - o_head << std::setw(w4) << "x"; - o_head << std::setw(w4) << "y"; - o_head << std::setw(w4) << "z"; - - // Print - printHeader(); - mrcpp::print::separator(0, '-'); - println(0, o_head.str()); - mrcpp::print::separator(0, '-'); - for (auto i = 0; i < coords.size(); i++) { - auto coord = coords[i]; - auto x = coord[0]; - auto y = coord[1]; - auto z = coord[2]; - auto r = radii[i]; - auto r_0 = radii_0[i]; - auto alpha = alphas[i]; - auto beta = betas[i]; - auto sigma = sigmas[i]; - - std::stringstream o_coord; - o_coord << std::setw(w1) << i; - o_coord << std::setw(w2) << std::setprecision(4) << std::fixed << r_0; - o_coord << std::setw(w3) << std::setprecision(2) << std::fixed << alpha; - o_coord << std::setw(w3) << std::setprecision(2) << std::fixed << beta; - o_coord << std::setw(w3) << std::setprecision(2) << std::fixed << sigma << " ->"; - o_coord << std::setw(w5 - 4) << std::setprecision(4) << std::fixed << r; - o_coord << std::setw(w4) << std::setprecision(6) << std::fixed << x; - o_coord << std::setw(w4) << std::setprecision(6) << std::fixed << y; - o_coord << std::setw(w4) << std::setprecision(6) << std::fixed << z; - println(0, o_coord.str()); - } - mrcpp::print::separator(0, '=', 2); -} - } // namespace mrchem diff --git a/src/environment/StepFunction.h b/src/environment/StepFunction.h index 08df58082..fb4ced35a 100644 --- a/src/environment/StepFunction.h +++ b/src/environment/StepFunction.h @@ -68,9 +68,7 @@ class StepFunction : public mrcpp::RepresentableFunction<3> { std::shared_ptr getCavity() const { return this->cavity; } - void printParameters() const; - - virtual void printHeader() const { detail::print_header("Step function of Cavity values", "Standard", getValueIn(), getValueOut()); } + virtual void printParameters() const { detail::print_header("Step function", "Standard", getValueIn(), getValueOut()); } protected: double in; //!< Value of the function inside the #cavity.