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

Clean jastrow output #1525

Merged
merged 4 commits into from
Apr 3, 2019
Merged

Conversation

markdewing
Copy link
Contributor

This organizes some of the output for the Jastrow builder, and for the bspline and the polynomial 3-body Jastrows (which seem to the be most commonly used ones).

The output of parameter values is relegated to the debug output.

The new output for high verbosity:

   Jastrow
   -------
    Type : Two-Body
    Name : J2

    Radial function
    ---------------
    Species : u - u
    Number of parameters : 10
    Cusp : -0.25
    Cutoff radius : 10

    Radial function
    ---------------
    Species : u - d
    Number of parameters : 10
    Cusp : -0.5
    Cutoff radius : 10


   Jastrow
   -------
    Type : One-Body
    Name : J1

    Radial function
    ---------------
    Element: C
    Number of parameters : 10
    Cusp : 0
    Cutoff radius : 10

    Radial function
    ---------------
    Element: N
    Number of parameters : 10
    Cusp : 0
    Cutoff radius : 10

    Radial function
    ---------------
    Element: H
    Number of parameters : 10
    Cusp : 0
    Cutoff radius : 10


   Jastrow
   -------
    Type : eeI
    Name : J3

     Ion : C   e-e : u - u
      Number of e-e parameters : 3
      Number of e-I parameters : 3
      Cutoff radius : 5

     Ion : C   e-e : u - d
      Number of e-e parameters : 3
      Number of e-I parameters : 3
      Cutoff radius : 5

     Ion : N   e-e : u - u
      Number of e-e parameters : 3
      Number of e-I parameters : 3
      Cutoff radius : 5

     Ion : N   e-e : u - d
      Number of e-e parameters : 3
      Number of e-I parameters : 3
      Cutoff radius : 5

     Ion : H   e-e : u - u
      Number of e-e parameters : 3
      Number of e-I parameters : 3
      Cutoff radius : 5

The output for low verbosity:


   Jastrow
   -------
    Type : Two-Body
    Name : J2

    Radial function
    ---------------
    Species : u - u
    Number of parameters : 10

    Radial function
    ---------------
    Species : u - d
    Number of parameters : 10

   Jastrow
   -------
    Type : One-Body
    Name : J1

    Radial function
    ---------------
    Element: C
    Number of parameters : 10

    Radial function
    ---------------
    Element: N
    Number of parameters : 10

    Radial function
    ---------------
    Element: H
    Number of parameters : 10


   Jastrow
   -------
    Type : eeI
    Name : J3

The builder, and the bspline and polynomial 3-body factors.
Put the parameters in the debug output.
Summary of number of parameters for each type of correlation.
@ghost ghost assigned markdewing Apr 1, 2019
@ghost ghost added the in progress label Apr 1, 2019
@jtkrogel
Copy link
Contributor

jtkrogel commented Apr 1, 2019

It would be good to also print out the value of the "function" XML attribute, i.e. "bspline" in the case of J1/J2 and "polynomial" for J3.

@prckent
Copy link
Contributor

prckent commented Apr 1, 2019

I think it would be consistent with our atomic position output to also print the Jastrow parameters with verbosity=high. I am happy with not printing them by default.

@prckent
Copy link
Contributor

prckent commented Apr 1, 2019

Q. What is printed now in an optimization run? Does the optimizer trigger printing of the parameters?

@ye-luo
Copy link
Contributor

ye-luo commented Apr 1, 2019

@markdewing can we have more compact print out?

    Type : eeI     Name : J3
     Ion : C   e-e : u - u
      Number of e-e, e-I parameters : 3, 3

@prckent our verbosity = high printing atomic positions doesn't work. The size 10 is hard-coded and need a fix. The optimizer triggers printing, but long term this will be removed since the info has already been printed in opt.xml. If the number of parameter grows to 10k, it will never work anyway.

@ye-luo
Copy link
Contributor

ye-luo commented Apr 1, 2019

I also don't see a reason not printing cusp and cutoff by default. My feeling is any effective control parameters given by user from xml must be always reflected in the output. Users should not need debug if they need to verify their input.

@prckent
Copy link
Contributor

prckent commented Apr 1, 2019

@ye-luo Make an issue or PR to adjust verbosity=high.

Certainly there are is a long term issue about what to do with large numbers of parameters, but that is not something to be solved in this PR.

@prckent
Copy link
Contributor

prckent commented Apr 1, 2019

General comment on these output improvements: the main goal is to get to sensible, logically formatted output that is interpretable to a general user. I don't have strong opinions on what is printed by default vs high. For sure we each have some biases that reflect the calculations we do. We can adjust what is/is not printed at each output level over time. At the moment there is XML, redundancy, variables of unclear meaning, printing of internal code status etc., so cleanup is badly needed. Debug can be ugly but the default output should be readily understandable.

@ye-luo
Copy link
Contributor

ye-luo commented Apr 1, 2019

@prckent issue created.
@markdewing you can use a ostringsteam to buffer all the radial functions and print out once. So we won't have so many "radial function" prints.

@ye-luo
Copy link
Contributor

ye-luo commented Apr 1, 2019

A bit more complicated than I thought. May be it is time to rename put() to parseXML() and also add an output stream as an argument to have a better print control of all the functors.

Add the function attribute to the output.
Add parameter output at high verbosity.
Cusp and cutoff are printed at low verbosity.

No space before colons, to be consistent with previous output cleanup.
@markdewing
Copy link
Contributor Author

Output for low verbosity:

   Jastrow
   -------
    Name: J2   Type: Two-Body   Function: Bspline

    Radial function for species: u - u
     Number of parameters: 10
     Cusp: -0.25
     Cutoff radius: 10

    Radial function for species: u - d
     Number of parameters: 10
     Cusp: -0.5
     Cutoff radius: 10


   Jastrow
   -------
    Name: J1   Type: One-Body   Function: Bspline

    Radial function for element: C
     Number of parameters: 10
     Cusp: 0
     Cutoff radius: 10

    Radial function for element: N
     Number of parameters: 10
     Cusp: 0
     Cutoff radius: 10

    Radial function for element: H
     Number of parameters: 10
     Cusp: 0
     Cutoff radius: 10


   Jastrow
   -------
    Name: J3   Type: eeI   Function: polynomial

     Ion: C   electron-electron: u - u
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

     Ion: C   electron-electron: u - d
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

     Ion: N   electron-electron: u - u
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

     Ion: N   electron-electron: u - d
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

     Ion: H   electron-electron: u - u
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

     Ion: H   electron-electron: u - d
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

Output for high verbosity:

   Jastrow
   -------
    Name: J2   Type: Two-Body   Function: Bspline

    Radial function for species: u - u
     Number of parameters: 10
     Cusp: -0.25
     Cutoff radius: 10

     Name         Value Type Recompute Use Index
     ---- ------------- ---- --------- --- -----
     uu_0  2.941223e-01    1         1  ON     0
     uu_1  1.171471e-01    1         1  ON     1
     uu_2  4.252782e-02    1         1  ON     2
     uu_3 -1.037750e-02    1         1  ON     3
     uu_4 -5.354954e-02    1         1  ON     4
     uu_5 -9.492541e-02    1         1  ON     5
     uu_6 -1.081153e-01    1         1  ON     6
     uu_7 -1.344200e-01    1         1  ON     7
     uu_8 -1.211054e-01    1         1  ON     8
     uu_9 -5.810754e-02    1         1  ON     9

    Radial function for species: u - d
     Number of parameters: 10
     Cusp: -0.5
     Cutoff radius: 10

     Name         Value Type Recompute Use Index
     ---- ------------- ---- --------- --- -----
     ud_0  5.115215e-01    1         1  ON     0
     ud_1  1.597261e-01    1         1  ON     1
     ud_2  1.283025e-02    1         1  ON     2
     ud_3 -3.866792e-02    1         1  ON     3
     ud_4 -8.559327e-02    1         1  ON     4
     ud_5 -1.208361e-01    1         1  ON     5
     ud_6 -1.281533e-01    1         1  ON     6
     ud_7 -1.177751e-01    1         1  ON     7
     ud_8 -9.937974e-02    1         1  ON     8
     ud_9 -5.615504e-02    1         1  ON     9


   Jastrow
   -------
    Name: J1   Type: One-Body   Function: Bspline

    Radial function for element: C
     Number of parameters: 10
     Cusp: 0
     Cutoff radius: 10

     Name         Value Type Recompute Use Index
     ---- ------------- ---- --------- --- -----
     eC_0 -1.293102e+00    1         1  ON     0
     eC_1 -8.520955e-01    1         1  ON     1
     eC_2 -9.476426e-02    1         1  ON     2
     eC_3  1.699541e-01    1         1  ON     3
     eC_4  4.022574e-01    1         1  ON     4
     eC_5  5.883480e-01    1         1  ON     5
     eC_6  7.780714e-01    1         1  ON     6
     eC_7  4.371262e-01    1         1  ON     7
     eC_8 -5.979413e-03    1         1  ON     8
     eC_9 -1.107442e-01    1         1  ON     9

    Radial function for element: N
     Number of parameters: 10
     Cusp: 0
     Cutoff radius: 10

     Name         Value Type Recompute Use Index
     ---- ------------- ---- --------- --- -----
     eN_0 -1.806133e+00    1         1  ON     0
     eN_1 -1.298570e+00    1         1  ON     1
     eN_2 -1.892135e-01    1         1  ON     2
     eN_3  8.701982e-02    1         1  ON     3
     eN_4  4.079618e-01    1         1  ON     4
     eN_5  6.446444e-01    1         1  ON     5
     eN_6  7.764033e-01    1         1  ON     6
     eN_7  6.815314e-01    1         1  ON     7
     eN_8  3.790928e-01    1         1  ON     8
     eN_9  2.059269e-01    1         1  ON     9

    Radial function for element: H
     Number of parameters: 10
     Cusp: 0
     Cutoff radius: 10

     Name         Value Type Recompute Use Index
     ---- ------------- ---- --------- --- -----
     eH_0 -5.429187e-02    1         1  ON     0
     eH_1 -3.483150e-02    1         1  ON     1
     eH_2  2.496126e-02    1         1  ON     2
     eH_3  1.911501e-02    1         1  ON     3
     eH_4  4.376087e-02    1         1  ON     4
     eH_5  6.459886e-02    1         1  ON     5
     eH_6  8.036050e-02    1         1  ON     6
     eH_7  2.687305e-02    1         1  ON     7
     eH_8 -9.020036e-02    1         1  ON     8
     eH_9  2.761608e-02    1         1  ON     9


   Jastrow
   -------
    Name: J3   Type: eeI   Function: polynomial

     Ion: C   electron-electron: u - u
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

        Name         Value Type Recompute Use Index
      ------ ------------- ---- --------- --- -----
       uuC_0  6.775875e-04    1         1  ON     0
       uuC_1  1.532355e-03    1         1  ON     1
       uuC_2 -9.788864e-04    1         1  ON     2
       uuC_3 -2.981900e-03    1         1  ON     3
       uuC_4 -5.452887e-04    1         1  ON     4
       uuC_5  1.407351e-04    1         1  ON     5
       uuC_6 -1.424827e-03    1         1  ON     6
       uuC_7 -9.097819e-03    1         1  ON     7
       uuC_8 -7.636169e-03    1         1  ON     8
       uuC_9  4.543989e-03    1         1  ON     9
      uuC_10 -1.738748e-03    1         1  ON    10
      uuC_11  1.863271e-02    1         1  ON    11
      uuC_12 -1.169240e-03    1         1  ON    12
      uuC_13 -2.805287e-04    1         1  ON    13
      uuC_14 -2.737758e-03    1         1  ON    14
      uuC_15  8.723745e-04    1         1  ON    15
      uuC_16 -1.537465e-02    1         1  ON    16
      uuC_17  8.469487e-03    1         1  ON    17
      uuC_18 -2.921294e-02    1         1  ON    18
      uuC_19  9.578139e-03    1         1  ON    19
      uuC_20  6.681031e-03    1         1  ON    20
      uuC_21  5.783753e-03    1         1  ON    21
      uuC_22 -2.921083e-03    1         1  ON    22
      uuC_23 -1.255861e-03    1         1  ON    23
      uuC_24 -1.874251e-03    1         1  ON    24
      uuC_25  9.308301e-04    1         1  ON    25

     Ion: C   electron-electron: u - d
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

        Name         Value Type Recompute Use Index
      ------ ------------- ---- --------- --- -----
       udC_0 -2.134855e-03    1         1  ON     0
       udC_1 -3.249726e-03    1         1  ON     1
       udC_2  5.795895e-03    1         1  ON     2
       udC_3 -5.920105e-04    1         1  ON     3
       udC_4 -2.318643e-03    1         1  ON     4
       udC_5 -1.327647e-04    1         1  ON     5
       udC_6 -7.499612e-03    1         1  ON     6
       udC_7  6.369065e-03    1         1  ON     7
       udC_8  2.650727e-04    1         1  ON     8
       udC_9  1.035812e-02    1         1  ON     9
      udC_10  1.550097e-03    1         1  ON    10
      udC_11 -3.333022e-03    1         1  ON    11
      udC_12 -1.328090e-03    1         1  ON    12
      udC_13 -1.204843e-02    1         1  ON    13
      udC_14 -3.165864e-03    1         1  ON    14
      udC_15  1.000226e-03    1         1  ON    15
      udC_16 -1.245589e-02    1         1  ON    16
      udC_17 -1.921354e-02    1         1  ON    17
      udC_18  4.697181e-03    1         1  ON    18
      udC_19  3.054452e-03    1         1  ON    19
      udC_20  1.508357e-02    1         1  ON    20
      udC_21  4.970538e-04    1         1  ON    21
      udC_22 -1.516506e-03    1         1  ON    22
      udC_23 -8.089833e-03    1         1  ON    23
      udC_24  6.945501e-04    1         1  ON    24
      udC_25  3.801440e-04    1         1  ON    25

     Ion: N   electron-electron: u - u
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

        Name         Value Type Recompute Use Index
      ------ ------------- ---- --------- --- -----
       uuN_0 -3.938847e-04    1         1  ON     0
       uuN_1  6.958331e-04    1         1  ON     1
       uuN_2 -3.150278e-04    1         1  ON     2
       uuN_3 -1.419626e-03    1         1  ON     3
       uuN_4  1.301770e-03    1         1  ON     4
       uuN_5  2.904469e-04    1         1  ON     5
       uuN_6 -3.776806e-03    1         1  ON     6
       uuN_7 -3.087515e-04    1         1  ON     7
       uuN_8 -1.124305e-02    1         1  ON     8
       uuN_9  6.774770e-03    1         1  ON     9
      uuN_10  1.545580e-03    1         1  ON    10
      uuN_11  7.012986e-03    1         1  ON    11
      uuN_12  5.743683e-03    1         1  ON    12
      uuN_13 -7.219609e-03    1         1  ON    13
      uuN_14 -6.593556e-03    1         1  ON    14
      uuN_15  1.415286e-04    1         1  ON    15
      uuN_16 -1.719529e-02    1         1  ON    16
      uuN_17 -1.206207e-02    1         1  ON    17
      uuN_18 -2.159780e-04    1         1  ON    18
      uuN_19 -3.336919e-03    1         1  ON    19
      uuN_20  1.386776e-02    1         1  ON    20
      uuN_21 -1.327634e-03    1         1  ON    21
      uuN_22  9.555216e-04    1         1  ON    22
      uuN_23 -6.351309e-03    1         1  ON    23
      uuN_24  2.313946e-03    1         1  ON    24
      uuN_25 -8.886238e-04    1         1  ON    25

     Ion: N   electron-electron: u - d
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

        Name         Value Type Recompute Use Index
      ------ ------------- ---- --------- --- -----
       udN_0 -9.465111e-04    1         1  ON     0
       udN_1 -4.544758e-03    1         1  ON     1
       udN_2  5.145984e-03    1         1  ON     2
       udN_3  2.748800e-03    1         1  ON     3
       udN_4  2.295504e-03    1         1  ON     4
       udN_5  1.790773e-04    1         1  ON     5
       udN_6 -1.197423e-02    1         1  ON     6
       udN_7  7.345617e-03    1         1  ON     7
       udN_8 -6.385755e-04    1         1  ON     8
       udN_9  1.241286e-02    1         1  ON     9
      udN_10  8.961984e-03    1         1  ON    10
      udN_11 -2.161516e-02    1         1  ON    11
      udN_12  3.722525e-03    1         1  ON    12
      udN_13 -1.763727e-02    1         1  ON    13
      udN_14 -5.959035e-03    1         1  ON    14
      udN_15  7.873824e-04    1         1  ON    15
      udN_16 -7.335951e-03    1         1  ON    16
      udN_17 -4.551514e-02    1         1  ON    17
      udN_18  5.200661e-02    1         1  ON    18
      udN_19 -9.215738e-03    1         1  ON    19
      udN_20  1.478366e-02    1         1  ON    20
      udN_21 -1.007625e-02    1         1  ON    21
      udN_22  2.018881e-03    1         1  ON    22
      udN_23 -8.001382e-03    1         1  ON    23
      udN_24  4.425163e-03    1         1  ON    24
      udN_25 -9.965114e-04    1         1  ON    25

     Ion: H   electron-electron: u - u
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

        Name         Value Type Recompute Use Index
      ------ ------------- ---- --------- --- -----
       uuH_0 -5.756604e-05    1         1  ON     0
       uuH_1 -3.492495e-03    1         1  ON     1
       uuH_2 -5.073822e-03    1         1  ON     2
       uuH_3 -1.134014e-04    1         1  ON     3
       uuH_4 -9.893206e-05    1         1  ON     4
       uuH_5 -7.440898e-04    1         1  ON     5
       uuH_6 -3.820627e-03    1         1  ON     6
       uuH_7 -4.932858e-02    1         1  ON     7
       uuH_8 -1.786643e-03    1         1  ON     8
       uuH_9  1.781336e-02    1         1  ON     9
      uuH_10 -7.722081e-04    1         1  ON    10
      uuH_11  2.074631e-02    1         1  ON    11
      uuH_12 -9.135691e-03    1         1  ON    12
      uuH_13 -1.039087e-02    1         1  ON    13
      uuH_14 -6.003395e-03    1         1  ON    14
      uuH_15  2.653757e-03    1         1  ON    15
      uuH_16 -6.635544e-03    1         1  ON    16
      uuH_17 -2.419361e-02    1         1  ON    17
      uuH_18  3.204106e-02    1         1  ON    18
      uuH_19 -9.935348e-04    1         1  ON    19
      uuH_20 -2.656486e-03    1         1  ON    20
      uuH_21 -9.534393e-03    1         1  ON    21
      uuH_22  2.183416e-03    1         1  ON    22
      uuH_23  7.030765e-03    1         1  ON    23
      uuH_24  1.759589e-03    1         1  ON    24
      uuH_25 -9.522650e-04    1         1  ON    25

     Ion: H   electron-electron: u - d
      Number of parameters for e-e: 3, for e-I: 3
      Cutoff radius: 5

        Name         Value Type Recompute Use Index
      ------ ------------- ---- --------- --- -----
       udH_0 -1.133492e-02    1         1  ON     0
       udH_1  1.142136e-03    1         1  ON     1
       udH_2  9.127102e-03    1         1  ON     2
       udH_3 -3.676957e-03    1         1  ON     3
       udH_4 -6.710233e-03    1         1  ON     4
       udH_5  2.025931e-04    1         1  ON     5
       udH_6  1.083529e-03    1         1  ON     6
       udH_7  1.136167e-02    1         1  ON     7
       udH_8 -9.506694e-03    1         1  ON     8
       udH_9  1.791342e-02    1         1  ON     9
      udH_10 -6.061381e-03    1         1  ON    10
      udH_11  1.260711e-02    1         1  ON    11
      udH_12 -2.067118e-03    1         1  ON    12
      udH_13 -2.922160e-02    1         1  ON    13
      udH_14 -1.049076e-02    1         1  ON    14
      udH_15  2.534023e-03    1         1  ON    15
      udH_16 -4.570850e-02    1         1  ON    16
      udH_17 -3.956849e-02    1         1  ON    17
      udH_18  7.975822e-03    1         1  ON    18
      udH_19  8.236244e-03    1         1  ON    19
      udH_20  5.325754e-02    1         1  ON    20
      udH_21 -1.073850e-02    1         1  ON    21
      udH_22 -1.151074e-03    1         1  ON    22
      udH_23 -3.404105e-02    1         1  ON    23
      udH_24  1.321097e-02    1         1  ON    24
      udH_25 -2.027907e-03    1         1  ON    25

@prckent prckent self-requested a review April 3, 2019 16:49
@prckent prckent merged commit ca46b20 into QMCPACK:develop Apr 3, 2019
@ghost ghost removed the in progress label Apr 3, 2019
@markdewing markdewing deleted the clean_jastrow_output branch April 3, 2019 17:47
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.

4 participants