sissaschool / turborvb

Quantum Monte Carlo package, TurboRVB
https://turborvb.sissa.it
GNU General Public License v3.0
29 stars 6 forks source link

Draft: QMCkl #85

Open addman2 opened 9 months ago

addman2 commented 9 months ago

I am not a fan of a big changes but this is a big one. Many things are intertwined and was hard to deliver them separately.

  1. Makefun.f90 was (partly) refactored. Now separate orbital are stored indevel_tools/makefun_factory. executing construct.py one can build makefun.
  2. Each refactored orbital has now a header that looks like this:
    1   ! s orbital
    2   !
    3   ! - angmom = 0
    4   ! - type = Gaussian
    5   ! - normalized = yes
    6   ! - angtype = spherical
    7   ! - npar = 1
    8   ! - multiplicity = 1
    9   !
    10   ! = N * R
    11   !
    12   ! where N is the normalization constant
    13   ! N = (2*alpha/pi)**(3/4)
    14   !
    15   ! and R is the radial part
    16   ! R = exp(-alpha*r**2)
    17   !

    Consisting of title line 1. Parameters out of which only angmom, npar and multiciplity are necessary (lines 3 -8). Continued by any doc string (lines 10 onwards). These headers than can be used for generating documentation.

  3. New test added for makefun testing:

Here is a sample output:

4: ######################################
4: Checking orbital index  97
4:
4: Test: index movement
4: indorb   =  36 OK
4: indshell =  36 OK
4: indpar   =   1 OK
4:
4: Test: single value
4: tests/failed =   3/  0
4:
4: Test: single value gradient and laplacian
4: tests/failed =   4/  0
4:
4: Test: calculate values for pseudo average
4: tests/failed =   1/  0
4:
4:
4: Result = T
4:
4: ######################################
4: Checking orbital index  98
4:
4: Test: index movement
4: indorb   =  45 OK
4: indshell =  45 OK
4: indpar   =   1 OK
4:
4: Test: single value
4: tests/failed =   3/  0
4:
4: Test: single value gradient and laplacian
4: tests/failed =   4/  0
4:
4: Test: calculate values for pseudo average
4: tests/failed =   1/  0
4:
4:
4: Result = T
4:
4: ######################################
  1. Added implementation of Cartesian orbitals with indexes 90 - 99, representing s, p, d, ..., m. This is important for QMCkl, because this library cannot do AD so there is no backwards algorithm. So I added cartesians to makefun and generated new makefun_b (with tapenade 3.3). The idea is to then QMCKkl in every place where is placable speeding up the calculation. Turbo is compilable with both QMCkl and QMCkl_gpu, but I am changing the implementation so QMCkl it self will not work now. Hopefully today it will be.
kousuke-nakano commented 4 months ago

Dear @addman2, hi! I wonder if I could merge this pull-request. Is it still in progress?