gpu4pyscf 1.3.0__tar.gz → 1.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/CHANGELOG +19 -0
- {gpu4pyscf-1.3.0/gpu4pyscf.egg-info → gpu4pyscf-1.3.2}/PKG-INFO +1 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/__config__.py +11 -6
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/__init__.py +1 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/df.py +62 -9
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/df_jk.py +7 -7
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/grad/jk.py +6 -6
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/hessian/jk.py +7 -7
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/hessian/rhf.py +11 -10
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/hessian/rks.py +2 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/hessian/uks.py +2 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/int3c2e.py +16 -16
- gpu4pyscf-1.3.2/gpu4pyscf/df/int3c2e_bdiv.py +485 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/gen_grid.py +18 -14
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/libxc.py +3 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/numint.py +54 -43
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/rks.py +24 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/uks.py +1 -1
- gpu4pyscf-1.3.2/gpu4pyscf/drivers/basis_vDZP_NWCHEM.dat +2310 -0
- gpu4pyscf-1.3.2/gpu4pyscf/drivers/dft_3c_driver.py +414 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/drivers/dft_driver.py +114 -119
- gpu4pyscf-1.3.2/gpu4pyscf/drivers/ecp_vDZP_NWCHEM.dat +1214 -0
- gpu4pyscf-1.3.0/gpu4pyscf/drivers/opt_driver.py → gpu4pyscf-1.3.2/gpu4pyscf/drivers/opt_3c_driver.py +29 -21
- gpu4pyscf-1.3.2/gpu4pyscf/drivers/opt_driver.py +189 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/grad/rhf.py +24 -10
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/grad/rks.py +8 -7
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/grad/uks.py +7 -6
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/gto/int3c1e.py +2 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/gto/int3c1e_ip.py +182 -9
- gpu4pyscf-1.3.2/gpu4pyscf/gto/int3c1e_ipip.py +410 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/gto/mole.py +60 -18
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/jk.py +6 -6
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/rhf.py +38 -16
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/rks.py +15 -19
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/uks.py +4 -4
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/cupy_helper.py +17 -32
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/cusolver.py +3 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/cutensor.py +23 -14
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/logger.py +35 -38
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/memcpy.py +21 -0
- gpu4pyscf-1.3.2/gpu4pyscf/lib/multi_gpu.py +153 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/utils.py +3 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/mp/dfmp2.py +5 -5
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/mp/mp2.py +2 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/aft.py +17 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/aft_jk.py +1 -1
- gpu4pyscf-1.3.2/gpu4pyscf/pbc/df/df.py +180 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/df_jk.py +33 -60
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/fft.py +11 -10
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/fft_jk.py +1 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/ft_ao.py +46 -42
- gpu4pyscf-1.3.2/gpu4pyscf/pbc/df/int3c2e.py +483 -0
- gpu4pyscf-1.3.2/gpu4pyscf/pbc/df/rsdf_builder.py +427 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/gen_grid.py +32 -5
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/krks.py +56 -11
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/kuks.py +37 -13
- gpu4pyscf-1.3.2/gpu4pyscf/pbc/dft/multigrid.py +998 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/numint.py +7 -7
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/rks.py +82 -11
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/uks.py +34 -11
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/lib/kpts_helper.py +38 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/scf/hf.py +5 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/scf/khf.py +2 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/scf/kuhf.py +5 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/scf/uhf.py +2 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/tools/k2gamma.py +9 -16
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pop/esp.py +2 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/properties/polarizability.py +2 -2
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/qmmm/pbc/itrf.py +1 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/hf.py +7 -5
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/int4c2e.py +1 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/j_engine.py +5 -12
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/jk.py +206 -213
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/uhf.py +0 -4
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/grad/pcm.py +81 -30
- gpu4pyscf-1.3.2/gpu4pyscf/solvent/hessian/__init__.py +0 -0
- gpu4pyscf-1.3.2/gpu4pyscf/solvent/hessian/pcm.py +1063 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/hessian/smd.py +6 -46
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/_lr_eig.py +136 -95
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/rhf.py +24 -11
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/rks.py +3 -4
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/uhf.py +11 -11
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/uks.py +4 -4
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2/gpu4pyscf.egg-info}/PKG-INFO +1 -1
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf.egg-info/SOURCES.txt +11 -1
- gpu4pyscf-1.3.2/gpu4pyscf.egg-info/requires.txt +5 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/setup.py +3 -3
- gpu4pyscf-1.3.0/gpu4pyscf/gto/moleintor.py +0 -58
- gpu4pyscf-1.3.0/gpu4pyscf/pbc/df/df.py +0 -182
- gpu4pyscf-1.3.0/gpu4pyscf/solvent/hessian/pcm.py +0 -323
- gpu4pyscf-1.3.0/gpu4pyscf.egg-info/requires.txt +0 -5
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/LICENSE +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/MANIFEST.in +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/README.md +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/cc/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/cc/ccsd_incore.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/cderi.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/grad/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/grad/rhf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/grad/rks.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/grad/uhf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/grad/uks.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/hessian/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/df/hessian/uhf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/gks.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/libxc_structs.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/radi.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/roks.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/xc_alias.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/dft/xc_deriv.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/drivers/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/fci/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/fci/direct_spin1.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/grad/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/grad/dispersion.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/grad/uhf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/gto/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/dispersion.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/hessian/uhf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/cublas.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/lib/diis.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/mp/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/df/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/dft/__init__.py +0 -0
- {gpu4pyscf-1.3.0/gpu4pyscf/pbc/lib → gpu4pyscf-1.3.2/gpu4pyscf/pbc/gto}/__init__.py +0 -0
- {gpu4pyscf-1.3.0/gpu4pyscf/pop → gpu4pyscf-1.3.2/gpu4pyscf/pbc/lib}/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/scf/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/tools/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/pbc/tools/pbc.py +0 -0
- {gpu4pyscf-1.3.0/gpu4pyscf/solvent/hessian → gpu4pyscf-1.3.2/gpu4pyscf/pop}/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/properties/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/properties/ir.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/properties/shielding.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/qmmm/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/qmmm/chelpg.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/qmmm/pbc/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/qmmm/pbc/mm_mole.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/qmmm/pbc/tools.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/_response_functions.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/cphf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/diis.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/dispersion.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/ghf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/hf_symm.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/int2c2e.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/rohf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/soscf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/ucphf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/scf/uhf_symm.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/_attach_solvent.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/grad/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/grad/smd.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/grad/smd_experiment.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/hessian/smd_experiment.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/pcm.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/smd.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/solvent/smd_experiment.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/__init__.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf/tdscf/_uhf_resp_sf.py +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf.egg-info/dependency_links.txt +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/gpu4pyscf.egg-info/top_level.txt +0 -0
- {gpu4pyscf-1.3.0 → gpu4pyscf-1.3.2}/setup.cfg +0 -0
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
v1.3.2 (2025-03-10)
|
|
2
|
+
-------------------
|
|
3
|
+
* Improvements
|
|
4
|
+
- Dump xc info and grids into to log file
|
|
5
|
+
- Optimize 4-center integral evalulation CUDA kernels using warp divergent algorithm
|
|
6
|
+
- Support up to I orbitals in DFT
|
|
7
|
+
- Fix out-of-bound issue in DFT hessian for heavy atoms (>=19)
|
|
8
|
+
* Deprecation
|
|
9
|
+
- SM60 is not supported in PyPi package
|
|
10
|
+
|
|
11
|
+
v1.3.1 (2025-02-04)
|
|
12
|
+
-------------------
|
|
13
|
+
* New Features
|
|
14
|
+
- Analytical Hessian for PCM solvent model
|
|
15
|
+
- Driver for 3c methods (wB97x-3c, R2Scan-3c, B97-3c, etc.)
|
|
16
|
+
* Improvements
|
|
17
|
+
- Preconditioner and computation efficiency of Davidson iterations for TDDFT
|
|
18
|
+
|
|
19
|
+
|
|
1
20
|
v1.3.0 (2025-01-07)
|
|
2
21
|
-------------------
|
|
3
22
|
* New Features
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
|
|
15
15
|
import cupy
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
num_devices = cupy.cuda.runtime.getDeviceCount()
|
|
18
18
|
|
|
19
19
|
# TODO: switch to non_blocking stream (currently blocked by libxc)
|
|
20
|
-
_streams = [None] *
|
|
21
|
-
for device_id in range(
|
|
20
|
+
_streams = [None] * num_devices
|
|
21
|
+
for device_id in range(num_devices):
|
|
22
22
|
with cupy.cuda.Device(device_id):
|
|
23
23
|
_streams[device_id] = cupy.cuda.stream.Stream(non_blocking=False)
|
|
24
24
|
|
|
@@ -38,11 +38,16 @@ if props['totalGlobalMem'] < 16 * GB:
|
|
|
38
38
|
mem_fraction = 0.9
|
|
39
39
|
cupy.get_default_memory_pool().set_limit(fraction=mem_fraction)
|
|
40
40
|
|
|
41
|
+
if props['sharedMemPerBlockOptin'] > 65536:
|
|
42
|
+
shm_size = props['sharedMemPerBlockOptin']
|
|
43
|
+
else:
|
|
44
|
+
shm_size = props['sharedMemPerBlock']
|
|
45
|
+
|
|
41
46
|
# Check P2P data transfer is available
|
|
42
47
|
_p2p_access = True
|
|
43
|
-
if
|
|
44
|
-
for src in range(
|
|
45
|
-
for dst in range(
|
|
48
|
+
if num_devices > 1:
|
|
49
|
+
for src in range(num_devices):
|
|
50
|
+
for dst in range(num_devices):
|
|
46
51
|
if src != dst:
|
|
47
52
|
can_access_peer = cupy.cuda.runtime.deviceCanAccessPeer(src, dst)
|
|
48
53
|
_p2p_access &= can_access_peer
|
|
@@ -23,13 +23,15 @@ from pyscf.df import df, addons, incore
|
|
|
23
23
|
from gpu4pyscf.lib.cupy_helper import (cholesky, tag_array, get_avail_mem,
|
|
24
24
|
cart2sph, p2p_transfer, copy_array)
|
|
25
25
|
from gpu4pyscf.df import int3c2e, df_jk
|
|
26
|
+
from gpu4pyscf.df import int3c2e_bdiv
|
|
26
27
|
from gpu4pyscf.lib import logger
|
|
27
28
|
from gpu4pyscf import __config__
|
|
28
|
-
from gpu4pyscf.__config__ import _streams,
|
|
29
|
+
from gpu4pyscf.__config__ import _streams, num_devices
|
|
29
30
|
|
|
30
31
|
MIN_BLK_SIZE = getattr(__config__, 'min_ao_blksize', 128)
|
|
31
32
|
ALIGNED = getattr(__config__, 'ao_aligned', 32)
|
|
32
33
|
GB = 1024*1024*1024
|
|
34
|
+
INT3C2E_V2 = False
|
|
33
35
|
|
|
34
36
|
LINEAR_DEP_THR = incore.LINEAR_DEP_THR
|
|
35
37
|
GROUP_SIZE = 256
|
|
@@ -82,6 +84,42 @@ class DF(lib.StreamObject):
|
|
|
82
84
|
if auxmol is None:
|
|
83
85
|
self.auxmol = auxmol = addons.make_auxmol(mol, self.auxbasis)
|
|
84
86
|
|
|
87
|
+
if INT3C2E_V2:
|
|
88
|
+
self.intopt = intopt = int3c2e_bdiv.Int3c2eOpt(mol, auxmol)
|
|
89
|
+
self._cderi = {}
|
|
90
|
+
self._cderi[0] = _cholesky_eri_bdiv(intopt, omega=omega)
|
|
91
|
+
ao_pair_mapping = intopt.create_ao_pair_mapping(cart=mol.cart)
|
|
92
|
+
rows, cols = divmod(cupy.asarray(ao_pair_mapping), mol.nao)
|
|
93
|
+
intopt.cderi_row = rows
|
|
94
|
+
intopt.cderi_col = cols
|
|
95
|
+
|
|
96
|
+
# intopt.cderi_diag stores the indices for cderi_row that
|
|
97
|
+
# corresponds to the diagonal blocks. Note this index array can
|
|
98
|
+
# contain some of the off-diagonal elements which happen to be the
|
|
99
|
+
# off-diagonal elements while within the diagonal blocks.
|
|
100
|
+
uniq_l = intopt.uniq_l_ctr[:,0]
|
|
101
|
+
if mol.cart:
|
|
102
|
+
nf = (uniq_l + 1) * (uniq_l + 2) // 2
|
|
103
|
+
else:
|
|
104
|
+
nf = uniq_l * 2 + 1
|
|
105
|
+
n_groups = len(uniq_l)
|
|
106
|
+
ij_tasks = ((i, j) for i in range(n_groups) for j in range(i+1))
|
|
107
|
+
nbas = intopt.sorted_mol.nbas
|
|
108
|
+
offset = 0
|
|
109
|
+
cderi_diag = []
|
|
110
|
+
for (i, j), bas_ij_idx in zip(ij_tasks, intopt.shl_pair_idx):
|
|
111
|
+
nfi = nf[i]
|
|
112
|
+
nfj = nf[j]
|
|
113
|
+
if i == j: # the diagonal blocks
|
|
114
|
+
ish, jsh = divmod(bas_ij_idx, nbas)
|
|
115
|
+
idx = np.where(ish == jsh)[0]
|
|
116
|
+
addr = offset + idx[:,None] * (nfi*nfi) + np.arange(nfi*nfi)
|
|
117
|
+
cderi_diag.append(addr.ravel())
|
|
118
|
+
offset += bas_ij_idx.size * nfi * nfj
|
|
119
|
+
intopt.cderi_diag = cupy.asarray(np.hstack(cderi_diag))
|
|
120
|
+
log.timer_debug1('cholesky_eri', *t0)
|
|
121
|
+
return self
|
|
122
|
+
|
|
85
123
|
if omega and omega > 1e-10:
|
|
86
124
|
with auxmol.with_range_coulomb(omega):
|
|
87
125
|
j2c_cpu = auxmol.intor('int2c2e', hermi=1)
|
|
@@ -218,7 +256,7 @@ def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
|
218
256
|
# CDERI will be equally distributed to the devices
|
|
219
257
|
# Other devices usually have more memory available than Device 0
|
|
220
258
|
# CDERI will use up to 40% of the available memory
|
|
221
|
-
use_gpu_memory = naux * npairs * 8 < 0.4 * avail_mem *
|
|
259
|
+
use_gpu_memory = naux * npairs * 8 < 0.4 * avail_mem * num_devices
|
|
222
260
|
|
|
223
261
|
if use_gpu_memory:
|
|
224
262
|
log.debug("Saving CDERI on GPU")
|
|
@@ -226,9 +264,9 @@ def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
|
226
264
|
log.debug("Saving CDERI on CPU")
|
|
227
265
|
|
|
228
266
|
_cderi = {}
|
|
229
|
-
aux_blksize = (naux +
|
|
267
|
+
aux_blksize = (naux + num_devices - 1) // num_devices
|
|
230
268
|
aux_blksize = (aux_blksize + ALIGNED - 1) // ALIGNED * ALIGNED
|
|
231
|
-
for device_id in range(
|
|
269
|
+
for device_id in range(num_devices):
|
|
232
270
|
p0 = min(aux_blksize*device_id, naux)
|
|
233
271
|
p1 = min(aux_blksize*(device_id+1), naux)
|
|
234
272
|
#for device_id, (p0,p1) in enumerate(lib.prange(0, naux, aux_blksize)):
|
|
@@ -246,16 +284,16 @@ def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
|
246
284
|
npairs_per_ctr = np.array(npairs_per_ctr)
|
|
247
285
|
total_task_list = np.argsort(npairs_per_ctr)
|
|
248
286
|
task_list_per_device = []
|
|
249
|
-
for device_id in range(
|
|
250
|
-
task_list_per_device.append(total_task_list[device_id::
|
|
287
|
+
for device_id in range(num_devices):
|
|
288
|
+
task_list_per_device.append(total_task_list[device_id::num_devices])
|
|
251
289
|
|
|
252
290
|
cd_low_f = cupy.array(cd_low, order='F', copy=False)
|
|
253
291
|
cd_low_f = tag_array(cd_low_f, tag=cd_low.tag)
|
|
254
292
|
|
|
255
293
|
cupy.cuda.get_current_stream().synchronize()
|
|
256
294
|
futures = []
|
|
257
|
-
with ThreadPoolExecutor(max_workers=
|
|
258
|
-
for device_id in range(
|
|
295
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
296
|
+
for device_id in range(num_devices):
|
|
259
297
|
task_list = task_list_per_device[device_id]
|
|
260
298
|
future = executor.submit(_cderi_task, intopt, cd_low_f, task_list, _cderi, aux_blksize,
|
|
261
299
|
omega=omega, sr_only=sr_only, device_id=device_id)
|
|
@@ -352,7 +390,7 @@ def _cderi_task(intopt, cd_low, task_list, _cderi, aux_blksize,
|
|
|
352
390
|
for slice_id, (p0,p1) in enumerate(lib.prange(0, naux, aux_blksize)):
|
|
353
391
|
tmp = cupy.array(cderi_block[p0:p1], order='C', copy=True)
|
|
354
392
|
copy_array(tmp, _cderi[slice_id][:p1-p0,ij0:ij1])
|
|
355
|
-
elif
|
|
393
|
+
elif num_devices > 1:
|
|
356
394
|
# Multi-GPU case, copy data to other Devices
|
|
357
395
|
for dev_id, (p0,p1) in enumerate(lib.prange(0, naux, aux_blksize)):
|
|
358
396
|
# Making a copy for contiguous data transfer
|
|
@@ -364,3 +402,18 @@ def _cderi_task(intopt, cd_low, task_list, _cderi, aux_blksize,
|
|
|
364
402
|
_cderi[0][:,ij0:ij1] = cderi_block
|
|
365
403
|
t1 = log.timer_debug1(f'transfer data for {cp_ij_id} / {nq} on Device {device_id}', *t1)
|
|
366
404
|
return
|
|
405
|
+
|
|
406
|
+
# Generate CDERI using the new int3c2e_bdiv algorithm
|
|
407
|
+
def _cholesky_eri_bdiv(intopt, omega=None):
|
|
408
|
+
assert isinstance(intopt, int3c2e_bdiv.Int3c2eOpt)
|
|
409
|
+
assert omega is None
|
|
410
|
+
eri3c = intopt.int3c2e_bdiv_kernel()
|
|
411
|
+
if intopt.mol.cart:
|
|
412
|
+
eri3c = intopt.orbital_pair_cart2sph(eri3c)
|
|
413
|
+
auxmol = intopt.auxmol
|
|
414
|
+
j2c = cupy.asarray(auxmol.intor('int2c2e', hermi=1), order='C')
|
|
415
|
+
cd_low = cholesky(j2c)
|
|
416
|
+
aux_coeff = cupy.array(intopt.aux_coeff, copy=True)
|
|
417
|
+
cd_low = solve_triangular(cd_low, aux_coeff.T, lower=True, overwrite_b=True)
|
|
418
|
+
cderi = cd_low.dot(eri3c.T)
|
|
419
|
+
return cderi
|
|
@@ -26,7 +26,7 @@ from gpu4pyscf.lib.cupy_helper import contract, transpose_sum, reduce_to_device
|
|
|
26
26
|
from gpu4pyscf.dft import rks, uks, numint
|
|
27
27
|
from gpu4pyscf.scf import hf, uhf
|
|
28
28
|
from gpu4pyscf.df import df, int3c2e
|
|
29
|
-
from gpu4pyscf.__config__ import _streams,
|
|
29
|
+
from gpu4pyscf.__config__ import _streams, num_devices
|
|
30
30
|
|
|
31
31
|
def _pin_memory(array):
|
|
32
32
|
mem = cupy.cuda.alloc_pinned_memory(array.nbytes)
|
|
@@ -453,8 +453,8 @@ def get_jk(dfobj, dms_tag, hermi=0, with_j=True, with_k=True, direct_scf_tol=1e-
|
|
|
453
453
|
mo_coeff = intopt.sort_orbitals(mo_coeff, axis=[1])
|
|
454
454
|
|
|
455
455
|
futures = []
|
|
456
|
-
with ThreadPoolExecutor(max_workers=
|
|
457
|
-
for device_id in range(
|
|
456
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
457
|
+
for device_id in range(num_devices):
|
|
458
458
|
future = executor.submit(
|
|
459
459
|
_jk_task_with_mo,
|
|
460
460
|
dfobj, dms, mo_coeff, mo_occ,
|
|
@@ -474,8 +474,8 @@ def get_jk(dfobj, dms_tag, hermi=0, with_j=True, with_k=True, direct_scf_tol=1e-
|
|
|
474
474
|
mo1s = [intopt.sort_orbitals(mo1, axis=[1]) for mo1 in mo1s]
|
|
475
475
|
|
|
476
476
|
futures = []
|
|
477
|
-
with ThreadPoolExecutor(max_workers=
|
|
478
|
-
for device_id in range(
|
|
477
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
478
|
+
for device_id in range(num_devices):
|
|
479
479
|
future = executor.submit(
|
|
480
480
|
_jk_task_with_mo1,
|
|
481
481
|
dfobj, dms, mo1s, occ_coeffs,
|
|
@@ -486,8 +486,8 @@ def get_jk(dfobj, dms_tag, hermi=0, with_j=True, with_k=True, direct_scf_tol=1e-
|
|
|
486
486
|
# general K matrix with density matrix
|
|
487
487
|
else:
|
|
488
488
|
futures = []
|
|
489
|
-
with ThreadPoolExecutor(max_workers=
|
|
490
|
-
for device_id in range(
|
|
489
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
490
|
+
for device_id in range(num_devices):
|
|
491
491
|
future = executor.submit(
|
|
492
492
|
_jk_task_with_dm, dfobj, dms,
|
|
493
493
|
hermi=hermi, device_id=device_id,
|
|
@@ -18,7 +18,7 @@ import cupy
|
|
|
18
18
|
from gpu4pyscf.df.int3c2e import get_int3c2e_ip_jk, VHFOpt, _split_tasks
|
|
19
19
|
from gpu4pyscf.lib.cupy_helper import contract, concatenate, reduce_to_device
|
|
20
20
|
from gpu4pyscf.lib import logger
|
|
21
|
-
from gpu4pyscf.__config__ import _streams,
|
|
21
|
+
from gpu4pyscf.__config__ import _streams, num_devices
|
|
22
22
|
|
|
23
23
|
def _jk_task(with_df, dm, orbo, with_j=True, with_k=True, device_id=0):
|
|
24
24
|
''' # (L|ij) -> rhoj: (L), rhok: (L|oo)
|
|
@@ -61,8 +61,8 @@ def get_rhojk(with_df, dm, orbo, with_j=True, with_k=True):
|
|
|
61
61
|
'''
|
|
62
62
|
futures = []
|
|
63
63
|
cupy.cuda.get_current_stream().synchronize()
|
|
64
|
-
with ThreadPoolExecutor(max_workers=
|
|
65
|
-
for device_id in range(
|
|
64
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
65
|
+
for device_id in range(num_devices):
|
|
66
66
|
future = executor.submit(
|
|
67
67
|
_jk_task, with_df, dm, orbo,
|
|
68
68
|
with_j=with_j, with_k=with_k, device_id=device_id)
|
|
@@ -161,12 +161,12 @@ def get_grad_vjk(with_df, mol, auxmol, rhoj_cart, dm_cart, rhok_cart, orbo_cart,
|
|
|
161
161
|
|
|
162
162
|
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
163
163
|
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
164
|
-
task_list = _split_tasks(loads,
|
|
164
|
+
task_list = _split_tasks(loads, num_devices)
|
|
165
165
|
|
|
166
166
|
futures = []
|
|
167
167
|
cupy.cuda.get_current_stream().synchronize()
|
|
168
|
-
with ThreadPoolExecutor(max_workers=
|
|
169
|
-
for device_id in range(
|
|
168
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
169
|
+
for device_id in range(num_devices):
|
|
170
170
|
future = executor.submit(
|
|
171
171
|
_jk_ip_task, intopt, rhoj_cart, dm_cart, rhok_cart, orbo_cart, task_list[device_id],
|
|
172
172
|
with_j=with_j, with_k=with_k, device_id=device_id, omega=omega)
|
|
@@ -23,7 +23,7 @@ from gpu4pyscf.scf.int4c2e import libgint
|
|
|
23
23
|
from gpu4pyscf.hessian.jk import _ao2mo
|
|
24
24
|
from gpu4pyscf.lib import logger
|
|
25
25
|
from gpu4pyscf.lib.cupy_helper import contract, cart2sph, reduce_to_device
|
|
26
|
-
from gpu4pyscf.__config__ import _streams,
|
|
26
|
+
from gpu4pyscf.__config__ import _streams, num_devices
|
|
27
27
|
|
|
28
28
|
NROOT_ON_GPU = 7
|
|
29
29
|
|
|
@@ -171,8 +171,8 @@ def get_jk(dfobj, dms_tag, mo_coeff, mocc, hermi=0,
|
|
|
171
171
|
mo_coeff = [intopt.sort_orbitals(mo, axis=[0]) for mo in mo_coeff]
|
|
172
172
|
|
|
173
173
|
futures = []
|
|
174
|
-
with ThreadPoolExecutor(max_workers=
|
|
175
|
-
for device_id in range(
|
|
174
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
175
|
+
for device_id in range(num_devices):
|
|
176
176
|
future = executor.submit(
|
|
177
177
|
_jk_task_with_mo1,
|
|
178
178
|
dfobj, dms, mo_coeff, mo1s, occ_coeffs,
|
|
@@ -415,12 +415,12 @@ def get_int3c2e_hjk(intopt, rhoj, rhok, dm0_tag, with_j=True, with_k=True,
|
|
|
415
415
|
ncp_ij = len(intopt.log_qs)
|
|
416
416
|
tasks = np.array(list(itertools.product(range(ncp_k), range(ncp_ij))))
|
|
417
417
|
task_list = []
|
|
418
|
-
for device_id in range(
|
|
419
|
-
task_list.append(tasks[device_id::
|
|
418
|
+
for device_id in range(num_devices):
|
|
419
|
+
task_list.append(tasks[device_id::num_devices])
|
|
420
420
|
|
|
421
421
|
cupy.cuda.get_current_stream().synchronize()
|
|
422
|
-
with ThreadPoolExecutor(max_workers=
|
|
423
|
-
for device_id in range(
|
|
422
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
423
|
+
for device_id in range(num_devices):
|
|
424
424
|
future = executor.submit(
|
|
425
425
|
_int3c2e_ipip_tasks, intopt, task_list[device_id],
|
|
426
426
|
rhoj, rhok, dm0_tag, orbo, with_j=with_j, with_k=with_k,
|
|
@@ -56,7 +56,7 @@ def _hk_ip1_ip1(rhok1_Pko, dm0, mocc_2):
|
|
|
56
56
|
hk_ao_ao = cupy.zeros([nao,nao,3,3])
|
|
57
57
|
cupy.get_default_memory_pool().free_all_blocks()
|
|
58
58
|
mem_avail = get_avail_mem()
|
|
59
|
-
blksize = int((mem_avail*0.4/(nao*nao*3*8)/ALIGNED))*ALIGNED
|
|
59
|
+
blksize = int(((mem_avail-hk_ao_ao.nbytes)*0.4/(nao*nao*3*8)/ALIGNED))*ALIGNED
|
|
60
60
|
for k0, k1 in lib.prange(0,nnz,blksize):
|
|
61
61
|
#rhok1_Pko_kslice = cupy.asarray(rhok1_Pko[k0:k1])
|
|
62
62
|
rhok1_Pko_kslice = copy_array(rhok1_Pko[k0:k1])
|
|
@@ -68,8 +68,9 @@ def _hk_ip1_ip1(rhok1_Pko, dm0, mocc_2):
|
|
|
68
68
|
|
|
69
69
|
# (10|0)(0|01) without response of RI basis
|
|
70
70
|
rhok1_Pkl_kslice = contract('piox,ko->pikx', rhok1_Pko_kslice, mocc_2)
|
|
71
|
+
rhok1_Pko_kslice = None
|
|
71
72
|
hk_ao_ao += contract('pikx,pkiy->ikxy', rhok1_Pkl_kslice, rhok1_Pkl_kslice)
|
|
72
|
-
rhok1_Pkl_kslice =
|
|
73
|
+
rhok1_Pkl_kslice = None
|
|
73
74
|
return hk_ao_ao
|
|
74
75
|
|
|
75
76
|
def _partial_hess_ejk(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None, atmlst=None,
|
|
@@ -177,14 +178,14 @@ def _partial_hess_ejk(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None, atmls
|
|
|
177
178
|
assert blksize > 0
|
|
178
179
|
if hessobj.auxbasis_response:
|
|
179
180
|
hk_ao_aux = cupy.zeros([nao,naux,3,3])
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
for i0, i1 in lib.prange(0,nao,blksize):
|
|
182
|
+
#wk1_Pko_islice = cupy.asarray(wk1_Pko[:,i0:i1])
|
|
183
|
+
wk1_Pko_islice = copy_array(wk1_Pko[:,i0:i1])
|
|
184
|
+
|
|
185
|
+
#rhok1_Pko = contract('pq,qiox->piox', int2c_inv, wk1_Pko_islice)
|
|
186
|
+
rhok1_Pko = solve_j2c(wk1_Pko_islice)
|
|
187
|
+
wk1_Pko_islice = None
|
|
183
188
|
|
|
184
|
-
#rhok1_Pko = contract('pq,qiox->piox', int2c_inv, wk1_Pko_islice)
|
|
185
|
-
rhok1_Pko = solve_j2c(wk1_Pko_islice)
|
|
186
|
-
wk1_Pko_islice = None
|
|
187
|
-
if hessobj.auxbasis_response:
|
|
188
189
|
# (10|0)(1|00)
|
|
189
190
|
wk_ip2_Ipo = contract('porx,io->pirx', wk_ip2_P__, mocc_2[i0:i1])
|
|
190
191
|
hk_ao_aux[i0:i1] += contract('piox,pioy->ipxy', rhok1_Pko, wk_ip2_Ipo)
|
|
@@ -200,7 +201,7 @@ def _partial_hess_ejk(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None, atmls
|
|
|
200
201
|
wk1_I = contract('yqp,piox->qioxy', int2c_ip1, rhok1_Pko)
|
|
201
202
|
hk_ao_aux[i0:i1] -= contract('qoi,qioxy->iqxy', rhok0_P_I, wk1_I)
|
|
202
203
|
wk1_I = rhok0_P_I = None
|
|
203
|
-
|
|
204
|
+
rhok1_Pko = None
|
|
204
205
|
t1 = log.timer_debug1('contract int3c2e_ip1 with int2c_ip1', *t1)
|
|
205
206
|
|
|
206
207
|
rho2c_0 = contract('pij,qji->pq', rhok0_P__, rhok0_P__)
|
|
@@ -46,8 +46,8 @@ def partial_hess_elec(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
|
46
46
|
mocc = mo_coeff[:,mo_occ>0]
|
|
47
47
|
dm0 = numpy.dot(mocc, mocc.T) * 2
|
|
48
48
|
|
|
49
|
-
if mf.
|
|
50
|
-
raise NotImplementedError
|
|
49
|
+
if mf.do_nlc():
|
|
50
|
+
raise NotImplementedError("2nd derivative of NLC is not implemented.")
|
|
51
51
|
|
|
52
52
|
omega, alpha, hyb = mf._numint.rsh_and_hybrid_coeff(mf.xc, spin=mol.spin)
|
|
53
53
|
with_k = mf._numint.libxc.is_hybrid_xc(mf.xc)
|
|
@@ -48,8 +48,8 @@ def partial_hess_elec(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
|
48
48
|
moccb = mo_coeff[1][:,mo_occ[1]>0]
|
|
49
49
|
dm0a = numpy.dot(mocca, mocca.T)
|
|
50
50
|
dm0b = numpy.dot(moccb, moccb.T)
|
|
51
|
-
if mf.
|
|
52
|
-
raise NotImplementedError
|
|
51
|
+
if mf.do_nlc():
|
|
52
|
+
raise NotImplementedError("2nd derivative of NLC is not implemented.")
|
|
53
53
|
|
|
54
54
|
omega, alpha, hyb = mf._numint.rsh_and_hybrid_coeff(mf.xc, spin=mol.spin)
|
|
55
55
|
with_k = mf._numint.libxc.is_hybrid_xc(mf.xc)
|
|
@@ -24,7 +24,7 @@ from gpu4pyscf.lib.cupy_helper import (block_c2s_diag, cart2sph, contract, get_a
|
|
|
24
24
|
reduce_to_device, copy_array, transpose_sum)
|
|
25
25
|
from gpu4pyscf.lib import logger
|
|
26
26
|
from gpu4pyscf.gto.mole import basis_seg_contraction
|
|
27
|
-
from gpu4pyscf.__config__ import
|
|
27
|
+
from gpu4pyscf.__config__ import num_devices, _streams
|
|
28
28
|
|
|
29
29
|
LMAX_ON_GPU = 8
|
|
30
30
|
FREE_CUPY_CACHE = True
|
|
@@ -824,11 +824,11 @@ def get_int3c2e_jk(mol, auxmol, dm0_tag, with_k=True, omega=None):
|
|
|
824
824
|
futures = []
|
|
825
825
|
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
826
826
|
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
827
|
-
task_list = _split_tasks(loads,
|
|
827
|
+
task_list = _split_tasks(loads, num_devices)
|
|
828
828
|
|
|
829
829
|
cupy.cuda.get_current_stream().synchronize()
|
|
830
|
-
with ThreadPoolExecutor(max_workers=
|
|
831
|
-
for device_id in range(
|
|
830
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
831
|
+
for device_id in range(num_devices):
|
|
832
832
|
future = executor.submit(
|
|
833
833
|
_int3c2e_jk_task, intopt, task_list[device_id],
|
|
834
834
|
dm0_tag, orbo, device_id=device_id, omega=omega)
|
|
@@ -935,11 +935,11 @@ def get_int3c2e_ip1_vjk(intopt, rhoj, rhok, dm0_tag, aoslices, with_j=True,
|
|
|
935
935
|
|
|
936
936
|
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
937
937
|
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
938
|
-
task_list = _split_tasks(loads,
|
|
938
|
+
task_list = _split_tasks(loads, num_devices)
|
|
939
939
|
|
|
940
940
|
cupy.cuda.get_current_stream().synchronize()
|
|
941
|
-
with ThreadPoolExecutor(max_workers=
|
|
942
|
-
for device_id in range(
|
|
941
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
942
|
+
for device_id in range(num_devices):
|
|
943
943
|
future = executor.submit(
|
|
944
944
|
_int3c2e_ip1_vjk_task, intopt, task_list[device_id],
|
|
945
945
|
rhoj, rhok, dm0_tag, orbo, with_j=with_j, with_k=with_k,
|
|
@@ -1033,11 +1033,11 @@ def get_int3c2e_ip2_vjk(intopt, rhoj, rhok, dm0_tag, auxslices,
|
|
|
1033
1033
|
|
|
1034
1034
|
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
1035
1035
|
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
1036
|
-
task_list = _split_tasks(loads,
|
|
1036
|
+
task_list = _split_tasks(loads, num_devices)
|
|
1037
1037
|
|
|
1038
1038
|
cupy.cuda.get_current_stream().synchronize()
|
|
1039
|
-
with ThreadPoolExecutor(max_workers=
|
|
1040
|
-
for device_id in range(
|
|
1039
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
1040
|
+
for device_id in range(num_devices):
|
|
1041
1041
|
future = executor.submit(
|
|
1042
1042
|
_int3c2e_ip2_vjk_task, intopt, task_list[device_id],
|
|
1043
1043
|
rhoj, rhok, dm0_tag, orbo, with_j=with_j,
|
|
@@ -1096,7 +1096,7 @@ def get_int3c2e_ip1_wjk(intopt, dm0_tag, with_k=True, omega=None):
|
|
|
1096
1096
|
|
|
1097
1097
|
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
1098
1098
|
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
1099
|
-
task_list = _split_tasks(loads,
|
|
1099
|
+
task_list = _split_tasks(loads, num_devices)
|
|
1100
1100
|
|
|
1101
1101
|
nao = intopt.mol.nao
|
|
1102
1102
|
naux = intopt.auxmol.nao
|
|
@@ -1107,8 +1107,8 @@ def get_int3c2e_ip1_wjk(intopt, dm0_tag, with_k=True, omega=None):
|
|
|
1107
1107
|
wk = np.ndarray([naux,nao,nocc,3], dtype=np.float64, order='C', buffer=mem)
|
|
1108
1108
|
|
|
1109
1109
|
cupy.cuda.get_current_stream().synchronize()
|
|
1110
|
-
with ThreadPoolExecutor(max_workers=
|
|
1111
|
-
for device_id in range(
|
|
1110
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
1111
|
+
for device_id in range(num_devices):
|
|
1112
1112
|
future = executor.submit(
|
|
1113
1113
|
_int3c2e_ip1_wjk_task, intopt, task_list[device_id],
|
|
1114
1114
|
dm0_tag, orbo, wk, with_k=with_k, device_id=device_id, omega=omega)
|
|
@@ -1156,11 +1156,11 @@ def get_int3c2e_ip2_wjk(intopt, dm0_tag, with_k=True, omega=None):
|
|
|
1156
1156
|
|
|
1157
1157
|
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
1158
1158
|
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
1159
|
-
task_list = _split_tasks(loads,
|
|
1159
|
+
task_list = _split_tasks(loads, num_devices)
|
|
1160
1160
|
|
|
1161
1161
|
cupy.cuda.get_current_stream().synchronize()
|
|
1162
|
-
with ThreadPoolExecutor(max_workers=
|
|
1163
|
-
for device_id in range(
|
|
1162
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
1163
|
+
for device_id in range(num_devices):
|
|
1164
1164
|
future = executor.submit(
|
|
1165
1165
|
_int3c2e_ip2_wjk, intopt, task_list[device_id],
|
|
1166
1166
|
dm0_tag, orbo, with_k=with_k, device_id=device_id, omega=omega)
|