Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print information about the external environments #408

Merged
merged 34 commits into from
Jul 8, 2022

Conversation

Brakjen
Copy link
Contributor

@Brakjen Brakjen commented Apr 21, 2022

In response to #406.

During input parsing, now a short summary label is generated and displayed in the SCF solver table. It indicates whether an implicit solvent is being used, and if a finite external electric is applied. For example, if both are active:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Optimize ground state orbitals
 Method                  : Hartree-Fock
 Relativity              : None
 Environment             : PCM ; Electric field (0.0, 0.0, 0.01)
 Checkpointing           : Off
 Max iterations          : 5
 KAIN solver             : 3
 Localization            : Off
 Diagonalization         : First two iterations
 Start precision         : 1.00000e-03
 Final precision         : 1.00000e-03
 Helmholtz precision     : Dynamic
 Energy threshold        : Off
 Orbital threshold       : 1.00000e-02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A more detailed table is also printed earlier showing some key settings for the implicit solvent. For example:

===========================================================================
                      Self-Consistent Reaction Field
---------------------------------------------------------------------------
 Dielectric constant (inside)     :                            1.00000e+00
 Dielectric constant (outside)    :                            2.00000e+00
 Max number of micro-ierations    :                                  100.0
 Accelerate with KAIN             :                                   true
 Algorithm                        :                                   scrf
 Density type                     :                                  total
 Convergence criterion            :                                dynamic
===========================================================================

To allow for the rather long names left of the :, some tweaks to print_utils were needed. A txtBuffer option was added that lets a developer give more room if needed (defaults to 0). Also, an option for right-aligning print_utils::text was added, but a left-aligned table is perhaps aesthetically more pleasing...?

Should a table similar to the geometry one be printed for the cavity?

@Brakjen Brakjen marked this pull request as draft April 21, 2022 17:55
@codecov
Copy link

codecov bot commented Apr 21, 2022

Codecov Report

Merging #408 (bd52a5b) into master (2d0f602) will increase coverage by 0.15%.
The diff coverage is 82.35%.

@@            Coverage Diff             @@
##           master     #408      +/-   ##
==========================================
+ Coverage   68.04%   68.20%   +0.15%     
==========================================
  Files         182      183       +1     
  Lines       15208    15453     +245     
==========================================
+ Hits        10349    10540     +191     
- Misses       4859     4913      +54     
Impacted Files Coverage Δ
src/chemistry/Molecule.cpp 52.66% <0.00%> (-14.26%) ⬇️
src/chemistry/Molecule.h 83.33% <ø> (-2.88%) ⬇️
src/chemistry/PhysicalConstants.cpp 40.00% <0.00%> (-10.00%) ⬇️
src/parallel.cpp 80.43% <ø> (ø)
src/qmoperators/one_electron/ZoraOperator.h 100.00% <ø> (ø)
src/qmoperators/two_electron/ReactionPotential.h 100.00% <ø> (ø)
...c/qmoperators/two_electron/ExchangePotentialD2.cpp 45.00% <33.33%> (ø)
...rc/qmoperators/two_electron/CoulombPotentialD1.cpp 50.00% <50.00%> (ø)
...rc/qmoperators/two_electron/CoulombPotentialD2.cpp 53.84% <50.00%> (ø)
src/tensor/RankZeroOperator.cpp 64.46% <50.00%> (ø)
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d0f602...bd52a5b. Read the comment docs.

src/environment/SCRF.cpp Outdated Show resolved Hide resolved
src/environment/SCRF.cpp Outdated Show resolved Hide resolved
@@ -288,4 +289,21 @@ void SCRF::updateCurrentGamma(QMFunction &gamma_np1) {
gamma_np1.free(NUMBER::Real);
}

void SCRF::printParameters() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want some information on the actual cavity as well, because I guess we can set up a calculation with just random spheres as cavity, e.i. not restricted to atomic coordinates and vdW radius. Is this right @Gabrielgerez ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there is a possibility to specify the cavity sphere locations in the input. If not specified, then nuclear coordinates are used.

Copy link
Contributor Author

@Brakjen Brakjen Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this look?

===========================================================================
                             Solvation Cavity
---------------------------------------------------------------------------
 Cavity width            :                                        0.500000
---------------------------------------------------------------------------
    N      Radius        :               x               y               z
---------------------------------------------------------------------------
    0    4.000000        :        0.000000        0.000000        0.000000
    1    4.000000        :        0.000000        0.000000        0.000000
===========================================================================

produced from

/** @brief Pretty output of solvation cavity spheres */
void Molecule::printCavity() {
    // Collect relevant quantities
    Cavity cavity = getCavity();
    std::vector<mrcpp::Coord<3>> coords = cavity.getCoordinates();
    std::vector<double> radii = cavity.getRadii();

    // Set widths
    auto w0 = Printer::getWidth() - 1;
    auto w1 = 5;
    auto w2 = 12;
    auto w3 = 2 * w0 / 9;
    auto w4 = w0 - w1 - w2 - 3 * w3;

    // Build table column headers
    std::stringstream o_head;
    o_head << std::setw(w1) << "N";
    o_head << std::setw(w2) << "Radius";
    o_head << std::string(w4 - 1, ' ') << ':';
    o_head << std::setw(w3) << "x";
    o_head << std::setw(w3) << "y";
    o_head << std::setw(w3) << "z";

    // Print
    mrcpp::print::header(0, "Solvation Cavity");
    print_utils::scalar(0, "Cavity width", cavity.getWidth(), "", 0);
    mrcpp::print::separator(0, '-');
    println(0, o_head.str());
    mrcpp::print::separator(0, '-');
    for (int i = 0; i < coords.size(); i++) {
        mrcpp::Coord<3> coord = coords[i];
        double r = radii[i];
        double x = coord[0];
        double y = coord[1];
        double z = coord[2];

        std::stringstream o_coord;
        o_coord << std::setw(w1) << i;
        o_coord << std::setw(w2) << std::setprecision(6) << std::fixed << r;
        o_coord << std::string(w4 - 1, ' ') << ':';
        o_coord << std::setw(w3) << std::setprecision(6) << std::fixed << x;
        o_coord << std::setw(w3) << std::setprecision(6) << std::fixed << y;
        o_coord << std::setw(w3) << std::setprecision(6) << std::fixed << z;
        println(0, o_coord.str());
    }
    mrcpp::print::separator(0, '=', 2);
}

Should some of this be abstracted to print_utils::cavity? I see that's the way it is done when printing the molecular geometry.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

You mean like print_utils::coord()? No I think it is fine like this, coord is a bit more general and useful to extract.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, then I'll leave it as it is 👍

Comment on lines 94 to 96
void print_utils::text(int level, const std::string &txt, const std::string &val, bool ralign, int txtBuffer) {
int w0 = Printer::getWidth() - 2;
int w1 = w0 * 2 / 9;
int w1 = w0 * 2 / 9 - txtBuffer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to properly resolve this. We should have something that looks good with the default print_width and print_precision, but that doesn't crash if we make things too narrow, or when inserting too long strings. So either we truncate the text string to always make it fit, or we always print the full string, even if it becomes unaligned with the rest?

Copy link
Contributor Author

@Brakjen Brakjen Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a quick workaround, I thought perhaps of adding a print_utils::json method, that takes a json object, determines the longest name of the collection, and adjusts the colon placement accordingly. Could also have an option for right-aligning it. Something like this:

void print_utils::json(int level, const nlohmann::json &j, bool ralign) {
    // Determine longest name
    int w = 0;
    for (const auto &item : j.items()) {
        if (item.key().size() > w) w = item.key().size();
    }

    // Print
    for (const auto &item : j.items()) {
        std::string key = item.key();
        std::stringstream o_val;
        o_val << item.value();
        std::string val = o_val.str();

        // Remove quotes from val and print
        val.erase(std::remove(val.begin(), val.end(), '\"'), val.end());

        // If right-align, determine how much to shift the vals
        int shift = (ralign) ? Printer::getWidth() - w - val.size() - 3 : 0;

        // Avoid runtime errors due to negative shifts caused by very long names
        if (shift < 0) shift = 0;

        std::printf("%-*s%-s%-s%-s\n", w, key.c_str(), " : ", std::string(shift, ' ').c_str(), val.c_str());
    }
}

and using it like this

void SCRF::printParameters() {
    nlohmann::json data = {
        {"Dielectric constant (inside)", epsilon.getEpsIn()},
        {"Dielectric constant (outside)", epsilon.getEpsOut()},
        {"Max. number of micro-iterations", max_iter},
        {"Accelerate with KAIN", (accelerate_Vr) ? "true" : "false"},
        {"Algorithm", algorithm},
        {"Density type", density_type},
        {"Convergence criterion", convergence_criterion},
    };

    mrcpp::print::header(0, "Self-Consistent Reaction Field");
    print_utils::json(0, data, true);
    mrcpp::print::separator(0, '=', 2);
}

which produces

===========================================================================
                      Self-Consistent Reaction Field
---------------------------------------------------------------------------
Accelerate with KAIN            :                                      true
Algorithm                       :                                      scrf
Convergence criterion           :                                   dynamic
Density type                    :                                     total
Dielectric constant (inside)    :                                       1.0
Dielectric constant (outside)   :                                       2.0
Max. number of micro-iterations :                                       100
===========================================================================

For too long names (negative shift), just set shift = 0 to avoid runtime errors

===========================================================================
                      Self-Consistent Reaction Field
---------------------------------------------------------------------------
A very very very very very very very very very very very very very very very very very long name : infty
Accelerate with KAIN                                                                             : true
Algorithm                                                                                        : scrf
Convergence criterion                                                                            : dynamic
Density type                                                                                     : total
Dielectric constant (inside)                                                                     : 1.0
Dielectric constant (outside)                                                                    : 2.0
Max. number of micro-iterations                                                                  : 100
===========================================================================

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧙‍♂️ 🪄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more nitpicky things on the json printer:

  1. Each line should start and end with a whitespace
  2. I would like the colons on all the different sections in the output to line up (unless you provide a very very very long name), so the string length should be minimum w1
int w0 = Printer::getWidth() - 2;
int w1 = w0 * 2 / 9;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, the method should adhere to these criteria now :)

Left- and right-aligned sample sections compared to a Molecule section:

===========================================================================
                                 Molecule
---------------------------------------------------------------------------
 Charge                  :                                               1
 Multiplicity            :                                               1
---------------------------------------------------------------------------
    N    Atom            :               x               y               z
---------------------------------------------------------------------------
    0      Li            :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Center of mass          :        0.000000        0.000000        0.000000
===========================================================================


---------------------------------------------------------------------------
 k s sdf                 : 1.0 
 kjsdhf kjsf             : 1.0 
 ks jdfkjs               : 1.0 
---------------------------------------------------------------------------
 k s sdf                 :                                             1.0 
 kjsdhf kjsf             :                                             1.0 
 ks jdfkjs               :                                             1.0 
---------------------------------------------------------------------------
 jd jfdhfj  dhf                     : 1.0 
 jdj f djf hdjhfj dh fjd fjd djfhfj : 1.0 
 jh djfh jdfhjdh fjd fhjdh fjd      : 1.0 
---------------------------------------------------------------------------
 jd jfdhfj  dhf                     :                                  1.0 
 jdj f djf hdjhfj dh fjd fjd djfhfj :                                  1.0 
 jh djfh jdfhjdh fjd fhjdh fjd      :                                  1.0 
---------------------------------------------------------------------------
 jd jfdhfj  dhf                                                              : 1.0 
 jdj f djf hdjhfj dh fjd fjd hdfj dhf jdhf jdhf jdfhjd fhjdhfjdhf jd fdjfhfj : 1.0 
 jh djfh jdfhjdh fjd fhjdh fjd                                               : 1.0 
---------------------------------------------------------------------------
 jd jfdhfj  dhf                                                              : 1.0 
 jdj f djf hdjhfj dh fjd fjd hdfj dhf jdhf jdhf jdfhjd fhjdhfjdhf jd fdjfhfj : 1.0 
 jh djfh jdfhjdh fjd fhjdh fjd                                               : 1.0 
---------------------------------------------------------------------------

@Brakjen
Copy link
Contributor Author

Brakjen commented Apr 25, 2022

Where is the appropriate place to print information about SCRF and the cavity? Now I am printing in driver.cpp when setting up ReactionOperator, since this block only gets executed if a reaction field is requested.

if (json_fock.contains("reaction_operator")) {

        // preparing Reaction Operator
        (...)

        mol.printCavity();
        V_R->getHelper()->printParameters();
    }

@stigrj
Copy link
Contributor

stigrj commented Apr 25, 2022

printCavity() can perhaps be done at the same time as printGeometry(), after initCavity() in the molecule? But what happens here if we're not doing solvent, do we still get a cavity?

@stigrj
Copy link
Contributor

stigrj commented Apr 25, 2022

Ok, we need to fix this, there should not be any cavity_coords input section in the molecule when we don't have any solvent. This needs to be screened out in the Python part.

@Brakjen
Copy link
Contributor Author

Brakjen commented Apr 26, 2022

Ok, we need to fix this, there should not be any cavity_coords input section in the molecule when we don't have any solvent. This needs to be screened out in the Python part.

This will interfere a bit with PR #404, since the molecule and cavity validation has been abstracted to its own validator class. How best proceed? (which PR will be merged first?:P)

@stigrj
Copy link
Contributor

stigrj commented Apr 26, 2022

Yes, I see the JSON printer was also introduced in the other PR, so let's finish that one first. Can you move the final version of the JSON printer over to #404, then I can have a look at the Cavity stuff after lunch. Not sure where to put it yet

@stigrj
Copy link
Contributor

stigrj commented Apr 27, 2022

If you first squash these into a single commit, then a rebase on the new upstream will result in only trivial conflicts.

@stigrj
Copy link
Contributor

stigrj commented Apr 27, 2022

We should also fix some of the solvent related printouts:

  • The reaction potential printout at print_level > 1 does not fit well with the rest
  • I don't like the final reaction energy print
===========================================================================
                         Molecular Energy (final)
---------------------------------------------------------------------------
 Kinetic energy          :            (au)                 67.700399048617
 E-N energy              :            (au)               -181.201728318483
 Coulomb energy          :            (au)                 37.493587268261
 Exchange energy         :            (au)                  0.000000000000
 X-C energy              :            (au)                 -7.627268432947
 Ext. field (el)         :            (au)                  0.000000000000
---------------------------------------------------------------------------
 N-N energy              :            (au)                  9.039235444235
 Ext. field (nuc)        :            (au)                  0.000000000000
 Tot. Reac. Energy       :            (au)                 -6.737278530459
 El. Reac. Energy        :            (au)                  5.062225603410
 Nuc. Reac. Energy       :            (au)                -11.799504133868
---------------------------------------------------------------------------
 Electronic energy       :            (au)                -78.572784831142
 Nuclear energy          :            (au)                 -2.760268689633
---------------------------------------------------------------------------
 Total energy            :            (au)             -8.133305352077e+01
                         :      (kcal/mol)             -5.103726163876e+04
                         :        (kJ/mol)             -2.135399026966e+05
                         :            (eV)             -2.213185133919e+03
===========================================================================

@stigrj
Copy link
Contributor

stigrj commented Apr 27, 2022

Now printCavity() can be put in driver::init_molecule, after the cavity has been initialized (and move printGeometry() above the cavity block).

Not sure where the SCRF output should be though, but these are "parameters" of the calculation and not "program output", so the SCRF print should be enclosed in

~~~~~~~

~~~~~~~

and not

========

========

Actually, the "Physical Constants" should perhaps also be ~

@Brakjen
Copy link
Contributor Author

Brakjen commented Apr 28, 2022

If you first squash these into a single commit, then a rebase on the new upstream will result in only trivial conflicts.

Before I mess everything up: Is this what I should do?

First do a

git rebase -i 8ae9f19d

and change pick to squash for all commits except the top one in the commit file?

And then do a

git rebase upstream/master

and resolve conflicts?

And then a

git push --force

?

@stigrj
Copy link
Contributor

stigrj commented Apr 28, 2022

Sounds about right, starting with a git fetch upstream. Could be a good idea to make a backup branch with the current state in case something 💥 in your face 😸

@Brakjen Brakjen force-pushed the solvent-printouts branch 3 times, most recently from b3a13b0 to c41717c Compare April 30, 2022 13:10
@Brakjen
Copy link
Contributor Author

Brakjen commented Apr 30, 2022

I'll give it a 10% chance that I did the rebase correctly...

@stigrj
Copy link
Contributor

stigrj commented May 1, 2022

Looks like the print_utils::json got duplicated

@Brakjen
Copy link
Contributor Author

Brakjen commented May 1, 2022

Is it okay to just fix this "manually" by adding new commits.

@Brakjen
Copy link
Contributor Author

Brakjen commented May 2, 2022

The physical constants printouts should look like this

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 angstrom2bohrs            :                            1.8897261246257702 
 dipmom_au2debye           :                            2.5417464739297717 
 electron_g_factor         :                             -2.00231930436256 
 fine_structure_constant   :                               0.0072973525693 
 hartree2ev                :                               27.211386245988 
 hartree2kcalmol           :                             627.5094740630558 
 hartree2kjmol             :                            2625.4996394798254 
 hartree2simagnetizability :                                    78.9451185 
 hartree2wavenumbers       :                                219474.6313632 
 light_speed               :                                 137.035999084 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

or with a headline

***************************************************************************
***                                                                     ***
***                           Physical Constants                        ***
***                                                                     ***
***************************************************************************

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 angstrom2bohrs            :                            1.8897261246257702 
 dipmom_au2debye           :                            2.5417464739297717 
 electron_g_factor         :                             -2.00231930436256 
 fine_structure_constant   :                               0.0072973525693 
 hartree2ev                :                               27.211386245988 
 hartree2kcalmol           :                             627.5094740630558 
 hartree2kjmol             :                            2625.4996394798254 
 hartree2simagnetizability :                                    78.9451185 
 hartree2wavenumbers       :                                219474.6313632 
 light_speed               :                                 137.035999084 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@stigrj
Copy link
Contributor

stigrj commented May 5, 2022

Sorry, I dropped out a bit here 🙂 I think a headline is perhaps a bit excessive?

@Brakjen
Copy link
Contributor Author

Brakjen commented May 10, 2022

I checked, and the PCM part is not active during the initial guess.

Since the parameters for the SCF and for the SCRF perhaps should be printed next to each other, it might be clearer to indicate what the tables contain. So something like this? (trying to keep the tilde-style for parameters more or less consistent):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           Self-Consistent Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Optimize ground state orbitals
 Method                  : DFT (PBE0)
 Relativity              : None
 Environment             : PCM
 Checkpointing           : Off
 Max iterations          : 100
 KAIN solver             : 5
 Localization            : Off
 Diagonalization         : First two iterations
 Start precision         : 1.00000e-03
 Final precision         : 1.00000e-03
 Helmholtz precision     : Dynamic
 Energy threshold        : Off
 Orbital threshold       : 1.00000e-01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      Self-Consistent Reaction Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Accelerate with KAIN    : true 
 Algorithm               : scrf 
 Convergence criterion   : dynamic 
 Density type            : total 
 Dielec. const. (in)     : 1.0 
 Dielec. const. (out)    : 2.0 
 Max. iterations         : 100 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@Brakjen
Copy link
Contributor Author

Brakjen commented May 10, 2022

@stigrj

  • I don't like the final reaction energy print

What exactly should be improved? :)

@stigrj
Copy link
Contributor

stigrj commented May 10, 2022

We now get many new energy contributions that are printed in the end even if they are not relevant. Same with the upcoming PBC addition. We should be printing only non-zero terms, at least for the non standard contributions.

@stigrj
Copy link
Contributor

stigrj commented May 10, 2022

I like the new parameter output 👍 I wonder if the dielectric constants rather belong in the cavity part of the output? The problem is, they are not immediately connected in the code. We have the Cavity which is a pure geometric thing, which is combined with the dielectric constants into a physical Permittivity, which is then used to build the ReactionPotential in the SCRF.

Perhaps it's the Permittivity that should be printed, which would contain a Cavity, the dielectric constants and the "formulation" ("exponential" seems to be the only one implemented, but could still be stated in the output). And then we can print this Permittivity together with the SCRF optimization parameters just after their construction, before we start the ground-state SCF (instead of printing the Cavity up front together with the molecular geometry).

@Brakjen
Copy link
Contributor Author

Brakjen commented May 18, 2022

@stigrj:

Perhaps it's the Permittivity that should be printed, which would contain a Cavity, the dielectric constants and the "formulation" ("exponential" seems to be the only one implemented, but could still be stated in the output). And then we can print this Permittivity together with the SCRF optimization parameters just after their construction, before we start the ground-state SCF (instead of printing the Cavity up front together with the molecular geometry).

I have moved the printing to Permittivity.cpp, and the table now looks like this:

===========================================================================
                             Solvation Cavity
---------------------------------------------------------------------------
 Cavity width            :                                        0.500000
 Dielec. Const. (in)     :                                        1.000000
 Dielec. Const. (out)    :                                        2.000000
 Formulation             :                                     exponential
---------------------------------------------------------------------------
    N      Radius        :               x               y               z
---------------------------------------------------------------------------
    0    4.000000        :        0.000000        0.000000        0.000000
===========================================================================

But when printing these just after construction, which would be in driver::build_fock_operator, their placement in the output file does not seem optimal to me. For example, the Li test output looks like this:

Output file: Parameters printed in `driver::build_fock_operator`
                                                                           
***************************************************************************
***                                                                     ***
***                                                                     ***
***          __  __ ____   ____ _                                       ***
***         |  \/  |  _ \ / ___| |__   ___ _ __ ___                     ***
***         | |\/| | |_) | |   | '_ \ / _ \ '_ ` _ \                    ***
***         | |  | |  _ <| |___| | | |  __/ | | | | |                   ***
***         |_|  |_|_| \_\\____|_| |_|\___|_| |_| |_|                   ***
***                                                                     ***
***         VERSION            1.1.0-alpha                              ***
***                                                                     ***
***         Git branch         solvent-printouts                        ***
***         Git commit hash    fecdbe0524a548a8600b-dirty               ***
***         Git commit author  Anders Brakestad                         ***
***         Git commit date    Tue May 10 10:24:30 2022 +0200           ***
***                                                                     ***
***         Contact: [email protected]                               ***
***                                                                     ***
***         Radovan Bast            Magnar Bjorgve                      ***
***         Roberto Di Remigio      Antoine Durdek                      ***
***         Luca Frediani           Gabriel Gerez                       ***
***         Stig Rune Jensen        Jonas Juselius                      ***
***         Rune Monstad            Peter Wind                          ***
***                                                                     ***
***************************************************************************

---------------------------------------------------------------------------

 MPI processes           :       (no bank)                               1
 OpenMP threads          :                                               1
 Total cores             :                                               1
                                                                           
---------------------------------------------------------------------------

XCFun DFT library Copyright 2009-2020 Ulf Ekstrom and contributors.
See http://dftlibs.org/xcfun/ for more information.

This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details see the documentation.
Scientific users of this library should cite
U. Ekstrom, L. Visscher, R. Bast, A. J. Thorvaldsen and K. Ruud;
J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s

---------------------------------------------------------------------------

 MRCPP version         : 1.4.0-alpha
 Git branch            : HEAD
 Git commit hash       : 2797a7a18efb69942a6e
 Git commit author     : Stig Rune Jensen
 Git commit date       : Fri Mar 12 12:48:07 2021 +0100

 Linear algebra        : EIGEN v3.3.7
 Parallelization       : NONE

---------------------------------------------------------------------------


                                                                           
===========================================================================
                         MultiResolution Analysis
---------------------------------------------------------------------------
 polynomial order      : 5
 polynomial type       : Interpolating
---------------------------------------------------------------------------
 total boxes           : 8
 boxes                 : [          2           2           2 ]
 unit lengths          : [   16.00000    16.00000    16.00000 ]
 scaling factor        : [    1.00000     1.00000     1.00000 ]
 lower bounds          : [  -16.00000   -16.00000   -16.00000 ]
 upper bounds          : [   16.00000    16.00000    16.00000 ]
 total length          : [   32.00000    32.00000    32.00000 ]
===========================================================================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            Physical Constants
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 angstrom2bohrs            :                            1.8897261246257702 
 dipmom_au2debye           :                            2.5417464739297717 
 electron_g_factor         :                             -2.00231930436256 
 fine_structure_constant   :                               0.0072973525693 
 hartree2ev                :                               27.211386245988 
 hartree2kcalmol           :                             627.5094740630558 
 hartree2kjmol             :                            2625.4996394798254 
 hartree2simagnetizability :                                    78.9451185 
 hartree2wavenumbers       :                                219474.6313632 
 light_speed               :                                 137.035999084 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


                                                                           
***************************************************************************
***                                                                     ***
***                        Initializing Molecule                        ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
===========================================================================
                                 Molecule
---------------------------------------------------------------------------
 Charge                  :                                               1
 Multiplicity            :                                               1
---------------------------------------------------------------------------
    N    Atom            :               x               y               z
---------------------------------------------------------------------------
    0      Li            :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Center of mass          :        0.000000        0.000000        0.000000
===========================================================================


                                                                           
***************************************************************************
***                                                                     ***
***                 Computing Ground State Wavefunction                 ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
===========================================================================
                             Solvation Cavity
---------------------------------------------------------------------------
 Cavity width            :                                        0.500000
 Dielec. Const. (in)     :                                        1.000000
 Dielec. Const. (out)    :                                        2.000000
 Formulation             :                                     exponential
---------------------------------------------------------------------------
    N      Radius        :               x               y               z
---------------------------------------------------------------------------
    0    4.000000        :        0.000000        0.000000        0.000000
===========================================================================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      Self-Consistent Reaction Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Accelerate with KAIN    : true 
 Algorithm               : scrf 
 Convergence criterion   : dynamic 
 Density type            : total 
 Dielec. const. (in)     : 1.0 
 Dielec. const. (out)    : 2.0 
 Max. iterations         : 100 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Compute initial orbitals
 Method                  : Diagonalize SAD Hamiltonian
 Precision               : 1.00000e-03
 Screening               : 1.20000e+01 StdDev
 Restricted              : True
 Functional              : LDA (SVWN5)
 AO basis                : Hydrogenic orbitals
 Zeta quality            : 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


===========================================================================
                            Molecular Orbitals
---------------------------------------------------------------------------
 Alpha electrons         :                                               1
 Beta electrons          :                                               1
 Total electrons         :                                               2
---------------------------------------------------------------------------
    n  Occ Spin          :                                            Norm
---------------------------------------------------------------------------
    0    2    p          :                              1.000000000000e+00
===========================================================================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Compute initial energy
 Method                  : DFT (PBE0)
 Relativity              : None
 Precision               : 1.00000e-03
 Localization            : Off
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


===========================================================================
                        Molecular Energy (initial)
---------------------------------------------------------------------------
 Kinetic energy          :            (au)                  7.675564301900
 E-N energy              :            (au)                -16.530755287695
 Coulomb energy          :            (au)                  3.332799383894
 Exchange energy         :            (au)                 -0.416484495318
 X-C energy              :            (au)                 -1.283772997761
 Ext. field (el)         :            (au)                  0.000000000000
---------------------------------------------------------------------------
 N-N energy              :            (au)                  0.000000000000
 Ext. field (nuc)        :            (au)                  0.000000000000
 Tot. Reac. Energy       :            (au)                  0.000000000000
 El. Reac. Energy        :            (au)                  0.000000000000
 Nuc. Reac. Energy       :            (au)                  0.000000000000
---------------------------------------------------------------------------
 Electronic energy       :            (au)                 -7.222649094979
 Nuclear energy          :            (au)                  0.000000000000
---------------------------------------------------------------------------
 Total energy            :            (au)             -7.222649094979e+00
                         :      (kcal/mol)             -4.532280734932e+03
                         :        (kJ/mol)             -1.896306259496e+04
                         :            (eV)             -1.965382942427e+02
===========================================================================


===========================================================================
                        Orbital Energies (initial)
---------------------------------------------------------------------------
    n  Occ Spin          :                                         Epsilon
---------------------------------------------------------------------------
    0    2    p          :            (au)                 -2.332093141176
---------------------------------------------------------------------------
 Sum occupied            :            (au)                 -4.664186282352
===========================================================================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           Self-Consistent Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Optimize ground state orbitals
 Method                  : DFT (PBE0)
 Relativity              : None
 Environment             : PCM
 Checkpointing           : Off
 Max iterations          : 100
 KAIN solver             : 5
 Localization            : Off
 Diagonalization         : First two iterations
 Start precision         : 1.00000e-03
 Final precision         : 1.00000e-03
 Helmholtz precision     : Dynamic
 Energy threshold        : Off
 Orbital threshold       : 1.00000e-01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


===========================================================================
 Iter           MO residual             Total energy                Update
---------------------------------------------------------------------------
    0          1.000000e+00          -7.222649094979         -7.222649e+00
    1          6.037085e-02          -7.320075664302         -9.742657e-02
---------------------------------------------------------------------------
                      SCF converged in 1 iterations!
===========================================================================


                                                                           
***************************************************************************
***                                                                     ***
***                    Printing Molecular Properties                    ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
===========================================================================
                                 Molecule
---------------------------------------------------------------------------
 Charge                  :                                               1
 Multiplicity            :                                               1
---------------------------------------------------------------------------
    N    Atom            :               x               y               z
---------------------------------------------------------------------------
    0      Li            :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Center of mass          :        0.000000        0.000000        0.000000
===========================================================================


===========================================================================
                         Molecular Energy (final)
---------------------------------------------------------------------------
 Kinetic energy          :            (au)                  7.584212118792
 E-N energy              :            (au)                -16.491476051686
 Coulomb energy          :            (au)                  3.357678874268
 Exchange energy         :            (au)                 -0.419594145537
 X-C energy              :            (au)                 -1.286849061623
 Ext. field (el)         :            (au)                  0.000000000000
---------------------------------------------------------------------------
 N-N energy              :            (au)                  0.000000000000
 Ext. field (nuc)        :            (au)                  0.000000000000
 Tot. Reac. Energy       :            (au)                 -0.064047398516
 El. Reac. Energy        :            (au)                  0.128081335378
 Nuc. Reac. Energy       :            (au)                 -0.192128733894
---------------------------------------------------------------------------
 Electronic energy       :            (au)                 -7.127946930408
 Nuclear energy          :            (au)                 -0.192128733894
---------------------------------------------------------------------------
 Total energy            :            (au)             -7.320075664302e+00
                         :      (kcal/mol)             -4.593416830208e+03
                         :        (kJ/mol)             -1.921885601759e+04
                         :            (eV)             -1.991894062512e+02
===========================================================================


===========================================================================
                         Orbital Energies (final)
---------------------------------------------------------------------------
    n  Occ Spin          :                                         Epsilon
---------------------------------------------------------------------------
    0    2    p          :            (au)                 -2.210659505993
---------------------------------------------------------------------------
 Sum occupied            :            (au)                 -4.421319011986
===========================================================================


===========================================================================
                           Dipole Moment (dip-1)
---------------------------------------------------------------------------
 r_O                     :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Electronic vector       :       -0.000000        0.000000       -0.000000
 Magnitude               :            (au)                        0.000000
                         :         (Debye)                        0.000000
---------------------------------------------------------------------------
 Nuclear vector          :        0.000000        0.000000        0.000000
 Magnitude               :            (au)                        0.000000
                         :         (Debye)                        0.000000
---------------------------------------------------------------------------
 Total vector            :        0.000000        0.000000        0.000000
 Magnitude               :            (au)                        0.000000
                         :         (Debye)                        0.000000
===========================================================================


                                                                           
                                                                           
***************************************************************************
***                                                                     ***
***                            Exiting MRChem                           ***
***                                                                     ***
***                       Wall time :  0h  0m 45s                       ***
***                                                                     ***
***************************************************************************

It is not completely clear in this output that the SCRF parameters are irrelevant for the initial guess, and that the solvent algorithms are only used for the subsequent SCF. Also, if the SCF::run keyword is set to false, the headline is still printed along with the (now completely irrelevant) SCRF and cavity parameters.

If I move the SCRF and cavity printouts to GroundStateSolver::optimize, and slightly modify the headlines in driver::scf::run, the output becomes:

Output file: Parameters printed in `GroundStateSolver::optimize`
***************************************************************************
***                                                                     ***
***                                                                     ***
***          __  __ ____   ____ _                                       ***
***         |  \/  |  _ \ / ___| |__   ___ _ __ ___                     ***
***         | |\/| | |_) | |   | '_ \ / _ \ '_ ` _ \                    ***
***         | |  | |  _ <| |___| | | |  __/ | | | | |                   ***
***         |_|  |_|_| \_\\____|_| |_|\___|_| |_| |_|                   ***
***                                                                     ***
***         VERSION            1.1.0-alpha                              ***
***                                                                     ***
***         Git branch         solvent-printouts                        ***
***         Git commit hash    fecdbe0524a548a8600b-dirty               ***
***         Git commit author  Anders Brakestad                         ***
***         Git commit date    Tue May 10 10:24:30 2022 +0200           ***
***                                                                     ***
***         Contact: [email protected]                               ***
***                                                                     ***
***         Radovan Bast            Magnar Bjorgve                      ***
***         Roberto Di Remigio      Antoine Durdek                      ***
***         Luca Frediani           Gabriel Gerez                       ***
***         Stig Rune Jensen        Jonas Juselius                      ***
***         Rune Monstad            Peter Wind                          ***
***                                                                     ***
***************************************************************************

---------------------------------------------------------------------------

 MPI processes           :       (no bank)                               1
 OpenMP threads          :                                               1
 Total cores             :                                               1
                                                                           
---------------------------------------------------------------------------

XCFun DFT library Copyright 2009-2020 Ulf Ekstrom and contributors.
See http://dftlibs.org/xcfun/ for more information.

This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details see the documentation.
Scientific users of this library should cite
U. Ekstrom, L. Visscher, R. Bast, A. J. Thorvaldsen and K. Ruud;
J.Chem.Theor.Comp. 2010, DOI: 10.1021/ct100117s

---------------------------------------------------------------------------

 MRCPP version         : 1.4.0-alpha
 Git branch            : HEAD
 Git commit hash       : 2797a7a18efb69942a6e
 Git commit author     : Stig Rune Jensen
 Git commit date       : Fri Mar 12 12:48:07 2021 +0100

 Linear algebra        : EIGEN v3.3.7
 Parallelization       : NONE

---------------------------------------------------------------------------


                                                                           
===========================================================================
                         MultiResolution Analysis
---------------------------------------------------------------------------
 polynomial order      : 5
 polynomial type       : Interpolating
---------------------------------------------------------------------------
 total boxes           : 8
 boxes                 : [          2           2           2 ]
 unit lengths          : [   16.00000    16.00000    16.00000 ]
 scaling factor        : [    1.00000     1.00000     1.00000 ]
 lower bounds          : [  -16.00000   -16.00000   -16.00000 ]
 upper bounds          : [   16.00000    16.00000    16.00000 ]
 total length          : [   32.00000    32.00000    32.00000 ]
===========================================================================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            Physical Constants
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 angstrom2bohrs            :                            1.8897261246257702 
 dipmom_au2debye           :                            2.5417464739297717 
 electron_g_factor         :                             -2.00231930436256 
 fine_structure_constant   :                               0.0072973525693 
 hartree2ev                :                               27.211386245988 
 hartree2kcalmol           :                             627.5094740630558 
 hartree2kjmol             :                            2625.4996394798254 
 hartree2simagnetizability :                                    78.9451185 
 hartree2wavenumbers       :                                219474.6313632 
 light_speed               :                                 137.035999084 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


                                                                           
***************************************************************************
***                                                                     ***
***                        Initializing Molecule                        ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
===========================================================================
                                 Molecule
---------------------------------------------------------------------------
 Charge                  :                                               1
 Multiplicity            :                                               1
---------------------------------------------------------------------------
    N    Atom            :               x               y               z
---------------------------------------------------------------------------
    0      Li            :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Center of mass          :        0.000000        0.000000        0.000000
===========================================================================


                                                                           
***************************************************************************
***                                                                     ***
***                Computing Initial Guess Wavefunction                 ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Compute initial orbitals
 Method                  : Diagonalize SAD Hamiltonian
 Precision               : 1.00000e-03
 Screening               : 1.20000e+01 StdDev
 Restricted              : True
 Functional              : LDA (SVWN5)
 AO basis                : Hydrogenic orbitals
 Zeta quality            : 2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


===========================================================================
                            Molecular Orbitals
---------------------------------------------------------------------------
 Alpha electrons         :                                               1
 Beta electrons          :                                               1
 Total electrons         :                                               2
---------------------------------------------------------------------------
    n  Occ Spin          :                                            Norm
---------------------------------------------------------------------------
    0    2    p          :                              1.000000000000e+00
===========================================================================


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Compute initial energy
 Method                  : DFT (PBE0)
 Relativity              : None
 Precision               : 1.00000e-03
 Localization            : Off
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


===========================================================================
                        Molecular Energy (initial)
---------------------------------------------------------------------------
 Kinetic energy          :            (au)                  7.675564301900
 E-N energy              :            (au)                -16.530755287695
 Coulomb energy          :            (au)                  3.332799383894
 Exchange energy         :            (au)                 -0.416484495318
 X-C energy              :            (au)                 -1.283772997761
 Ext. field (el)         :            (au)                  0.000000000000
---------------------------------------------------------------------------
 N-N energy              :            (au)                  0.000000000000
 Ext. field (nuc)        :            (au)                  0.000000000000
 Tot. Reac. Energy       :            (au)                  0.000000000000
 El. Reac. Energy        :            (au)                  0.000000000000
 Nuc. Reac. Energy       :            (au)                  0.000000000000
---------------------------------------------------------------------------
 Electronic energy       :            (au)                 -7.222649094979
 Nuclear energy          :            (au)                  0.000000000000
---------------------------------------------------------------------------
 Total energy            :            (au)             -7.222649094979e+00
                         :      (kcal/mol)             -4.532280734932e+03
                         :        (kJ/mol)             -1.896306259496e+04
                         :            (eV)             -1.965382942427e+02
===========================================================================


===========================================================================
                        Orbital Energies (initial)
---------------------------------------------------------------------------
    n  Occ Spin          :                                         Epsilon
---------------------------------------------------------------------------
    0    2    p          :            (au)                 -2.332093141176
---------------------------------------------------------------------------
 Sum occupied            :            (au)                 -4.664186282352
===========================================================================


                                                                           
***************************************************************************
***                                                                     ***
***                 Computing Ground State Wavefunction                 ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           Self-Consistent Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Calculation             : Optimize ground state orbitals
 Method                  : DFT (PBE0)
 Relativity              : None
 Environment             : PCM
 Checkpointing           : Off
 Max iterations          : 100
 KAIN solver             : 5
 Localization            : Off
 Diagonalization         : First two iterations
 Start precision         : 1.00000e-03
 Final precision         : 1.00000e-03
 Helmholtz precision     : Dynamic
 Energy threshold        : Off
 Orbital threshold       : 1.00000e-01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      Self-Consistent Reaction Field
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Accelerate with KAIN    : true 
 Algorithm               : scrf 
 Convergence criterion   : dynamic 
 Density type            : total 
 Dielec. const. (in)     : 1.0 
 Dielec. const. (out)    : 2.0 
 Max. iterations         : 100 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


===========================================================================
                             Solvation Cavity
---------------------------------------------------------------------------
 Cavity width            :                                        0.500000
 Dielec. Const. (in)     :                                        1.000000
 Dielec. Const. (out)    :                                        2.000000
 Formulation             :                                     exponential
---------------------------------------------------------------------------
    N      Radius        :               x               y               z
---------------------------------------------------------------------------
    0    4.000000        :        0.000000        0.000000        0.000000
===========================================================================


===========================================================================
 Iter           MO residual             Total energy                Update
---------------------------------------------------------------------------
    0          1.000000e+00          -7.222649094979         -7.222649e+00
    1          6.037085e-02          -7.320075664302         -9.742657e-02
---------------------------------------------------------------------------
                      SCF converged in 1 iterations!
===========================================================================


                                                                           
***************************************************************************
***                                                                     ***
***                    Printing Molecular Properties                    ***
***                                                                     ***
***************************************************************************
                                                                           
                                                                           
===========================================================================
                                 Molecule
---------------------------------------------------------------------------
 Charge                  :                                               1
 Multiplicity            :                                               1
---------------------------------------------------------------------------
    N    Atom            :               x               y               z
---------------------------------------------------------------------------
    0      Li            :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Center of mass          :        0.000000        0.000000        0.000000
===========================================================================


===========================================================================
                         Molecular Energy (final)
---------------------------------------------------------------------------
 Kinetic energy          :            (au)                  7.584212118792
 E-N energy              :            (au)                -16.491476051686
 Coulomb energy          :            (au)                  3.357678874268
 Exchange energy         :            (au)                 -0.419594145537
 X-C energy              :            (au)                 -1.286849061623
 Ext. field (el)         :            (au)                  0.000000000000
---------------------------------------------------------------------------
 N-N energy              :            (au)                  0.000000000000
 Ext. field (nuc)        :            (au)                  0.000000000000
 Tot. Reac. Energy       :            (au)                 -0.064047398516
 El. Reac. Energy        :            (au)                  0.128081335378
 Nuc. Reac. Energy       :            (au)                 -0.192128733894
---------------------------------------------------------------------------
 Electronic energy       :            (au)                 -7.127946930408
 Nuclear energy          :            (au)                 -0.192128733894
---------------------------------------------------------------------------
 Total energy            :            (au)             -7.320075664302e+00
                         :      (kcal/mol)             -4.593416830208e+03
                         :        (kJ/mol)             -1.921885601759e+04
                         :            (eV)             -1.991894062512e+02
===========================================================================


===========================================================================
                         Orbital Energies (final)
---------------------------------------------------------------------------
    n  Occ Spin          :                                         Epsilon
---------------------------------------------------------------------------
    0    2    p          :            (au)                 -2.210659505993
---------------------------------------------------------------------------
 Sum occupied            :            (au)                 -4.421319011986
===========================================================================


===========================================================================
                           Dipole Moment (dip-1)
---------------------------------------------------------------------------
 r_O                     :        0.000000        0.000000        0.000000
---------------------------------------------------------------------------
 Electronic vector       :       -0.000000        0.000000       -0.000000
 Magnitude               :            (au)                        0.000000
                         :         (Debye)                        0.000000
---------------------------------------------------------------------------
 Nuclear vector          :        0.000000        0.000000        0.000000
 Magnitude               :            (au)                        0.000000
                         :         (Debye)                        0.000000
---------------------------------------------------------------------------
 Total vector            :        0.000000        0.000000        0.000000
 Magnitude               :            (au)                        0.000000
                         :         (Debye)                        0.000000
===========================================================================


                                                                           
                                                                           
***************************************************************************
***                                                                     ***
***                            Exiting MRChem                           ***
***                                                                     ***
***                       Wall time :  0h  0m 46s                       ***
***                                                                     ***
***************************************************************************

This also plays well with higher print levels, since the parameters are printed right after the headline before any output from the calculation is printed.

@stigrj
Copy link
Contributor

stigrj commented Jul 6, 2022

Kind of forgot about this. What's the status here? I agree your latter example looks better

@stigrj
Copy link
Contributor

stigrj commented Jul 6, 2022

Actually, after looking more closely on this today, I think the correct thing is to print the Permittivity/Cavity information up front, and at the same time include solvent effect in the initial guess energy. This would be more in line with the rest of the terms.

For the initial guess, the orbitals are always "given" by the chosen method (previous mw calculation, sad guess, gto guess, etc), i.e. the solvent is not included (and should not be) when computing these initial orbitals. However, the initial energy should be computed with the "correct" electronic method using these given orbitals, i.e. solvent effects should be included here.

@Gabrielgerez why did we disable solvent effects on the first_iteration when setting up the ReactionPotential? I guess it had to do with some convergence issue with a poor guess density, but I don't see how it would make a difference to postpone the first SCRF from the initial guess and into the first SCF calculation. The first SCRF convergence should be much the same, no?

I will add some of these changes to this branch tomorrow.

Anders Brakestad and others added 26 commits July 8, 2022 15:21
…to align with other print sections if possible.
@stigrj stigrj merged commit 5f22464 into MRChemSoft:master Jul 8, 2022
@Brakjen Brakjen deleted the solvent-printouts branch July 20, 2022 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants