graphcore-research / pyscf-ipu

PySCF on IPU
https://github.com/graphcore-research/pyscf-ipu#readme
Apache License 2.0
41 stars 3 forks source link

Libcint #113

Closed AlexanderMath closed 9 months ago

AlexanderMath commented 9 months ago

Got all integrals (except grad of kinetic) passing test case. I'd like to get this on main branch so we can start

  1. discuss how to interface nanoDFT with different integral implementations (THO, libcint, popcint, ...)
  2. discuss how to refactor nanoDFT for molecular dynamics (some subtleties wrt state and different combinations of arguments which may make sense)
Done compiling. Calling C code from python. 
[N=2]

[Nuclear Integral]
CPU:     2.763163926555734e-07
Compiling module jit_ipu_intor1e.0:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:14.1]
IPU:     2.763163926555734e-07

[Kinetic Integral]
CPU:     -1.8022852765753328e-08
Compiling module jit_ipu_intor1e.1:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:13.0]
IPU:     -1.05722721688295e-08

[Overlap Integral]
CPU:     -1.2445099606406274e-07
Compiling module jit_ipu_intor1e.2:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:13.0]
IPU:     -6.484635128867211e-08

[Grad Nuclear]
CPU:     7.246001532124069e-08
Compiling module jit_ipu_intor1e.3:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:13.1]
IPU:     7.246001532124069e-08

[Grad Kinetic]
CPU:     2.983345692708639e-08
Compiling module jit_ipu_intor1e.4:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:13.3]
IPU:     2.983345692708639e-08

[Grad Overlap]
CPU:     6.077975783780332e-08
Compiling module jit_ipu_intor1e.5:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:12.9]
IPU:     6.077975783780332e-08

[Electron Repulsion Integral]
CPU:     -4.443460513425812e-08
Compiling module jit_ipu_getints4c.6:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:12.9]
IPU:     -2.953344391265489e-08

[Grad of Electron Repulsion Integral]
CPU:     1.341920186359591e-07
Compiling module jit_ipu_getints4c.7:
[##################################################] 100% Compilation Finished [Elapsed: 00:00:12.8]
IPU:     1.1929085744211143e-07