gpu4pyscf 1.2.0__tar.gz → 1.2.1__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.2.1/LICENSE +201 -0
- gpu4pyscf-1.2.1/PKG-INFO +7 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/README.md +4 -3
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/__config__.py +14 -0
- gpu4pyscf-1.2.1/gpu4pyscf/__init__.py +17 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/cc/ccsd_incore.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/df/__init__.py +16 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/cderi.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/df.py +28 -28
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/df_jk.py +17 -16
- gpu4pyscf-1.2.1/gpu4pyscf/df/grad/__init__.py +20 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/grad/jk.py +15 -15
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/grad/rhf.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/grad/rks.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/grad/uhf.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/grad/uks.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/df/hessian/__init__.py +20 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/hessian/rhf.py +6 -9
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/hessian/rks.py +1 -8
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/hessian/uhf.py +8 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/hessian/uks.py +1 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/df/int3c2e.py +13 -14
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/gen_grid.py +1 -2
- gpu4pyscf-1.2.1/gpu4pyscf/dft/gks.py +30 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/libxc.py +16 -14
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/libxc_structs.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/numint.py +63 -65
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/radi.py +1 -2
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/rks.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/roks.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/uks.py +10 -13
- gpu4pyscf-1.2.1/gpu4pyscf/dft/xc_alias.py +26 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/xc_deriv.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/drivers/dft_driver.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/drivers/opt_driver.py +10 -10
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/fci/direct_spin1.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/grad/dispersion.py +29 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/grad/rhf.py +111 -73
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/grad/rks.py +42 -24
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/grad/uhf.py +13 -14
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/grad/uks.py +31 -18
- gpu4pyscf-1.2.1/gpu4pyscf/gto/__init__.py +13 -0
- gpu4pyscf-1.2.0/gpu4pyscf/gto/moleintor.py → gpu4pyscf-1.2.1/gpu4pyscf/gto/int3c1e.py +71 -43
- gpu4pyscf-1.2.1/gpu4pyscf/gto/int3c1e_ip.py +381 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/gto/mole.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/gto/moleintor.py +58 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/hessian/__init__.py +1 -2
- gpu4pyscf-1.2.1/gpu4pyscf/hessian/dispersion.py +28 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/hessian/rhf.py +372 -220
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/hessian/rks.py +39 -22
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/hessian/uhf.py +158 -98
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/hessian/uks.py +37 -20
- gpu4pyscf-1.2.1/gpu4pyscf/lib/__init__.py +25 -0
- gpu4pyscf-1.2.1/gpu4pyscf/lib/cublas.py +25 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/lib/cupy_helper.py +46 -18
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/lib/cusolver.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/lib/cutensor.py +13 -12
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/lib/diis.py +2 -3
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/lib/logger.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/lib/utils.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/mp/dfmp2.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/mp/mp2.py +11 -12
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/__init__.py +16 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/df/__init__.py +20 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/df/aft.py +210 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/df/aft_jk.py +350 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/df/df.py +182 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/df/df_jk.py +326 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/df/fft.py +16 -22
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/df/fft_jk.py +50 -21
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/dft/__init__.py +28 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/dft/gen_grid.py +11 -17
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/dft/krks.py +165 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/dft/kuks.py +164 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/dft/numint.py +237 -195
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/dft/rks.py +35 -50
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/dft/uks.py +150 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/scf/__init__.py +29 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/scf/hf.py +30 -29
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/scf/khf.py +408 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/scf/kuhf.py +321 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/scf/uhf.py +133 -0
- gpu4pyscf-1.2.1/gpu4pyscf/pbc/tools/__init__.py +15 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pbc/tools/pbc.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pop/esp.py +12 -13
- gpu4pyscf-1.2.1/gpu4pyscf/properties/__init__.py +15 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/properties/ir.py +22 -19
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/properties/polarizability.py +13 -15
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/properties/shielding.py +27 -21
- gpu4pyscf-1.2.1/gpu4pyscf/qmmm/__init__.py +15 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/qmmm/chelpg.py +16 -23
- gpu4pyscf-1.2.1/gpu4pyscf/qmmm/pbc/__init__.py +15 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/qmmm/pbc/itrf.py +16 -44
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/qmmm/pbc/mm_mole.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/qmmm/pbc/tools.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/scf/__init__.py +26 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/_response_functions.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/cphf.py +3 -4
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/diis.py +31 -16
- gpu4pyscf-1.2.1/gpu4pyscf/scf/dispersion.py +21 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/ghf.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/hf.py +11 -17
- gpu4pyscf-1.2.1/gpu4pyscf/scf/hf_symm.py +19 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/int2c2e.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/int4c2e.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/j_engine.py +21 -17
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/jk.py +195 -107
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/rohf.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/soscf.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/ucphf.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/scf/uhf.py +35 -66
- gpu4pyscf-1.2.1/gpu4pyscf/scf/uhf_symm.py +17 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/__init__.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/_attach_solvent.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/solvent/grad/__init__.py +13 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/grad/pcm.py +18 -31
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/grad/smd.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/grad/smd_experiment.py +11 -12
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/hessian/pcm.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/hessian/smd.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/hessian/smd_experiment.py +10 -11
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/pcm.py +24 -26
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/smd.py +15 -16
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/smd_experiment.py +10 -11
- gpu4pyscf-1.2.1/gpu4pyscf/tdscf/__init__.py +19 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/tdscf/_lr_eig.py +79 -55
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/tdscf/_uhf_resp_sf.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/tdscf/rhf.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/tdscf/rks.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/tdscf/uhf.py +10 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/tdscf/uks.py +10 -13
- gpu4pyscf-1.2.1/gpu4pyscf.egg-info/PKG-INFO +7 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf.egg-info/SOURCES.txt +12 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf.egg-info/requires.txt +1 -1
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/setup.py +14 -18
- gpu4pyscf-1.2.0/LICENSE +0 -675
- gpu4pyscf-1.2.0/PKG-INFO +0 -13
- gpu4pyscf-1.2.0/gpu4pyscf/__init__.py +0 -7
- gpu4pyscf-1.2.0/gpu4pyscf/df/__init__.py +0 -17
- gpu4pyscf-1.2.0/gpu4pyscf/df/grad/__init__.py +0 -21
- gpu4pyscf-1.2.0/gpu4pyscf/df/hessian/__init__.py +0 -21
- gpu4pyscf-1.2.0/gpu4pyscf/dft/gks.py +0 -33
- gpu4pyscf-1.2.0/gpu4pyscf/dft/xc_alias.py +0 -27
- gpu4pyscf-1.2.0/gpu4pyscf/grad/dispersion.py +0 -30
- gpu4pyscf-1.2.0/gpu4pyscf/gto/__init__.py +0 -14
- gpu4pyscf-1.2.0/gpu4pyscf/hessian/dispersion.py +0 -29
- gpu4pyscf-1.2.0/gpu4pyscf/lib/__init__.py +0 -26
- gpu4pyscf-1.2.0/gpu4pyscf/lib/cublas.py +0 -26
- gpu4pyscf-1.2.0/gpu4pyscf/pbc/__init__.py +0 -19
- gpu4pyscf-1.2.0/gpu4pyscf/pbc/df/__init__.py +0 -25
- gpu4pyscf-1.2.0/gpu4pyscf/pbc/dft/__init__.py +0 -31
- gpu4pyscf-1.2.0/gpu4pyscf/pbc/scf/__init__.py +0 -32
- gpu4pyscf-1.2.0/gpu4pyscf/pbc/tools/__init__.py +0 -18
- gpu4pyscf-1.2.0/gpu4pyscf/properties/__init__.py +0 -16
- gpu4pyscf-1.2.0/gpu4pyscf/qmmm/__init__.py +0 -16
- gpu4pyscf-1.2.0/gpu4pyscf/qmmm/pbc/__init__.py +0 -16
- gpu4pyscf-1.2.0/gpu4pyscf/scf/__init__.py +0 -29
- gpu4pyscf-1.2.0/gpu4pyscf/scf/dispersion.py +0 -22
- gpu4pyscf-1.2.0/gpu4pyscf/scf/hf_symm.py +0 -22
- gpu4pyscf-1.2.0/gpu4pyscf/scf/uhf_symm.py +0 -20
- gpu4pyscf-1.2.0/gpu4pyscf/solvent/grad/__init__.py +0 -14
- gpu4pyscf-1.2.0/gpu4pyscf/tdscf/__init__.py +0 -22
- gpu4pyscf-1.2.0/gpu4pyscf.egg-info/PKG-INFO +0 -13
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/MANIFEST.in +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/cc/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/dft/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/drivers/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/fci/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/grad/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/mp/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/pop/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf/solvent/hessian/__init__.py +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf.egg-info/dependency_links.txt +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/gpu4pyscf.egg-info/top_level.txt +0 -0
- {gpu4pyscf-1.2.0 → gpu4pyscf-1.2.1}/setup.cfg +0 -0
gpu4pyscf-1.2.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
gpu4pyscf-1.2.1/PKG-INFO
ADDED
|
@@ -41,7 +41,7 @@ The package also provides multiple dockerfiles in ```dockerfiles```. One can use
|
|
|
41
41
|
Features
|
|
42
42
|
--------
|
|
43
43
|
- Density fitting scheme and direct SCF scheme;
|
|
44
|
-
- SCF, analytical
|
|
44
|
+
- SCF, analytical gradient, and analytical Hessian calculations for Hartree-Fock and DFT;
|
|
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/);
|
|
@@ -49,12 +49,13 @@ Features
|
|
|
49
49
|
- Nonlocal functional correction (vv10) for SCF and gradient;
|
|
50
50
|
- ECP is supported and calculated on CPU;
|
|
51
51
|
- PCM models, SMD model, their analytical gradients, and semi-analytical Hessian matrix;
|
|
52
|
-
- Unrestricted Hartree-Fock and
|
|
52
|
+
- Unrestricted Hartree-Fock and unrestricted DFT, gradient, and Hessian;
|
|
53
53
|
- MP2/DF-MP2 and CCSD (experimental);
|
|
54
54
|
- Polarizability, IR, and NMR shielding (experimental);
|
|
55
55
|
- QM/MM with PBC;
|
|
56
56
|
- CHELPG, ESP, and RESP atomic charge;
|
|
57
|
-
- Multi-GPU for density fitting (experimental)
|
|
57
|
+
- Multi-GPU for both direct SCF and density fitting (experimental)
|
|
58
|
+
- SCF and DFT with periodic boundary condition (experimental)
|
|
58
59
|
|
|
59
60
|
Limitations
|
|
60
61
|
--------
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
import cupy
|
|
2
16
|
|
|
3
17
|
_num_devices = cupy.cuda.runtime.getDeviceCount()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
__version__ = '1.2.1'
|
|
16
|
+
|
|
17
|
+
from . import lib, grad, hessian, solvent, scf, dft
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
# Copyright 2024 The
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# (at your option) any later version.
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
7
6
|
#
|
|
8
|
-
#
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
'''
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from pyscf.df.addons import load, aug_etb, DEFAULT_AUXBASIS, make_auxbasis, make_auxmol
|
|
16
|
+
from .df import DF
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# (at your option) any later version.
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
7
6
|
#
|
|
8
|
-
#
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
15
14
|
|
|
16
15
|
import numpy as np
|
|
17
16
|
import cupy
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# (at your option) any later version.
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
7
6
|
#
|
|
8
|
-
#
|
|
9
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
-
# GNU General Public License for more details.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
8
|
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
import copy
|
|
@@ -86,7 +85,7 @@ class DF(lib.StreamObject):
|
|
|
86
85
|
j2c = cupy.asarray(j2c_cpu, order='C')
|
|
87
86
|
t0 = log.timer_debug1('2c2e', *t0)
|
|
88
87
|
intopt = int3c2e.VHFOpt(mol, auxmol, 'int2e')
|
|
89
|
-
intopt.build(direct_scf_tol, diag_block_with_triu=False, aosym=True,
|
|
88
|
+
intopt.build(direct_scf_tol, diag_block_with_triu=False, aosym=True,
|
|
90
89
|
group_size=GROUP_SIZE, group_size_aux=GROUP_SIZE)
|
|
91
90
|
log.timer_debug1('prepare intopt', *t0)
|
|
92
91
|
self.j2c = j2c.copy()
|
|
@@ -105,7 +104,7 @@ class DF(lib.StreamObject):
|
|
|
105
104
|
naux = self.naux = self.cd_low.shape[1]
|
|
106
105
|
log.debug('size of aux basis %d', naux)
|
|
107
106
|
|
|
108
|
-
self._cderi = cholesky_eri_gpu(intopt, mol, auxmol, self.cd_low,
|
|
107
|
+
self._cderi = cholesky_eri_gpu(intopt, mol, auxmol, self.cd_low,
|
|
109
108
|
omega=omega, use_gpu_memory=self.use_gpu_memory)
|
|
110
109
|
log.timer_debug1('cholesky_eri', *t0)
|
|
111
110
|
self.intopt = intopt
|
|
@@ -144,8 +143,8 @@ class DF(lib.StreamObject):
|
|
|
144
143
|
return blksize
|
|
145
144
|
|
|
146
145
|
def loop(self, blksize=None, unpack=True):
|
|
147
|
-
''' loop over cderi for the current device
|
|
148
|
-
and unpack the CDERI in (Lij) format
|
|
146
|
+
''' loop over cderi for the current device
|
|
147
|
+
and unpack the CDERI in (Lij) format
|
|
149
148
|
'''
|
|
150
149
|
device_id = cupy.cuda.Device().id
|
|
151
150
|
cderi_sparse = self._cderi[device_id]
|
|
@@ -177,10 +176,10 @@ class DF(lib.StreamObject):
|
|
|
177
176
|
yield buf2, buf.T
|
|
178
177
|
if isinstance(cderi_sparse, np.ndarray):
|
|
179
178
|
cupy.cuda.Device().synchronize()
|
|
180
|
-
|
|
179
|
+
|
|
181
180
|
if buf_prefetch is not None:
|
|
182
181
|
buf = buf_prefetch
|
|
183
|
-
|
|
182
|
+
|
|
184
183
|
def reset(self, mol=None):
|
|
185
184
|
'''Reset mol and clean up relevant attributes for scanner mode'''
|
|
186
185
|
if mol is not None:
|
|
@@ -198,7 +197,7 @@ class DF(lib.StreamObject):
|
|
|
198
197
|
get_ao_eri = get_eri = NotImplemented
|
|
199
198
|
get_mo_eri = ao2mo = NotImplemented
|
|
200
199
|
|
|
201
|
-
def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
200
|
+
def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
202
201
|
omega=None, sr_only=False, use_gpu_memory=True):
|
|
203
202
|
'''
|
|
204
203
|
Returns:
|
|
@@ -210,13 +209,13 @@ def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
|
210
209
|
|
|
211
210
|
# Available memory on Device 0.
|
|
212
211
|
avail_mem = get_avail_mem()
|
|
213
|
-
|
|
212
|
+
|
|
214
213
|
if use_gpu_memory:
|
|
215
214
|
# CDERI will be equally distributed to the devices
|
|
216
215
|
# Other devices usually have more memory available than Device 0
|
|
217
216
|
# CDERI will use up to 40% of the available memory
|
|
218
217
|
use_gpu_memory = naux * npairs * 8 < 0.4 * avail_mem * _num_devices
|
|
219
|
-
|
|
218
|
+
|
|
220
219
|
if use_gpu_memory:
|
|
221
220
|
log.debug("Saving CDERI on GPU")
|
|
222
221
|
else:
|
|
@@ -235,7 +234,7 @@ def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
|
235
234
|
_cderi[device_id] = cderi_blk
|
|
236
235
|
|
|
237
236
|
npairs_per_ctr = [len(intopt.ao_pairs_row[cp_ij_id]) for cp_ij_id in range(len(intopt.log_qs))]
|
|
238
|
-
|
|
237
|
+
|
|
239
238
|
npairs_per_ctr = np.array(npairs_per_ctr)
|
|
240
239
|
total_task_list = np.argsort(npairs_per_ctr)
|
|
241
240
|
task_list_per_device = []
|
|
@@ -253,13 +252,13 @@ def cholesky_eri_gpu(intopt, mol, auxmol, cd_low,
|
|
|
253
252
|
future = executor.submit(_cderi_task, intopt, cd_low_f, task_list, _cderi,
|
|
254
253
|
omega=omega, sr_only=sr_only, device_id=device_id)
|
|
255
254
|
futures.append(future)
|
|
256
|
-
|
|
255
|
+
|
|
257
256
|
for future in futures:
|
|
258
257
|
future.result()
|
|
259
|
-
|
|
258
|
+
|
|
260
259
|
if not use_gpu_memory:
|
|
261
260
|
cupy.cuda.Device().synchronize()
|
|
262
|
-
|
|
261
|
+
|
|
263
262
|
return _cderi
|
|
264
263
|
|
|
265
264
|
def _cderi_task(intopt, cd_low, task_list, _cderi, omega=None, sr_only=False, device_id=0):
|
|
@@ -273,6 +272,7 @@ def _cderi_task(intopt, cd_low, task_list, _cderi, omega=None, sr_only=False, de
|
|
|
273
272
|
pairs_loc = np.append(0, np.cumsum(npairs))
|
|
274
273
|
blksize = (naux + _num_devices - 1) // _num_devices
|
|
275
274
|
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
275
|
+
assert isinstance(mol.verbose, int)
|
|
276
276
|
log = logger.new_logger(mol, mol.verbose)
|
|
277
277
|
t1 = log.init_timer()
|
|
278
278
|
cd_low_tag = cd_low.tag
|
|
@@ -320,7 +320,7 @@ def _cderi_task(intopt, cd_low, task_list, _cderi, omega=None, sr_only=False, de
|
|
|
320
320
|
|
|
321
321
|
row = intopt.ao_pairs_row[cp_ij_id] - i0
|
|
322
322
|
col = intopt.ao_pairs_col[cp_ij_id] - j0
|
|
323
|
-
|
|
323
|
+
|
|
324
324
|
ints_slices_f= cupy.empty([naoaux,len(row)], order='F')
|
|
325
325
|
ints_slices_f[:] = ints_slices[:,col,row]
|
|
326
326
|
ints_slices = None
|
|
@@ -330,12 +330,12 @@ def _cderi_task(intopt, cd_low, task_list, _cderi, omega=None, sr_only=False, de
|
|
|
330
330
|
elif cd_low_tag == 'cd':
|
|
331
331
|
cderi_block = solve_triangular(cd_low, ints_slices_f, lower=True, overwrite_b=True)
|
|
332
332
|
else:
|
|
333
|
-
RuntimeError('Tag is not found in lower triangular matrix.')
|
|
333
|
+
raise RuntimeError('Tag is not found in lower triangular matrix.')
|
|
334
334
|
t1 = log.timer_debug1(f'solve {cp_ij_id} / {nq} on Device {device_id}', *t1)
|
|
335
335
|
|
|
336
|
-
# TODO:
|
|
336
|
+
# TODO:
|
|
337
337
|
# 1) async data transfer
|
|
338
|
-
# 2) auxiliary basis in the last dimension
|
|
338
|
+
# 2) auxiliary basis in the last dimension
|
|
339
339
|
|
|
340
340
|
# if CDERI is saved on CPU
|
|
341
341
|
ij0 = pairs_loc[cp_ij_id]
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# it under the terms of the GNU General Public License as published by
|
|
6
|
-
# the Free Software Foundation, either version 3 of the License, or
|
|
7
|
-
# (at your option) any later version.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
8
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
# You should have received a copy of the GNU General Public License
|
|
15
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
16
14
|
#
|
|
17
15
|
# Author: Qiming Sun <osirpt.sun@gmail.com>
|
|
18
16
|
# Modified by Xiaojie Wu <wxj6000@gmail.com>
|
|
@@ -249,6 +247,7 @@ def _jk_task_with_mo(dfobj, dms, mo_coeff, mo_occ,
|
|
|
249
247
|
''' Calculate J and K matrices on single GPU
|
|
250
248
|
'''
|
|
251
249
|
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
250
|
+
assert isinstance(dfobj.verbose, int)
|
|
252
251
|
log = logger.new_logger(dfobj.mol, dfobj.verbose)
|
|
253
252
|
t0 = log.init_timer()
|
|
254
253
|
dms = cupy.asarray(dms)
|
|
@@ -313,6 +312,7 @@ def _jk_task_with_mo1(dfobj, dms, mo1s, occ_coeffs,
|
|
|
313
312
|
'''
|
|
314
313
|
vj = vk = None
|
|
315
314
|
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
315
|
+
assert isinstance(dfobj.verbose, int)
|
|
316
316
|
log = logger.new_logger(dfobj.mol, dfobj.verbose)
|
|
317
317
|
t0 = log.init_timer()
|
|
318
318
|
dms = cupy.asarray(dms)
|
|
@@ -373,6 +373,7 @@ def _jk_task_with_dm(dfobj, dms, with_j=True, with_k=True, hermi=0, device_id=0)
|
|
|
373
373
|
''' Calculate J and K matrices with density matrix
|
|
374
374
|
'''
|
|
375
375
|
with cupy.cuda.Device(device_id), _streams[device_id]:
|
|
376
|
+
assert isinstance(dfobj.verbose, int)
|
|
376
377
|
log = logger.new_logger(dfobj.mol, dfobj.verbose)
|
|
377
378
|
t0 = log.init_timer()
|
|
378
379
|
dms = cupy.asarray(dms)
|
|
@@ -404,7 +405,7 @@ def _jk_task_with_dm(dfobj, dms, with_j=True, with_k=True, hermi=0, device_id=0)
|
|
|
404
405
|
for k in range(nset):
|
|
405
406
|
rhok = contract('Lij,jk->Lki', cderi, dms[k]).reshape([-1,nao])
|
|
406
407
|
#vk[k] += contract('Lki,Lkj->ij', rhok, cderi)
|
|
407
|
-
vk[k] += cupy.dot(rhok.T, cderi.reshape([-1,nao]))
|
|
408
|
+
vk[k] += cupy.dot(rhok.T, cderi.reshape([-1,nao]))
|
|
408
409
|
if with_j:
|
|
409
410
|
vj = cupy.zeros(dms_shape)
|
|
410
411
|
vj[:,rows,cols] = vj_sparse
|
|
@@ -437,7 +438,7 @@ def get_jk(dfobj, dms_tag, hermi=0, with_j=True, with_k=True, direct_scf_tol=1e-
|
|
|
437
438
|
|
|
438
439
|
assert nao == dfobj.nao
|
|
439
440
|
intopt = dfobj.intopt
|
|
440
|
-
|
|
441
|
+
|
|
441
442
|
nao = dms_tag.shape[-1]
|
|
442
443
|
dms = dms_tag.reshape([-1,nao,nao])
|
|
443
444
|
intopt = dfobj.intopt
|
|
@@ -456,7 +457,7 @@ def get_jk(dfobj, dms_tag, hermi=0, with_j=True, with_k=True, direct_scf_tol=1e-
|
|
|
456
457
|
with ThreadPoolExecutor(max_workers=_num_devices) as executor:
|
|
457
458
|
for device_id in range(_num_devices):
|
|
458
459
|
future = executor.submit(
|
|
459
|
-
_jk_task_with_mo,
|
|
460
|
+
_jk_task_with_mo,
|
|
460
461
|
dfobj, dms, mo_coeff, mo_occ,
|
|
461
462
|
hermi=hermi, device_id=device_id,
|
|
462
463
|
with_j=with_j, with_k=with_k)
|
|
@@ -477,7 +478,7 @@ def get_jk(dfobj, dms_tag, hermi=0, with_j=True, with_k=True, direct_scf_tol=1e-
|
|
|
477
478
|
with ThreadPoolExecutor(max_workers=_num_devices) as executor:
|
|
478
479
|
for device_id in range(_num_devices):
|
|
479
480
|
future = executor.submit(
|
|
480
|
-
_jk_task_with_mo1,
|
|
481
|
+
_jk_task_with_mo1,
|
|
481
482
|
dfobj, dms, mo1s, occ_coeffs,
|
|
482
483
|
hermi=hermi, device_id=device_id,
|
|
483
484
|
with_j=with_j, with_k=with_k)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Copyright 2021-2024 The PySCF Developers. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from . import rhf, rks, uhf, uks
|
|
16
|
+
|
|
17
|
+
RHF = rhf.Gradients
|
|
18
|
+
RKS = rks.Gradients
|
|
19
|
+
UHF = uhf.Gradients
|
|
20
|
+
UKS = uks.Gradients
|