gpu4pyscf 1.3.2__tar.gz → 1.4.0__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.2 → gpu4pyscf-1.4.0}/CHANGELOG +21 -1
- {gpu4pyscf-1.3.2/gpu4pyscf.egg-info → gpu4pyscf-1.4.0}/PKG-INFO +1 -1
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/README.md +15 -10
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/__init__.py +2 -2
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/grad/__init__.py +5 -1
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/grad/jk.py +171 -16
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/grad/rhf.py +12 -33
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/grad/rks.py +19 -24
- gpu4pyscf-1.4.0/gpu4pyscf/df/grad/tdrhf.py +202 -0
- gpu4pyscf-1.4.0/gpu4pyscf/df/grad/tdrks.py +40 -0
- gpu4pyscf-1.4.0/gpu4pyscf/df/grad/tduhf.py +216 -0
- gpu4pyscf-1.4.0/gpu4pyscf/df/grad/tduks.py +40 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/grad/uhf.py +11 -32
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/grad/uks.py +32 -38
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/int3c2e.py +17 -14
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/int3c2e_bdiv.py +18 -14
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/__init__.py +1 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/gen_grid.py +53 -92
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/libxc.py +0 -1
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/numint.py +229 -174
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/rks.py +6 -32
- gpu4pyscf-1.4.0/gpu4pyscf/dft/rks_lowmem.py +219 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/xc_deriv.py +120 -2
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/dft_3c_driver.py +2 -3
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/dft_driver.py +17 -89
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/opt_driver.py +15 -77
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/grad/__init__.py +4 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/grad/rhf.py +49 -34
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/grad/rks.py +41 -41
- gpu4pyscf-1.4.0/gpu4pyscf/grad/tdrhf.py +342 -0
- gpu4pyscf-1.4.0/gpu4pyscf/grad/tdrks.py +505 -0
- gpu4pyscf-1.4.0/gpu4pyscf/grad/tduhf.py +265 -0
- gpu4pyscf-1.4.0/gpu4pyscf/grad/tduks.py +506 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/grad/uks.py +49 -44
- gpu4pyscf-1.4.0/gpu4pyscf/gto/ecp.py +317 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/gto/mole.py +54 -21
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/jk.py +14 -14
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/rhf.py +65 -68
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/rks.py +15 -13
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/uhf.py +5 -2
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/uks.py +19 -20
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/cupy_helper.py +84 -31
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/cusolver.py +3 -2
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/diis.py +27 -64
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/multi_gpu.py +18 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/multigrid.py +178 -39
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/qmmm/pbc/itrf.py +19 -18
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/qmmm/pbc/mm_mole.py +19 -17
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/__init__.py +1 -0
- gpu4pyscf-1.4.0/gpu4pyscf/scf/diis.py +122 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/hf.py +230 -31
- gpu4pyscf-1.4.0/gpu4pyscf/scf/hf_lowmem.py +327 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/int2c2e.py +1 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/j_engine.py +6 -5
- gpu4pyscf-1.4.0/gpu4pyscf/scf/jk.py +916 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/ucphf.py +26 -22
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/uhf.py +6 -8
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/_attach_solvent.py +28 -16
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/grad/pcm.py +52 -27
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/grad/smd.py +1 -1
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/hessian/pcm.py +153 -133
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/hessian/smd.py +3 -3
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/pcm.py +64 -30
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/smd.py +5 -3
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/rhf.py +205 -2
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/rks.py +17 -6
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/uhf.py +311 -3
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/uks.py +19 -2
- gpu4pyscf-1.4.0/gpu4pyscf/tools/__init__.py +15 -0
- gpu4pyscf-1.4.0/gpu4pyscf/tools/ase_interface.py +81 -0
- gpu4pyscf-1.4.0/gpu4pyscf/tools/method_config.py +117 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0/gpu4pyscf.egg-info}/PKG-INFO +1 -1
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf.egg-info/SOURCES.txt +15 -1
- gpu4pyscf-1.3.2/gpu4pyscf/scf/diis.py +0 -91
- gpu4pyscf-1.3.2/gpu4pyscf/scf/jk.py +0 -712
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/LICENSE +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/MANIFEST.in +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/__config__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/cc/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/cc/ccsd_incore.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/cderi.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/df.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/df_jk.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/hessian/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/hessian/jk.py +1 -1
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/hessian/rhf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/hessian/rks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/hessian/uhf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/df/hessian/uks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/gks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/libxc_structs.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/radi.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/roks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/uks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/dft/xc_alias.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/basis_vDZP_NWCHEM.dat +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/ecp_vDZP_NWCHEM.dat +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/drivers/opt_3c_driver.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/fci/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/fci/direct_spin1.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/grad/dispersion.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/grad/uhf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/gto/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/gto/int3c1e.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/gto/int3c1e_ip.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/gto/int3c1e_ipip.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/hessian/dispersion.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/cublas.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/cutensor.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/logger.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/memcpy.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/lib/utils.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/mp/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/mp/dfmp2.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/mp/mp2.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/aft.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/aft_jk.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/df.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/df_jk.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/fft.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/fft_jk.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/ft_ao.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/int3c2e.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/df/rsdf_builder.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/gen_grid.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/krks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/kuks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/numint.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/rks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/dft/uks.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/gto/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/lib/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/lib/kpts_helper.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/scf/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/scf/hf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/scf/khf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/scf/kuhf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/scf/uhf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/tools/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/tools/k2gamma.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pbc/tools/pbc.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pop/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/pop/esp.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/properties/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/properties/ir.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/properties/polarizability.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/properties/shielding.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/qmmm/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/qmmm/chelpg.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/qmmm/pbc/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/qmmm/pbc/tools.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/_response_functions.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/cphf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/dispersion.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/ghf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/hf_symm.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/int4c2e.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/rohf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/soscf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/scf/uhf_symm.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/grad/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/grad/smd_experiment.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/hessian/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/hessian/smd_experiment.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/solvent/smd_experiment.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/__init__.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/_lr_eig.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf/tdscf/_uhf_resp_sf.py +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf.egg-info/dependency_links.txt +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf.egg-info/requires.txt +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/gpu4pyscf.egg-info/top_level.txt +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/setup.cfg +0 -0
- {gpu4pyscf-1.3.2 → gpu4pyscf-1.4.0}/setup.py +0 -0
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
v1.4.0 (2025-03-27)
|
|
2
|
+
-------------------
|
|
3
|
+
* New Features
|
|
4
|
+
- RKS and UKS TDDFT Gradients for density fitting and direct-SCF methods.
|
|
5
|
+
- ECP integrals and its first and second derivatives accelerated on GPU.
|
|
6
|
+
- Multigrid algorithm for Coulomb matrix and LDA, GGA, MGGA functionals computation.
|
|
7
|
+
- PBC Gaussian density fitting integrals.
|
|
8
|
+
- ASE interface for molecular systems.
|
|
9
|
+
* Improvements
|
|
10
|
+
- Reduce memory footprint in SCF driver.
|
|
11
|
+
- Reduce memory requirements for PCM energy and gradients.
|
|
12
|
+
- Reduce memory requirements for DFT gradients.
|
|
13
|
+
- Utilize the sparsity in cart2sph coefficients in the cart2sph transformation in scf.jk kernel
|
|
14
|
+
- Molecular 3c2e integrals generated using the block-divergent alogrithm.
|
|
15
|
+
- Support I orbitals in DFT.
|
|
16
|
+
* Fixes
|
|
17
|
+
- LRU cached cart2sph under the multiple GPU environment.
|
|
18
|
+
- A maxDynamicSharedMemorySize setting bug in gradient and hessian calculation under the multiple GPU environment.
|
|
19
|
+
- Remove the limits of 6000 GTO shells in DFT numerical integration module.
|
|
20
|
+
|
|
1
21
|
v1.3.2 (2025-03-10)
|
|
2
22
|
-------------------
|
|
3
23
|
* Improvements
|
|
4
24
|
- Dump xc info and grids into to log file
|
|
5
|
-
- Optimize 4-center integral
|
|
25
|
+
- Optimize 4-center integral evaluation CUDA kernels using warp divergent algorithm
|
|
6
26
|
- Support up to I orbitals in DFT
|
|
7
27
|
- Fix out-of-bound issue in DFT hessian for heavy atoms (>=19)
|
|
8
28
|
* Deprecation
|
|
@@ -7,7 +7,7 @@ Installation
|
|
|
7
7
|
--------
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> The compiled binary packages support compute capability
|
|
10
|
+
> The compiled binary packages support compute capability 7.0 and later (Volta and later, such as Tesla V100, RTX 20 series and later).
|
|
11
11
|
|
|
12
12
|
Run ```nvcc --version``` in your terminal to check the installed CUDA toolkit version. Then, choose the proper package based on your CUDA toolkit version.
|
|
13
13
|
|
|
@@ -27,7 +27,7 @@ cmake --build build/temp.gpu4pyscf -j 4
|
|
|
27
27
|
CURRENT_PATH=`pwd`
|
|
28
28
|
export PYTHONPATH="${PYTHONPATH}:${CURRENT_PATH}"
|
|
29
29
|
```
|
|
30
|
-
Then install cutensor and cupy for acceleration (please switch the versions according to your
|
|
30
|
+
Then install cutensor and cupy for acceleration (please switch the versions according to your runtime CUDA environment!)
|
|
31
31
|
```sh
|
|
32
32
|
pip3 install cutensor-cu12 cupy-cuda12x
|
|
33
33
|
```
|
|
@@ -45,17 +45,21 @@ Features
|
|
|
45
45
|
- LDA, GGA, mGGA, hybrid, and range-separated functionals via [libXC](https://gitlab.com/libxc/libxc/-/tree/master/);
|
|
46
46
|
- Spin-conserved and spin-flip TDA and TDDFT for excitated states
|
|
47
47
|
- Geometry optimization and transition state search via [geomeTRIC](https://geometric.readthedocs.io/en/latest/);
|
|
48
|
+
- Atomic Simulation Environment ([ASE](https://gitlab.com/ase/ase)) interface;
|
|
48
49
|
- Dispersion corrections via [DFTD3](https://github.com/dftd3/simple-dftd3) and [DFTD4](https://github.com/dftd4/dftd4);
|
|
49
50
|
- Nonlocal functional correction (vv10) for SCF and gradient;
|
|
50
|
-
- ECP is supported and calculated on
|
|
51
|
-
- PCM models,
|
|
51
|
+
- ECP is supported and calculated on GPU;
|
|
52
|
+
- PCM models, their analytical gradients, and analytical Hessian matrix;
|
|
53
|
+
- SMD solvent model;
|
|
52
54
|
- Unrestricted Hartree-Fock and unrestricted DFT, gradient, and Hessian;
|
|
53
|
-
- MP2/DF-MP2 and CCSD (experimental);
|
|
54
|
-
- Polarizability, IR, and NMR shielding (experimental);
|
|
55
|
-
- QM/MM with PBC;
|
|
56
55
|
- CHELPG, ESP, and RESP atomic charge;
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
|
|
57
|
+
The following features are still in the experimental stage
|
|
58
|
+
- MP2/DF-MP2 and CCSD;
|
|
59
|
+
- Polarizability, IR, and NMR shielding;
|
|
60
|
+
- QM/MM with PBC;
|
|
61
|
+
- Multi-GPU for both direct SCF and density fitting
|
|
62
|
+
- SCF and DFT with periodic boundary condition
|
|
59
63
|
|
|
60
64
|
Limitations
|
|
61
65
|
--------
|
|
@@ -65,6 +69,7 @@ Limitations
|
|
|
65
69
|
- Density fitting scheme up to ~168 atoms with def2-tzvpd basis, bounded by CPU memory;
|
|
66
70
|
- meta-GGA without density laplacian;
|
|
67
71
|
- Double hybrid functionals are not supported;
|
|
72
|
+
- Hessian of TDDFT is not supported;
|
|
68
73
|
|
|
69
74
|
Examples
|
|
70
75
|
--------
|
|
@@ -113,7 +118,7 @@ Find more examples in [gpu4pyscf/examples](https://github.com/pyscf/gpu4pyscf/tr
|
|
|
113
118
|
|
|
114
119
|
Benchmarks
|
|
115
120
|
--------
|
|
116
|
-
Speedup with GPU4PySCF v0.6.0 on A100-80G over Q-Chem 6.1 on 32-cores CPU (
|
|
121
|
+
Speedup with GPU4PySCF v0.6.0 on A100-80G over Q-Chem 6.1 on 32-cores CPU (density fitting, SCF, def2-tzvpp, def2-universal-jkfit, B3LYP, (99,590))
|
|
117
122
|
|
|
118
123
|
| mol | natm | LDA | PBE | B3LYP | M06 | wB97m-v |
|
|
119
124
|
|:------------------|-------:|-------:|-------:|--------:|-------:|----------:|
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
__version__ = '1.
|
|
15
|
+
__version__ = '1.4.0'
|
|
16
16
|
|
|
17
|
-
from . import lib, grad, hessian, solvent, scf, dft
|
|
17
|
+
from . import lib, grad, hessian, solvent, scf, dft, tdscf
|
|
@@ -12,9 +12,13 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
from . import rhf, rks, uhf, uks
|
|
15
|
+
from . import rhf, rks, uhf, uks, tdrhf, tdrks, tduhf, tduks
|
|
16
16
|
|
|
17
17
|
RHF = rhf.Gradients
|
|
18
18
|
RKS = rks.Gradients
|
|
19
19
|
UHF = uhf.Gradients
|
|
20
20
|
UKS = uks.Gradients
|
|
21
|
+
TDRHF = tdrhf.Gradients
|
|
22
|
+
TDRKS = tdrks.Gradients
|
|
23
|
+
TDUHF = tduhf.Gradients
|
|
24
|
+
TDUKS = tduks.Gradients
|
|
@@ -86,24 +86,23 @@ def get_rhojk(with_df, dm, orbo, with_j=True, with_k=True):
|
|
|
86
86
|
def _jk_ip_task(intopt, rhoj_cart, dm_cart, rhok_cart, orbo_cart, task_list,
|
|
87
87
|
with_j=True, with_k=True, device_id=0, omega=None):
|
|
88
88
|
mol = intopt.mol
|
|
89
|
+
natm = mol.natm
|
|
89
90
|
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
90
91
|
log = logger.new_logger(mol, mol.verbose)
|
|
91
92
|
t0 = (logger.process_clock(), logger.perf_counter())
|
|
92
93
|
|
|
93
94
|
orbo_cart = cupy.asarray(orbo_cart)
|
|
94
95
|
cart_aux_loc = intopt.cart_aux_loc
|
|
95
|
-
|
|
96
|
-
naux_cart = intopt._sorted_auxmol.nao
|
|
97
|
-
vj = vk = vjaux = vkaux = None
|
|
96
|
+
ej = ek = ejaux = ekaux = None
|
|
98
97
|
if with_j:
|
|
99
98
|
rhoj_cart = cupy.asarray(rhoj_cart)
|
|
100
99
|
dm_cart = cupy.asarray(dm_cart)
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
ej = cupy.zeros((natm,3), order='C')
|
|
101
|
+
ejaux = cupy.zeros((natm,3))
|
|
103
102
|
if with_k:
|
|
104
103
|
rhok_cart = cupy.asarray(rhok_cart)
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
ek = cupy.zeros((natm,3), order='C')
|
|
105
|
+
ekaux = cupy.zeros((natm,3))
|
|
107
106
|
|
|
108
107
|
for cp_kl_id in task_list:
|
|
109
108
|
k0, k1 = cart_aux_loc[cp_kl_id], cart_aux_loc[cp_kl_id+1]
|
|
@@ -135,16 +134,16 @@ def _jk_ip_task(intopt, rhoj_cart, dm_cart, rhok_cart, orbo_cart, task_list,
|
|
|
135
134
|
vjaux_outcore = contract('xp,p->xp', rhoj_tmp0, rhoj_cart[k0:k1])
|
|
136
135
|
vkaux_outcore = contract('xpji,pji->xp', int3c_ip, rhok_tmp)
|
|
137
136
|
'''
|
|
138
|
-
|
|
139
|
-
if with_j:
|
|
140
|
-
if with_k:
|
|
141
|
-
|
|
142
|
-
if with_j:
|
|
143
|
-
if with_k:
|
|
144
|
-
|
|
145
|
-
rhoj_tmp = rhok_tmp =
|
|
137
|
+
ej_tmp, ek_tmp = get_int3c2e_ip_jk(intopt, cp_kl_id, 'ip1', rhoj_tmp, rhok_tmp, dm_cart, omega=omega)
|
|
138
|
+
if with_j: ej += ej_tmp
|
|
139
|
+
if with_k: ek += ek_tmp
|
|
140
|
+
ej_tmp, ek_tmp = get_int3c2e_ip_jk(intopt, cp_kl_id, 'ip2', rhoj_tmp, rhok_tmp, dm_cart, omega=omega)
|
|
141
|
+
if with_j: ejaux += ej_tmp
|
|
142
|
+
if with_k: ekaux += ek_tmp
|
|
143
|
+
|
|
144
|
+
rhoj_tmp = rhok_tmp = ej_tmp = ek_tmp = None
|
|
146
145
|
t0 = log.timer_debug1(f'calculate {cp_kl_id:3d} / {len(intopt.aux_log_qs):3d}, {k1-k0:3d} slices', *t0)
|
|
147
|
-
return
|
|
146
|
+
return ej, ek, ejaux, ekaux
|
|
148
147
|
|
|
149
148
|
def get_grad_vjk(with_df, mol, auxmol, rhoj_cart, dm_cart, rhok_cart, orbo_cart,
|
|
150
149
|
with_j=True, with_k=True, omega=None):
|
|
@@ -191,3 +190,159 @@ def get_grad_vjk(with_df, mol, auxmol, rhoj_cart, dm_cart, rhok_cart, orbo_cart,
|
|
|
191
190
|
rhok = reduce_to_device(rhok_total)
|
|
192
191
|
vkaux = reduce_to_device(vkaux_total)
|
|
193
192
|
return rhoj, rhok, vjaux, vkaux
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def _jk_task_td(with_df, dm, orbol, orbor, with_j=True, with_k=True, device_id=0):
|
|
196
|
+
'''
|
|
197
|
+
(L|ij) -> rhoj: (L), rhok: (L|lr), for dm0 from scf, rhok is (L|oo)
|
|
198
|
+
'''
|
|
199
|
+
rhoj = rhok = None
|
|
200
|
+
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
201
|
+
log = logger.new_logger(with_df.mol, with_df.verbose)
|
|
202
|
+
assert isinstance(with_df.verbose, int)
|
|
203
|
+
t0 = log.init_timer()
|
|
204
|
+
dm = cupy.asarray(dm)
|
|
205
|
+
naux_slice = with_df._cderi[device_id].shape[0]
|
|
206
|
+
nl = orbol.shape[-1]
|
|
207
|
+
nr = orbor.shape[-1]
|
|
208
|
+
|
|
209
|
+
rows = with_df.intopt.cderi_row
|
|
210
|
+
cols = with_df.intopt.cderi_col
|
|
211
|
+
dm_sparse = dm[rows, cols]
|
|
212
|
+
dm_sparse[with_df.intopt.cderi_diag] *= .5
|
|
213
|
+
|
|
214
|
+
blksize = with_df.get_blksize()
|
|
215
|
+
if with_j:
|
|
216
|
+
rhoj = cupy.empty([naux_slice])
|
|
217
|
+
if with_k:
|
|
218
|
+
rhok = cupy.empty([naux_slice, nl, nr], order='C')
|
|
219
|
+
p0 = p1 = 0
|
|
220
|
+
|
|
221
|
+
for cderi, cderi_sparse in with_df.loop(blksize=blksize):
|
|
222
|
+
p1 = p0 + cderi.shape[0]
|
|
223
|
+
if with_j:
|
|
224
|
+
rhoj[p0:p1] = 2.0*dm_sparse.dot(cderi_sparse)
|
|
225
|
+
if with_k:
|
|
226
|
+
rhok[p0:p1] = 0
|
|
227
|
+
tmp = contract('Lij,jk->Lki', cderi, orbol)
|
|
228
|
+
contract('Lki,il->Lkl', tmp, orbor, out=rhok[p0:p1])
|
|
229
|
+
p0 = p1
|
|
230
|
+
cupy.cuda.get_current_stream().synchronize()
|
|
231
|
+
t0 = log.timer_debug1(f'rhoj and rhok on Device {device_id}', *t0)
|
|
232
|
+
return rhoj, rhok
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def get_rhojk_td(with_df, dm, orbol, orbor, with_j=True, with_k=True):
|
|
236
|
+
''' Calculate rhoj and rhok on Multi-GPU system
|
|
237
|
+
'''
|
|
238
|
+
futures = []
|
|
239
|
+
cupy.cuda.get_current_stream().synchronize()
|
|
240
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
241
|
+
for device_id in range(num_devices):
|
|
242
|
+
future = executor.submit(
|
|
243
|
+
_jk_task_td, with_df, dm, orbol, orbor,
|
|
244
|
+
with_j=with_j, with_k=with_k, device_id=device_id)
|
|
245
|
+
futures.append(future)
|
|
246
|
+
|
|
247
|
+
rhoj_total = []
|
|
248
|
+
rhok_total = []
|
|
249
|
+
for future in futures:
|
|
250
|
+
rhoj, rhok = future.result()
|
|
251
|
+
rhoj_total.append(rhoj)
|
|
252
|
+
rhok_total.append(rhok)
|
|
253
|
+
|
|
254
|
+
rhoj = rhok = None
|
|
255
|
+
if with_j:
|
|
256
|
+
rhoj = concatenate(rhoj_total)
|
|
257
|
+
if with_k:
|
|
258
|
+
rhok = concatenate(rhok_total)
|
|
259
|
+
|
|
260
|
+
return rhoj, rhok
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def _jk_ip_task_td(intopt, rhoj_cart, dm_cart, rhok_cart, orbol_cart, orbor_cart, task_list,
|
|
264
|
+
with_j=True, with_k=True, device_id=0, omega=None):
|
|
265
|
+
mol = intopt.mol
|
|
266
|
+
natm = mol.natm
|
|
267
|
+
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
268
|
+
log = logger.new_logger(mol, mol.verbose)
|
|
269
|
+
t0 = (logger.process_clock(), logger.perf_counter())
|
|
270
|
+
|
|
271
|
+
cart_aux_loc = intopt.cart_aux_loc
|
|
272
|
+
ej = ek = ejaux = ekaux = None
|
|
273
|
+
if with_j:
|
|
274
|
+
rhoj_cart = cupy.asarray(rhoj_cart)
|
|
275
|
+
dm_cart = cupy.asarray(dm_cart)
|
|
276
|
+
ej = cupy.zeros((natm,3), order='C')
|
|
277
|
+
ejaux = cupy.zeros((natm,3))
|
|
278
|
+
if with_k:
|
|
279
|
+
rhok_cart = cupy.asarray(rhok_cart)
|
|
280
|
+
ek = cupy.zeros((natm,3), order='C')
|
|
281
|
+
ekaux = cupy.zeros((natm,3))
|
|
282
|
+
|
|
283
|
+
for cp_kl_id in task_list:
|
|
284
|
+
k0, k1 = cart_aux_loc[cp_kl_id], cart_aux_loc[cp_kl_id+1]
|
|
285
|
+
rhoj_tmp = rhok_tmp = None
|
|
286
|
+
if with_j:
|
|
287
|
+
rhoj_tmp = rhoj_cart[k0:k1]
|
|
288
|
+
if with_k:
|
|
289
|
+
rhok_tmp = contract('por,ir->pio', rhok_cart[k0:k1], orbol_cart)
|
|
290
|
+
rhok_tmp = contract('pio,jo->pji', rhok_tmp, orbor_cart)
|
|
291
|
+
|
|
292
|
+
ej_tmp, ek_tmp = get_int3c2e_ip_jk(intopt, cp_kl_id, 'ip1', rhoj_tmp, rhok_tmp, dm_cart, omega=omega)
|
|
293
|
+
if with_j: ej += ej_tmp
|
|
294
|
+
if with_k: ek += ek_tmp
|
|
295
|
+
ej_tmp, ek_tmp = get_int3c2e_ip_jk(intopt, cp_kl_id, 'ip2', rhoj_tmp, rhok_tmp, dm_cart, omega=omega)
|
|
296
|
+
if with_j: ejaux += ej_tmp
|
|
297
|
+
if with_k: ekaux += ek_tmp
|
|
298
|
+
|
|
299
|
+
rhoj_tmp = rhok_tmp = ej_tmp = ek_tmp = None
|
|
300
|
+
t0 = log.timer_debug1(f'calculate {cp_kl_id:3d} / {len(intopt.aux_log_qs):3d}, {k1-k0:3d} slices', *t0)
|
|
301
|
+
return ej, ek, ejaux, ekaux
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def get_grad_vjk_td(with_df, mol, auxmol, rhoj_cart, dm_cart, rhok_cart, orbol_cart, orbor_cart,
|
|
305
|
+
with_j=True, with_k=True, omega=None):
|
|
306
|
+
'''
|
|
307
|
+
Calculate vj = (i'j|L)(L|kl)(ij)(kl), vk = (i'j|L)(L|kl)(ik)(jl)
|
|
308
|
+
vjaux = (ij|L')(L|kl)(ij)(kl), vkaux = (ij|L')(L|kl)(ik)(jl)
|
|
309
|
+
'''
|
|
310
|
+
nao_cart = dm_cart.shape[0]
|
|
311
|
+
block_size = with_df.get_blksize(nao=nao_cart)
|
|
312
|
+
|
|
313
|
+
intopt = VHFOpt(mol, auxmol, 'int2e')
|
|
314
|
+
intopt.build(1e-14, diag_block_with_triu=True, aosym=False,
|
|
315
|
+
group_size_aux=block_size, verbose=0)#, group_size=block_size)
|
|
316
|
+
|
|
317
|
+
aux_ao_loc = np.array(intopt.aux_ao_loc)
|
|
318
|
+
loads = aux_ao_loc[1:] - aux_ao_loc[:-1]
|
|
319
|
+
task_list = _split_tasks(loads, num_devices)
|
|
320
|
+
|
|
321
|
+
futures = []
|
|
322
|
+
cupy.cuda.get_current_stream().synchronize()
|
|
323
|
+
with ThreadPoolExecutor(max_workers=num_devices) as executor:
|
|
324
|
+
for device_id in range(num_devices):
|
|
325
|
+
future = executor.submit(
|
|
326
|
+
_jk_ip_task_td, intopt, rhoj_cart, dm_cart, rhok_cart, orbol_cart, orbor_cart, task_list[device_id],
|
|
327
|
+
with_j=with_j, with_k=with_k, device_id=device_id, omega=omega)
|
|
328
|
+
futures.append(future)
|
|
329
|
+
|
|
330
|
+
rhoj_total = []
|
|
331
|
+
rhok_total = []
|
|
332
|
+
ejaux_total = []
|
|
333
|
+
ekaux_total = []
|
|
334
|
+
for future in futures:
|
|
335
|
+
rhoj, rhok, ejaux, ekaux = future.result()
|
|
336
|
+
rhoj_total.append(rhoj)
|
|
337
|
+
rhok_total.append(rhok)
|
|
338
|
+
ejaux_total.append(ejaux)
|
|
339
|
+
ekaux_total.append(ekaux)
|
|
340
|
+
|
|
341
|
+
rhoj = rhok = ejaux = ekaux = None
|
|
342
|
+
if with_j:
|
|
343
|
+
rhoj = reduce_to_device(rhoj_total)
|
|
344
|
+
ejaux = reduce_to_device(ejaux_total)
|
|
345
|
+
if with_k:
|
|
346
|
+
rhok = reduce_to_device(rhok_total)
|
|
347
|
+
ekaux = reduce_to_device(ekaux_total)
|
|
348
|
+
return rhoj, rhok, ejaux, ekaux
|
|
@@ -59,7 +59,7 @@ def get_jk(mf_grad, mol=None, dm0=None, hermi=0, with_j=True, with_k=True, omega
|
|
|
59
59
|
'''
|
|
60
60
|
if mol is None: mol = mf_grad.mol
|
|
61
61
|
#TODO: dm has to be the SCF density matrix in this version. dm should be
|
|
62
|
-
# extended to any 1-particle density matrix
|
|
62
|
+
# extended to any 1-particle density matrix. The get_jk in tddft supports this function.
|
|
63
63
|
|
|
64
64
|
if(dm0 is None): dm0 = mf_grad.base.make_rdm1()
|
|
65
65
|
if omega is None:
|
|
@@ -106,6 +106,8 @@ def get_jk(mf_grad, mol=None, dm0=None, hermi=0, with_j=True, with_k=True, omega
|
|
|
106
106
|
aux_cart2sph = intopt.aux_cart2sph
|
|
107
107
|
low = with_df.cd_low
|
|
108
108
|
low_t = low.T.copy()
|
|
109
|
+
|
|
110
|
+
ejaux = ekaux = None
|
|
109
111
|
if with_j:
|
|
110
112
|
if low.tag == 'eig':
|
|
111
113
|
rhoj = cupy.dot(low_t.T, rhoj)
|
|
@@ -120,7 +122,7 @@ def get_jk(mf_grad, mol=None, dm0=None, hermi=0, with_j=True, with_k=True, omega
|
|
|
120
122
|
rhoj = intopt.unsort_orbitals(rhoj, aux_axis=[0])
|
|
121
123
|
tmp = contract('xpq,q->xp', int2c_e1, rhoj)
|
|
122
124
|
vjaux = -contract('xp,p->xp', tmp, rhoj)
|
|
123
|
-
|
|
125
|
+
ejaux = cupy.array([-vjaux[:,p0:p1].sum(axis=1) for p0, p1 in auxslices[:,2:]])
|
|
124
126
|
rhoj = vjaux = tmp = None
|
|
125
127
|
if with_k:
|
|
126
128
|
nocc = orbo.shape[-1]
|
|
@@ -133,7 +135,7 @@ def get_jk(mf_grad, mol=None, dm0=None, hermi=0, with_j=True, with_k=True, omega
|
|
|
133
135
|
tmp = contract('pij,qij->pq', rhok, rhok)
|
|
134
136
|
tmp = intopt.unsort_orbitals(tmp, aux_axis=[0,1])
|
|
135
137
|
vkaux = -contract('xpq,pq->xp', int2c_e1, tmp)
|
|
136
|
-
|
|
138
|
+
ekaux = cupy.array([-vkaux[:,p0:p1].sum(axis=1) for p0, p1 in auxslices[:,2:]])
|
|
137
139
|
vkaux = tmp = None
|
|
138
140
|
if not auxmol.cart:
|
|
139
141
|
rhok_cart = contract('pq,qkl->pkl', aux_cart2sph, rhok)
|
|
@@ -153,39 +155,16 @@ def get_jk(mf_grad, mol=None, dm0=None, hermi=0, with_j=True, with_k=True, omega
|
|
|
153
155
|
dm_cart = cart2sph @ dm @ cart2sph.T
|
|
154
156
|
|
|
155
157
|
with_df._cderi = None # release GPU memory
|
|
156
|
-
|
|
158
|
+
ej, ek, ejaux_3c, ekaux_3c = get_grad_vjk(with_df, mol, auxmol, rhoj_cart, dm_cart, rhok_cart, orbo_cart,
|
|
157
159
|
with_j=with_j, with_k=with_k, omega=omega)
|
|
158
|
-
# NOTE: vj and vk are still in cartesian
|
|
159
|
-
_sorted_mol = intopt._sorted_mol
|
|
160
|
-
natm = _sorted_mol.natm
|
|
161
|
-
nao_cart = _sorted_mol.nao
|
|
162
|
-
ao2atom = numpy.zeros([nao_cart, natm])
|
|
163
|
-
ao_loc = _sorted_mol.ao_loc
|
|
164
|
-
for ibas, iatm in enumerate(_sorted_mol._bas[:,gto.ATOM_OF]):
|
|
165
|
-
ao2atom[ao_loc[ibas]:ao_loc[ibas+1],iatm] = 1
|
|
166
|
-
ao2atom = cupy.asarray(ao2atom)
|
|
167
160
|
if with_j:
|
|
168
|
-
|
|
161
|
+
ej = -ej
|
|
162
|
+
ejaux -= ejaux_3c
|
|
169
163
|
if with_k:
|
|
170
|
-
|
|
164
|
+
ek = -ek
|
|
165
|
+
ekaux -= ekaux_3c
|
|
171
166
|
t0 = log.timer_debug1('(di,j|P) and (i,j|dP)', *t0)
|
|
172
|
-
|
|
173
|
-
_sorted_auxmol = intopt._sorted_auxmol
|
|
174
|
-
natm = _sorted_auxmol.natm
|
|
175
|
-
naux_cart = _sorted_auxmol.nao
|
|
176
|
-
aux2atom = numpy.zeros([naux_cart, natm])
|
|
177
|
-
ao_loc = _sorted_auxmol.ao_loc
|
|
178
|
-
for ibas, iatm in enumerate(_sorted_auxmol._bas[:,gto.ATOM_OF]):
|
|
179
|
-
aux2atom[ao_loc[ibas]:ao_loc[ibas+1],iatm] = 1
|
|
180
|
-
aux2atom = cupy.asarray(aux2atom)
|
|
181
|
-
if with_j:
|
|
182
|
-
vjaux_3c = aux2atom.T @ vjaux.T
|
|
183
|
-
vjaux = vjaux_2c - vjaux_3c
|
|
184
|
-
|
|
185
|
-
if with_k:
|
|
186
|
-
vkaux_3c = aux2atom.T @ vkaux.T
|
|
187
|
-
vkaux = vkaux_2c - vkaux_3c
|
|
188
|
-
return vj, vk, vjaux, vkaux
|
|
167
|
+
return ej, ek, ejaux, ekaux
|
|
189
168
|
|
|
190
169
|
|
|
191
170
|
class Gradients(rhf_grad.Gradients):
|
|
@@ -228,4 +207,4 @@ class Gradients(rhf_grad.Gradients):
|
|
|
228
207
|
else:
|
|
229
208
|
return 0
|
|
230
209
|
|
|
231
|
-
Grad = Gradients
|
|
210
|
+
Grad = Gradients
|
|
@@ -55,14 +55,14 @@ def get_veff(ks_grad, mol=None, dm=None, verbose=None):
|
|
|
55
55
|
mem_now = lib.current_memory()[0]
|
|
56
56
|
max_memory = max(2000, ks_grad.max_memory*.9-mem_now)
|
|
57
57
|
if ks_grad.grid_response:
|
|
58
|
-
exc,
|
|
58
|
+
exc, exc1 = rks_grad.get_exc_full_response(
|
|
59
59
|
ni, mol, grids, mf.xc, dm,
|
|
60
60
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
61
61
|
#logger.debug1(ks_grad, 'sum(grids response) %s', exc.sum(axis=0))
|
|
62
62
|
if mf.do_nlc():
|
|
63
63
|
raise NotImplementedError
|
|
64
64
|
else:
|
|
65
|
-
exc,
|
|
65
|
+
exc, exc1 = rks_grad.get_exc(
|
|
66
66
|
ni, mol, grids, mf.xc, dm,
|
|
67
67
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
68
68
|
if mf.do_nlc():
|
|
@@ -70,47 +70,42 @@ def get_veff(ks_grad, mol=None, dm=None, verbose=None):
|
|
|
70
70
|
xc = mf.xc
|
|
71
71
|
else:
|
|
72
72
|
xc = mf.nlc
|
|
73
|
-
enlc,
|
|
73
|
+
enlc, exc1_nlc = rks_grad.get_nlc_exc(
|
|
74
74
|
ni, mol, nlcgrids, xc, dm,
|
|
75
75
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
76
|
-
|
|
76
|
+
exc1 += exc1_nlc
|
|
77
77
|
t0 = logger.timer(ks_grad, 'vxc total', *t0)
|
|
78
78
|
|
|
79
|
-
# this can be moved into vxc calculations
|
|
80
|
-
occ_coeff = cupy.asarray(mf.mo_coeff[:, mf.mo_occ>0.5], order='C')
|
|
81
|
-
tmp = contract('nij,jk->nik', vxc, occ_coeff)
|
|
82
|
-
vxc = 2.0*contract('nik,ik->ni', tmp, occ_coeff)
|
|
83
|
-
|
|
84
79
|
aoslices = mol.aoslice_by_atom()
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
exc1 = [exc1[:,p0:p1].sum(axis=1) for p0, p1 in aoslices[:,2:]]
|
|
81
|
+
exc1 = cupy.asarray(exc1)
|
|
87
82
|
if abs(hyb) < 1e-10 and abs(alpha) < 1e-10:
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
ej, ejaux = ks_grad.get_j(mol, dm)
|
|
84
|
+
exc1 += ej
|
|
90
85
|
if ks_grad.auxbasis_response:
|
|
91
|
-
e1_aux =
|
|
86
|
+
e1_aux = ejaux
|
|
92
87
|
else:
|
|
93
|
-
|
|
88
|
+
ej, ek, ejaux, ekaux = ks_grad.get_jk(mol, dm)
|
|
94
89
|
|
|
95
90
|
if ks_grad.auxbasis_response:
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
ek_aux = ekaux * hyb
|
|
92
|
+
ek *= hyb
|
|
98
93
|
if abs(omega) > 1e-10: # For range separated Coulomb operator
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
ek_lr, ekaux_lr = ks_grad.get_k(mol, dm, omega=omega)
|
|
95
|
+
ek += ek_lr * (alpha - hyb)
|
|
101
96
|
if ks_grad.auxbasis_response:
|
|
102
|
-
|
|
97
|
+
ek_aux += ekaux_lr * (alpha - hyb)
|
|
103
98
|
|
|
104
|
-
|
|
99
|
+
exc1 += ej - ek * .5
|
|
105
100
|
if ks_grad.auxbasis_response:
|
|
106
|
-
e1_aux =
|
|
101
|
+
e1_aux = ejaux - ek_aux * .5
|
|
107
102
|
|
|
108
103
|
if ks_grad.auxbasis_response:
|
|
109
104
|
logger.debug1(ks_grad, 'sum(auxbasis response) %s', e1_aux.sum(axis=0))
|
|
110
105
|
else:
|
|
111
106
|
e1_aux = None
|
|
112
|
-
|
|
113
|
-
return
|
|
107
|
+
exc1 = tag_array(exc1, aux=e1_aux, exc1_grid=exc)
|
|
108
|
+
return exc1
|
|
114
109
|
|
|
115
110
|
class Gradients(rks_grad.Gradients):
|
|
116
111
|
from gpu4pyscf.lib.utils import to_gpu, device
|