pyscf 2.5.0__py3-none-macosx_11_0_arm64.whl → 2.6.1__py3-none-macosx_11_0_arm64.whl
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.
- pyscf/__init__.py +1 -1
- pyscf/adc/__init__.py +0 -2
- pyscf/ao2mo/nrr_outcore.py +3 -3
- pyscf/ao2mo/outcore.py +9 -9
- pyscf/ao2mo/r_outcore.py +3 -3
- pyscf/ao2mo/semi_incore.py +2 -2
- pyscf/cc/__init__.py +1 -7
- pyscf/cc/ccsd.py +9 -0
- pyscf/cc/ccsd_t.py +1 -1
- pyscf/cc/ccsd_t_slow.py +1 -1
- pyscf/cc/dfccsd.py +2 -0
- pyscf/cc/gccsd.py +2 -0
- pyscf/cc/qcisd_t_slow.py +1 -1
- pyscf/cc/uccsd.py +2 -0
- pyscf/ci/cisd.py +2 -0
- pyscf/df/addons.py +1 -1
- pyscf/df/df.py +2 -4
- pyscf/df/df_jk.py +11 -9
- pyscf/df/grad/casdm2_util.py +1 -1
- pyscf/df/grad/casscf.py +2 -0
- pyscf/df/grad/rhf.py +9 -9
- pyscf/df/grad/rks.py +6 -9
- pyscf/df/grad/sacasscf.py +2 -0
- pyscf/df/grad/uhf.py +4 -3
- pyscf/df/grad/uks.py +5 -5
- pyscf/df/hessian/rhf.py +9 -6
- pyscf/df/hessian/rks.py +2 -6
- pyscf/df/hessian/uhf.py +3 -3
- pyscf/df/hessian/uks.py +2 -2
- pyscf/df/incore.py +8 -5
- pyscf/df/outcore.py +19 -6
- pyscf/dft/LebedevGrid.py +5047 -0
- pyscf/dft/__init__.py +1 -10
- pyscf/dft/dft_parser.py +24 -0
- pyscf/dft/dks.py +10 -1
- pyscf/dft/gen_grid.py +3 -44
- pyscf/dft/gks.py +2 -3
- pyscf/dft/gks_symm.py +3 -0
- pyscf/dft/libxc.py +14 -3
- pyscf/dft/numint.py +5 -4
- pyscf/dft/rks.py +39 -13
- pyscf/dft/rks_symm.py +6 -1
- pyscf/dft/roks.py +1 -8
- pyscf/dft/uks.py +2 -8
- pyscf/dft/uks_symm.py +3 -0
- pyscf/dft/xc_deriv.py +4 -3
- pyscf/dft/xcfun.py +9 -0
- pyscf/fci/addons.py +17 -14
- pyscf/fci/direct_nosym.py +45 -56
- pyscf/fci/direct_spin0.py +4 -2
- pyscf/fci/direct_spin1.py +9 -5
- pyscf/geomopt/__init__.py +1 -1
- pyscf/grad/__init__.py +1 -1
- pyscf/grad/casci.py +2 -0
- pyscf/grad/casscf.py +2 -0
- pyscf/grad/ccsd.py +2 -0
- pyscf/grad/cisd.py +2 -0
- pyscf/grad/dhf.py +2 -0
- pyscf/grad/dispersion.py +34 -27
- pyscf/grad/mp2.py +2 -0
- pyscf/grad/rhf.py +9 -6
- pyscf/grad/rks.py +4 -11
- pyscf/grad/tdrhf.py +2 -0
- pyscf/grad/uhf.py +0 -3
- pyscf/grad/uks.py +2 -6
- pyscf/gto/__init__.py +0 -1
- pyscf/gto/basis/__init__.py +0 -1
- pyscf/gto/eval_gto.py +11 -2
- pyscf/gto/mole.py +35 -31
- pyscf/gto/moleintor.py +1 -0
- pyscf/gw/rpa.py +235 -94
- pyscf/gw/urpa.py +135 -127
- pyscf/hessian/__init__.py +1 -1
- pyscf/hessian/dispersion.py +43 -33
- pyscf/hessian/rhf.py +12 -9
- pyscf/hessian/rks.py +2 -5
- pyscf/hessian/uhf.py +2 -4
- pyscf/hessian/uks.py +1 -4
- pyscf/lib/CMakeLists.txt +46 -1
- pyscf/lib/chkfile.py +3 -2
- pyscf/lib/dft/CMakeLists.txt +9 -5
- pyscf/lib/dft/grid_collocate.c +655 -0
- pyscf/lib/dft/grid_common.c +660 -0
- pyscf/lib/dft/grid_common.h +109 -0
- pyscf/lib/dft/grid_integrate.c +1358 -0
- pyscf/lib/dft/libxc_itrf.c +252 -38
- pyscf/lib/dft/multigrid.c +744 -0
- pyscf/lib/dft/multigrid.h +72 -0
- pyscf/lib/dft/utils.c +71 -0
- pyscf/lib/dft/utils.h +27 -0
- pyscf/lib/diis.py +2 -0
- pyscf/lib/libagf2.dylib +0 -0
- pyscf/lib/libao2mo.dylib +0 -0
- pyscf/lib/libcc.dylib +0 -0
- pyscf/lib/libcgto.dylib +0 -0
- pyscf/lib/libcvhf.dylib +0 -0
- pyscf/lib/libdft.dylib +0 -0
- pyscf/lib/libfci.dylib +0 -0
- pyscf/lib/libmcscf.dylib +0 -0
- pyscf/lib/libnp_helper.dylib +0 -0
- pyscf/lib/libpbc.dylib +0 -0
- pyscf/lib/libri.dylib +0 -0
- pyscf/lib/libxc_itrf.dylib +0 -0
- pyscf/lib/libxcfun_itrf.dylib +0 -0
- pyscf/lib/linalg_helper.py +1 -1
- pyscf/lib/mcscf/fci_string.c +1 -6
- pyscf/lib/misc.py +179 -24
- pyscf/lib/np_helper/np_helper.h +7 -0
- pyscf/lib/numpy_helper.py +9 -2
- pyscf/lib/parameters.py +1 -0
- pyscf/lib/pbc/CMakeLists.txt +11 -1
- pyscf/lib/pbc/cell.c +280 -0
- pyscf/lib/pbc/cell.h +29 -0
- pyscf/lib/pbc/fft.c +147 -0
- pyscf/lib/pbc/fft.h +26 -0
- pyscf/lib/pbc/fill_ints.c +3 -3
- pyscf/lib/pbc/fill_ints.h +29 -0
- pyscf/lib/pbc/fill_ints_screened.c +1012 -0
- pyscf/lib/pbc/hf_grad.c +95 -0
- pyscf/lib/pbc/neighbor_list.c +206 -0
- pyscf/lib/pbc/neighbor_list.h +41 -0
- pyscf/lib/pbc/optimizer.c +37 -1
- pyscf/lib/pbc/optimizer.h +3 -3
- pyscf/lib/pbc/pp.c +448 -0
- pyscf/lib/solvent/CMakeLists.txt +38 -0
- pyscf/mcscf/__init__.py +9 -23
- pyscf/mcscf/casci.py +3 -1
- pyscf/mcscf/casci_symm.py +3 -1
- pyscf/mcscf/chkfile.py +3 -2
- pyscf/mcscf/mc1step.py +8 -6
- pyscf/mcscf/newton_casscf_symm.py +1 -1
- pyscf/mcscf/ucasci.py +1 -1
- pyscf/mcscf/umc1step.py +1 -1
- pyscf/mp/__init__.py +1 -1
- pyscf/mp/dfgmp2.py +2 -2
- pyscf/mp/dfmp2.py +2 -2
- pyscf/mp/dfmp2_native.py +2 -0
- pyscf/mp/dfump2_native.py +2 -0
- pyscf/mp/gmp2.py +4 -2
- pyscf/mp/mp2.py +44 -12
- pyscf/mp/ump2.py +50 -19
- pyscf/mrpt/nevpt2.py +1 -1
- pyscf/pbc/adc/__init__.py +0 -1
- pyscf/pbc/cc/kccsd.py +2 -0
- pyscf/pbc/cc/kccsd_rhf.py +2 -0
- pyscf/pbc/cc/kccsd_t_rhf.py +1 -1
- pyscf/pbc/cc/kccsd_uhf.py +2 -0
- pyscf/pbc/df/aft.py +1 -1
- pyscf/pbc/df/aft_jk.py +1 -1
- pyscf/pbc/df/df.py +5 -0
- pyscf/pbc/df/df_jk.py +4 -7
- pyscf/pbc/df/fft.py +5 -0
- pyscf/pbc/df/incore.py +244 -0
- pyscf/pbc/df/mdf.py +3 -0
- pyscf/pbc/df/mdf_jk.py +0 -3
- pyscf/pbc/df/outcore.py +4 -4
- pyscf/pbc/df/rsdf.py +7 -4
- pyscf/pbc/df/rsdf_builder.py +3 -4
- pyscf/pbc/df/rsdf_helper.py +2 -2
- pyscf/pbc/dft/__init__.py +0 -12
- pyscf/pbc/dft/gen_grid.py +4 -0
- pyscf/pbc/dft/gks.py +4 -2
- pyscf/pbc/dft/kgks.py +16 -4
- pyscf/pbc/dft/krks.py +15 -25
- pyscf/pbc/dft/krks_ksymm.py +5 -5
- pyscf/pbc/dft/kroks.py +9 -19
- pyscf/pbc/dft/kuks.py +14 -24
- pyscf/pbc/dft/kuks_ksymm.py +5 -5
- pyscf/pbc/dft/multigrid/__init__.py +57 -0
- pyscf/pbc/dft/{multigrid.py → multigrid/multigrid.py} +86 -93
- pyscf/pbc/dft/multigrid/multigrid_pair.py +1405 -0
- pyscf/pbc/dft/multigrid/pp.py +290 -0
- pyscf/pbc/dft/multigrid/utils.py +70 -0
- pyscf/pbc/dft/numint.py +5 -1
- pyscf/pbc/dft/numint2c.py +1 -0
- pyscf/pbc/dft/rks.py +8 -7
- pyscf/pbc/dft/roks.py +2 -0
- pyscf/pbc/dft/uks.py +6 -4
- pyscf/pbc/grad/__init__.py +5 -2
- pyscf/pbc/grad/krhf.py +7 -1
- pyscf/pbc/grad/rhf.py +167 -0
- pyscf/pbc/grad/rks.py +24 -0
- pyscf/pbc/grad/uhf.py +92 -0
- pyscf/pbc/grad/uks.py +24 -0
- pyscf/pbc/gto/__init__.py +1 -0
- pyscf/pbc/gto/_pbcintor.py +14 -7
- pyscf/pbc/gto/cell.py +218 -20
- pyscf/pbc/gto/ewald_methods.py +293 -0
- pyscf/pbc/gto/neighborlist.py +199 -0
- pyscf/pbc/gto/pseudo/pp_int.py +350 -17
- pyscf/pbc/lib/kpts.py +1 -1
- pyscf/pbc/mp/kmp2.py +2 -0
- pyscf/pbc/scf/__init__.py +0 -10
- pyscf/pbc/scf/addons.py +11 -5
- pyscf/pbc/scf/ghf.py +3 -0
- pyscf/pbc/scf/hf.py +30 -19
- pyscf/pbc/scf/kghf.py +4 -0
- pyscf/pbc/scf/khf.py +9 -6
- pyscf/pbc/scf/khf_ksymm.py +5 -3
- pyscf/pbc/scf/krohf.py +1 -0
- pyscf/pbc/scf/kuhf.py +5 -2
- pyscf/pbc/scf/kuhf_ksymm.py +4 -2
- pyscf/pbc/scf/rohf.py +1 -0
- pyscf/pbc/scf/rsjk.py +2 -0
- pyscf/pbc/scf/uhf.py +7 -3
- pyscf/pbc/symm/geom.py +1 -1
- pyscf/pbc/symm/pyscf_spglib.py +1 -1
- pyscf/pbc/symm/symmetry.py +1 -1
- pyscf/pbc/tools/pbc.py +51 -8
- pyscf/qmmm/itrf.py +12 -0
- pyscf/scf/__init__.py +1 -7
- pyscf/scf/_response_functions.py +3 -3
- pyscf/scf/addons.py +12 -6
- pyscf/scf/atom_hf.py +15 -2
- pyscf/scf/atom_hf_pp.py +154 -0
- pyscf/scf/chkfile.py +2 -1
- pyscf/scf/dhf.py +5 -7
- pyscf/scf/diis.py +4 -8
- pyscf/scf/dispersion.py +136 -39
- pyscf/scf/ghf.py +3 -7
- pyscf/scf/ghf_symm.py +1 -2
- pyscf/scf/hf.py +46 -31
- pyscf/scf/hf_symm.py +2 -4
- pyscf/scf/rohf.py +1 -3
- pyscf/scf/ucphf.py +1 -1
- pyscf/scf/uhf.py +7 -8
- pyscf/scf/uhf_symm.py +1 -2
- pyscf/sgx/sgx.py +5 -0
- pyscf/solvent/__init__.py +25 -1
- pyscf/solvent/_attach_solvent.py +49 -3
- pyscf/solvent/_ddcosmo_tdscf_grad.py +1 -1
- pyscf/solvent/ddcosmo.py +5 -4
- pyscf/solvent/ddpcm.py +1 -0
- pyscf/solvent/grad/__init__.py +17 -0
- pyscf/solvent/grad/pcm.py +384 -0
- pyscf/solvent/grad/smd.py +176 -0
- pyscf/solvent/grad/smd_experiment.py +216 -0
- pyscf/solvent/hessian/__init__.py +0 -0
- pyscf/solvent/hessian/pcm.py +230 -0
- pyscf/solvent/hessian/smd.py +171 -0
- pyscf/solvent/hessian/smd_experiment.py +208 -0
- pyscf/solvent/pcm.py +137 -56
- pyscf/solvent/smd.py +433 -0
- pyscf/solvent/smd_experiment.py +273 -0
- pyscf/soscf/newton_ah.py +3 -0
- pyscf/symm/geom.py +3 -7
- pyscf/tdscf/common_slow.py +1 -4
- pyscf/tdscf/dhf.py +1 -1
- pyscf/tdscf/ghf.py +1 -1
- pyscf/tdscf/rhf.py +8 -1
- pyscf/tdscf/uhf.py +5 -1
- pyscf/tools/chgcar.py +1 -5
- pyscf/x2c/sfx2c1e.py +7 -2
- pyscf/x2c/tdscf.py +1 -1
- pyscf/x2c/x2c.py +8 -0
- pyscf-2.6.1.dist-info/METADATA +140 -0
- {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/NOTICE +4 -0
- {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/RECORD +262 -220
- {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/WHEEL +1 -1
- pyscf-2.5.0.dist-info/METADATA +0 -81
- /pyscf/solvent/{ddcosmo_grad.py → grad/ddcosmo_grad.py} +0 -0
- {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/LICENSE +0 -0
- {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/top_level.txt +0 -0
pyscf/__init__.py
CHANGED
pyscf/adc/__init__.py
CHANGED
|
@@ -70,8 +70,6 @@ def UADC(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
|
70
70
|
UADC.__doc__ = uadc.UADC.__doc__
|
|
71
71
|
|
|
72
72
|
def RADC(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
73
|
-
__doc__ = radc.RADC.__doc__
|
|
74
|
-
|
|
75
73
|
if not (frozen is None or frozen == 0):
|
|
76
74
|
raise NotImplementedError
|
|
77
75
|
|
pyscf/ao2mo/nrr_outcore.py
CHANGED
|
@@ -95,11 +95,11 @@ def general(mol, mo_coeffs, erifile, dataname='eri_mo',
|
|
|
95
95
|
|
|
96
96
|
if isinstance(erifile, str):
|
|
97
97
|
if h5py.is_hdf5(erifile):
|
|
98
|
-
feri =
|
|
98
|
+
feri = lib.H5FileWrap(erifile, 'a')
|
|
99
99
|
if dataname in feri:
|
|
100
100
|
del(feri[dataname])
|
|
101
101
|
else:
|
|
102
|
-
feri =
|
|
102
|
+
feri = lib.H5FileWrap(erifile, 'w')
|
|
103
103
|
else:
|
|
104
104
|
assert(isinstance(erifile, h5py.Group))
|
|
105
105
|
feri = erifile
|
|
@@ -250,7 +250,7 @@ def half_e1(mol, mo_coeffs, swapfile,
|
|
|
250
250
|
log.debug('step1: (ij,kl) = (%d,%d), mem cache %.8g MB, iobuf %.8g MB',
|
|
251
251
|
nij_pair, nao_pair, mem_words*16/1e6, iobuf_words*16/1e6)
|
|
252
252
|
|
|
253
|
-
fswap =
|
|
253
|
+
fswap = lib.H5FileWrap(swapfile, 'w')
|
|
254
254
|
for icomp in range(comp):
|
|
255
255
|
fswap.create_group(str(icomp)) # for h5py old version
|
|
256
256
|
|
pyscf/ao2mo/outcore.py
CHANGED
|
@@ -238,11 +238,11 @@ def general(mol, mo_coeffs, erifile, dataname='eri_mo',
|
|
|
238
238
|
|
|
239
239
|
if isinstance(erifile, str):
|
|
240
240
|
if h5py.is_hdf5(erifile):
|
|
241
|
-
feri =
|
|
241
|
+
feri = lib.H5FileWrap(erifile, 'a')
|
|
242
242
|
if dataname in feri:
|
|
243
243
|
del (feri[dataname])
|
|
244
244
|
else:
|
|
245
|
-
feri =
|
|
245
|
+
feri = lib.H5FileWrap(erifile, 'w')
|
|
246
246
|
else:
|
|
247
247
|
assert (isinstance(erifile, h5py.Group))
|
|
248
248
|
feri = erifile
|
|
@@ -431,7 +431,7 @@ def half_e1(mol, mo_coeffs, swapfile,
|
|
|
431
431
|
if isinstance(swapfile, h5py.Group):
|
|
432
432
|
fswap = swapfile
|
|
433
433
|
else:
|
|
434
|
-
fswap = lib.
|
|
434
|
+
fswap = lib.H5FileWrap(swapfile, 'a')
|
|
435
435
|
for icomp in range(comp):
|
|
436
436
|
fswap.create_group(str(icomp)) # for h5py old version
|
|
437
437
|
|
|
@@ -486,16 +486,16 @@ def _load_from_h5g(h5group, row0, row1, out=None):
|
|
|
486
486
|
out = numpy.ndarray((row1-row0, ncol), dat.dtype, buffer=out)
|
|
487
487
|
col1 = 0
|
|
488
488
|
for key in range(nkeys):
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
col0, col1 = col1, col1 + h5group[str(key)].shape[1]
|
|
490
|
+
h5group[str(key)].read_direct(out, dest_sel=numpy.s_[:,col0:col1],
|
|
491
|
+
source_sel=numpy.s_[row0:row1])
|
|
492
492
|
else: # multiple components
|
|
493
493
|
out = numpy.ndarray((dat.shape[0], row1-row0, ncol), dat.dtype, buffer=out)
|
|
494
494
|
col1 = 0
|
|
495
495
|
for key in range(nkeys):
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
col0, col1 = col1, col1 + h5group[str(key)].shape[2]
|
|
497
|
+
h5group[str(key)].read_direct(out, dest_sel=numpy.s_[:,:,col0:col1],
|
|
498
|
+
source_sel=numpy.s_[:,row0:row1])
|
|
499
499
|
return out
|
|
500
500
|
|
|
501
501
|
def _transpose_to_h5g(h5group, key, dat, blksize, chunks=None):
|
pyscf/ao2mo/r_outcore.py
CHANGED
|
@@ -74,11 +74,11 @@ def general(mol, mo_coeffs, erifile, dataname='eri_mo',
|
|
|
74
74
|
|
|
75
75
|
if isinstance(erifile, str):
|
|
76
76
|
if h5py.is_hdf5(erifile):
|
|
77
|
-
feri =
|
|
77
|
+
feri = lib.H5FileWrap(erifile, 'a')
|
|
78
78
|
if dataname in feri:
|
|
79
79
|
del (feri[dataname])
|
|
80
80
|
else:
|
|
81
|
-
feri =
|
|
81
|
+
feri = lib.H5FileWrap(erifile, 'w')
|
|
82
82
|
else:
|
|
83
83
|
assert (isinstance(erifile, h5py.Group))
|
|
84
84
|
feri = erifile
|
|
@@ -214,7 +214,7 @@ def half_e1(mol, mo_coeffs, swapfile,
|
|
|
214
214
|
log.debug('step1: (ij,kl) = (%d,%d), mem cache %.8g MB, iobuf %.8g MB',
|
|
215
215
|
nij_pair, nao_pair, mem_words*16/1e6, iobuf_words*16/1e6)
|
|
216
216
|
|
|
217
|
-
fswap =
|
|
217
|
+
fswap = lib.H5FileWrap(swapfile, 'w')
|
|
218
218
|
for icomp in range(comp):
|
|
219
219
|
fswap.create_group(str(icomp)) # for h5py old version
|
|
220
220
|
|
pyscf/ao2mo/semi_incore.py
CHANGED
|
@@ -140,11 +140,11 @@ def general(eri, mo_coeffs, erifile, dataname='eri_mo',
|
|
|
140
140
|
|
|
141
141
|
if isinstance(erifile, str):
|
|
142
142
|
if h5py.is_hdf5(erifile):
|
|
143
|
-
feri =
|
|
143
|
+
feri = lib.H5FileWrap(erifile, 'a')
|
|
144
144
|
if dataname in feri:
|
|
145
145
|
del (feri[dataname])
|
|
146
146
|
else:
|
|
147
|
-
feri =
|
|
147
|
+
feri = lib.H5FileWrap(erifile,'w', libver='latest')
|
|
148
148
|
else:
|
|
149
149
|
assert (isinstance(erifile, h5py.Group))
|
|
150
150
|
feri = erifile
|
pyscf/cc/__init__.py
CHANGED
|
@@ -194,15 +194,9 @@ def FNOCCSD(mf, thresh=1e-6, pct_occ=None, nvir_act=None, frozen=None):
|
|
|
194
194
|
Number of virtual NOs to keep. Default is None. If present, overrides `thresh` and `pct_occ`.
|
|
195
195
|
"""
|
|
196
196
|
import numpy
|
|
197
|
-
if frozen is None:
|
|
198
|
-
frozenocc = 0
|
|
199
|
-
else:
|
|
200
|
-
assert(isinstance(frozen, (int,numpy.int64)))
|
|
201
|
-
frozenocc = frozen
|
|
202
197
|
from pyscf import mp
|
|
203
|
-
pt = mp.MP2(mf).set(verbose=0).run()
|
|
198
|
+
pt = mp.MP2(mf, frozen=frozen).set(verbose=0).run()
|
|
204
199
|
frozen, no_coeff = pt.make_fno(thresh=thresh, pct_occ=pct_occ, nvir_act=nvir_act)
|
|
205
|
-
frozen = numpy.hstack([numpy.arange(frozenocc),frozen])
|
|
206
200
|
if len(frozen) == 0: frozen = None
|
|
207
201
|
pt_no = mp.MP2(mf, frozen=frozen, mo_coeff=no_coeff).set(verbose=0).run()
|
|
208
202
|
mycc = CCSD(mf, frozen=frozen, mo_coeff=no_coeff)
|
pyscf/cc/ccsd.py
CHANGED
|
@@ -1240,6 +1240,15 @@ class CCSDBase(lib.StreamObject):
|
|
|
1240
1240
|
def nuc_grad_method(self):
|
|
1241
1241
|
raise NotImplementedError
|
|
1242
1242
|
|
|
1243
|
+
# to_gpu can be reused only when __init__ still takes mf
|
|
1244
|
+
def to_gpu(self):
|
|
1245
|
+
mf = self.base.to_gpu()
|
|
1246
|
+
from importlib import import_module
|
|
1247
|
+
mod = import_module(self.__module__.replace('pyscf', 'gpu4pyscf'))
|
|
1248
|
+
cls = getattr(mod, self.__class__.__name__)
|
|
1249
|
+
obj = cls(mf)
|
|
1250
|
+
return obj
|
|
1251
|
+
|
|
1243
1252
|
class CCSD(CCSDBase):
|
|
1244
1253
|
__doc__ = CCSDBase.__doc__
|
|
1245
1254
|
|
pyscf/cc/ccsd_t.py
CHANGED
|
@@ -176,7 +176,7 @@ def _sort_eri(mycc, eris, nocc, nvir, vvop, log):
|
|
|
176
176
|
|
|
177
177
|
def _sort_t2_vooo_(mycc, orbsym, t1, t2, eris):
|
|
178
178
|
assert (t2.flags.c_contiguous)
|
|
179
|
-
vooo = numpy.asarray(eris.ovoo).transpose(1,0,3
|
|
179
|
+
vooo = numpy.asarray(eris.ovoo).transpose(1,0,2,3).conj().copy()
|
|
180
180
|
nocc, nvir = t1.shape
|
|
181
181
|
if mycc.mol.symmetry:
|
|
182
182
|
orbsym = numpy.asarray(orbsym, dtype=numpy.int32)
|
pyscf/cc/ccsd_t_slow.py
CHANGED
|
@@ -45,7 +45,7 @@ def kernel(mycc, eris, t1=None, t2=None, verbose=logger.NOTE):
|
|
|
45
45
|
eijk = lib.direct_sum('i,j,k->ijk', e_occ, e_occ, e_occ)
|
|
46
46
|
|
|
47
47
|
eris_vvov = eris.get_ovvv().conj().transpose(1,3,0,2)
|
|
48
|
-
eris_vooo = numpy.asarray(eris.ovoo).conj().transpose(1,0,3
|
|
48
|
+
eris_vooo = numpy.asarray(eris.ovoo).conj().transpose(1,0,2,3)
|
|
49
49
|
eris_vvoo = numpy.asarray(eris.ovov).conj().transpose(1,3,0,2)
|
|
50
50
|
fvo = eris.fock[nocc:,:nocc]
|
|
51
51
|
def get_w(a, b, c):
|
pyscf/cc/dfccsd.py
CHANGED
|
@@ -48,6 +48,8 @@ class RCCSD(ccsd.CCSD):
|
|
|
48
48
|
assert (not self.direct)
|
|
49
49
|
return ccsd.CCSD._add_vvvv(self, t1, t2, eris, out, with_ovvv, t2sym)
|
|
50
50
|
|
|
51
|
+
to_gpu = lib.to_gpu
|
|
52
|
+
|
|
51
53
|
|
|
52
54
|
def _contract_vvvv_t2(mycc, mol, vvL, t2, out=None, verbose=None):
|
|
53
55
|
'''Ht2 = numpy.einsum('ijcd,acdb->ijab', t2, vvvv)
|
pyscf/cc/gccsd.py
CHANGED
pyscf/cc/qcisd_t_slow.py
CHANGED
|
@@ -47,7 +47,7 @@ def kernel(mycc, eris, t1=None, t2=None, verbose=logger.NOTE):
|
|
|
47
47
|
eijk = lib.direct_sum('i,j,k->ijk', e_occ, e_occ, e_occ)
|
|
48
48
|
|
|
49
49
|
eris_vvov = eris.get_ovvv().conj().transpose(1,3,0,2)
|
|
50
|
-
eris_vooo = numpy.asarray(eris.ovoo).conj().transpose(1,0,3
|
|
50
|
+
eris_vooo = numpy.asarray(eris.ovoo).conj().transpose(1,0,2,3)
|
|
51
51
|
eris_vvoo = numpy.asarray(eris.ovov).conj().transpose(1,3,0,2)
|
|
52
52
|
fvo = eris.fock[nocc:,:nocc]
|
|
53
53
|
def get_w(a, b, c):
|
pyscf/cc/uccsd.py
CHANGED
pyscf/ci/cisd.py
CHANGED
pyscf/df/addons.py
CHANGED
pyscf/df/df.py
CHANGED
|
@@ -284,7 +284,7 @@ class DF(lib.StreamObject):
|
|
|
284
284
|
else:
|
|
285
285
|
rsh_df = self._rsh_df[key] = self.copy().reset()
|
|
286
286
|
if hasattr(self, '_dataname'):
|
|
287
|
-
rsh_df._dataname = f'{self._dataname}
|
|
287
|
+
rsh_df._dataname = f'{self._dataname}-lr/{key}'
|
|
288
288
|
logger.info(self, 'Create RSH-DF object %s for omega=%s', rsh_df, omega)
|
|
289
289
|
|
|
290
290
|
mol = self.mol
|
|
@@ -308,9 +308,7 @@ class DF(lib.StreamObject):
|
|
|
308
308
|
if auxmol_omega is not None:
|
|
309
309
|
auxmol.omega = auxmol_omega
|
|
310
310
|
|
|
311
|
-
|
|
312
|
-
from gpu4pyscf.df.df import DF as DF
|
|
313
|
-
return lib.to_gpu(self.__class__.reset(self.view(DF)))
|
|
311
|
+
to_gpu = lib.to_gpu
|
|
314
312
|
|
|
315
313
|
GDF = DF
|
|
316
314
|
|
pyscf/df/df_jk.py
CHANGED
|
@@ -200,6 +200,8 @@ class _DFHF:
|
|
|
200
200
|
return uks.Hessian(self)
|
|
201
201
|
else:
|
|
202
202
|
return uhf.Hessian(self)
|
|
203
|
+
elif isinstance(self, scf.rohf.ROHF):
|
|
204
|
+
raise NotImplementedError
|
|
203
205
|
elif isinstance(self, scf.rhf.RHF):
|
|
204
206
|
if isinstance(self, scf.hf.KohnShamDFT):
|
|
205
207
|
return rks.Hessian(self)
|
|
@@ -228,8 +230,7 @@ class _DFHF:
|
|
|
228
230
|
|
|
229
231
|
def to_gpu(self):
|
|
230
232
|
obj = self.undo_df().to_gpu().density_fit()
|
|
231
|
-
|
|
232
|
-
return lib.to_gpu(obj)
|
|
233
|
+
return lib.to_gpu(self, obj)
|
|
233
234
|
|
|
234
235
|
|
|
235
236
|
def get_jk(dfobj, dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13):
|
|
@@ -261,8 +262,9 @@ def get_jk(dfobj, dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13):
|
|
|
261
262
|
|
|
262
263
|
if not with_k:
|
|
263
264
|
for eri1 in dfobj.loop():
|
|
264
|
-
|
|
265
|
-
vj +=
|
|
265
|
+
# uses numpy.matmul
|
|
266
|
+
vj += (dmtril @ eri1.T) @ eri1
|
|
267
|
+
|
|
266
268
|
|
|
267
269
|
elif getattr(dm, 'mo_coeff', None) is not None:
|
|
268
270
|
#TODO: test whether dm.mo_coeff matching dm
|
|
@@ -291,9 +293,8 @@ def get_jk(dfobj, dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13):
|
|
|
291
293
|
naux, nao_pair = eri1.shape
|
|
292
294
|
assert (nao_pair == nao*(nao+1)//2)
|
|
293
295
|
if with_j:
|
|
294
|
-
|
|
295
|
-
vj +=
|
|
296
|
-
|
|
296
|
+
# uses numpy.matmul
|
|
297
|
+
vj += (dmtril @ eri1.T) @ eri1
|
|
297
298
|
for k in range(nset):
|
|
298
299
|
nocc = orbo[k].shape[1]
|
|
299
300
|
if nocc > 0:
|
|
@@ -319,8 +320,9 @@ def get_jk(dfobj, dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13):
|
|
|
319
320
|
for eri1 in dfobj.loop(blksize):
|
|
320
321
|
naux, nao_pair = eri1.shape
|
|
321
322
|
if with_j:
|
|
322
|
-
|
|
323
|
-
vj +=
|
|
323
|
+
# uses numpy.matmul
|
|
324
|
+
vj += (dmtril @ eri1.T) @ eri1
|
|
325
|
+
|
|
324
326
|
|
|
325
327
|
for k in range(nset):
|
|
326
328
|
buf1 = buf[0,:naux]
|
pyscf/df/grad/casdm2_util.py
CHANGED
|
@@ -476,7 +476,7 @@ def grad_elec_dferi (mc_grad, mo_cas=None, ci=None, dfcasdm2=None, casdm2=None,
|
|
|
476
476
|
|
|
477
477
|
aoslices = mol.aoslice_by_atom ()
|
|
478
478
|
dE = np.array ([dE[:,p0:p1].sum (axis=1) for p0, p1 in aoslices[:,2:]]).transpose (1,0,2)
|
|
479
|
-
return np.ascontiguousarray (dE)
|
|
479
|
+
return np.ascontiguousarray (dE)[:,atmlst,:]
|
|
480
480
|
|
|
481
481
|
if __name__ == '__main__':
|
|
482
482
|
from pyscf.tools import molden
|
pyscf/df/grad/casscf.py
CHANGED
pyscf/df/grad/rhf.py
CHANGED
|
@@ -38,8 +38,9 @@ from functools import reduce
|
|
|
38
38
|
from itertools import product
|
|
39
39
|
from pyscf.ao2mo import _ao2mo
|
|
40
40
|
from pyscf.df import df_jk
|
|
41
|
+
from pyscf.df.incore import LINEAR_DEP_THR
|
|
41
42
|
|
|
42
|
-
LINEAR_DEP_THRESHOLD =
|
|
43
|
+
LINEAR_DEP_THRESHOLD = LINEAR_DEP_THR
|
|
43
44
|
|
|
44
45
|
def get_jk(mf_grad, mol=None, dm=None, hermi=0, with_j=True, with_k=True,
|
|
45
46
|
decompose_j2c='CD', lindep=LINEAR_DEP_THRESHOLD):
|
|
@@ -482,12 +483,15 @@ class Gradients(rhf_grad.Gradients):
|
|
|
482
483
|
_keys = {'with_df', 'auxbasis_response'}
|
|
483
484
|
|
|
484
485
|
def __init__(self, mf):
|
|
485
|
-
assert isinstance(mf, df.df_jk._DFHF)
|
|
486
|
-
# Whether to include the response of DF auxiliary basis when computing
|
|
487
|
-
# nuclear gradients of J/K matrices
|
|
488
|
-
self.auxbasis_response = True
|
|
489
486
|
rhf_grad.Gradients.__init__(self, mf)
|
|
490
487
|
|
|
488
|
+
# Whether to include the response of DF auxiliary basis when computing
|
|
489
|
+
# nuclear gradients of J/K matrices
|
|
490
|
+
auxbasis_response = True
|
|
491
|
+
|
|
492
|
+
def check_sanity(self):
|
|
493
|
+
assert isinstance(self.base, df.df_jk._DFHF)
|
|
494
|
+
|
|
491
495
|
def get_jk(self, mol=None, dm=None, hermi=0, with_j=True, with_k=True,
|
|
492
496
|
omega=None):
|
|
493
497
|
if omega is None:
|
|
@@ -521,8 +525,4 @@ class Gradients(rhf_grad.Gradients):
|
|
|
521
525
|
else:
|
|
522
526
|
return 0
|
|
523
527
|
|
|
524
|
-
def to_gpu(self):
|
|
525
|
-
from gpu4pyscf.df.grad.rhf import Gradients
|
|
526
|
-
return lib.to_gpu(self.view(Gradients))
|
|
527
|
-
|
|
528
528
|
Grad = Gradients
|
pyscf/df/grad/rks.py
CHANGED
|
@@ -46,7 +46,7 @@ def get_veff(ks_grad, mol=None, dm=None):
|
|
|
46
46
|
exc, vxc = rks_grad.get_vxc_full_response(
|
|
47
47
|
ni, mol, grids, mf.xc, dm,
|
|
48
48
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
49
|
-
if mf.
|
|
49
|
+
if mf.do_nlc():
|
|
50
50
|
if ni.libxc.is_nlc(mf.xc):
|
|
51
51
|
xc = mf.xc
|
|
52
52
|
else:
|
|
@@ -61,7 +61,7 @@ def get_veff(ks_grad, mol=None, dm=None):
|
|
|
61
61
|
exc, vxc = rks_grad.get_vxc(
|
|
62
62
|
ni, mol, grids, mf.xc, dm,
|
|
63
63
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
64
|
-
if mf.
|
|
64
|
+
if mf.do_nlc():
|
|
65
65
|
if ni.libxc.is_nlc(mf.xc):
|
|
66
66
|
xc = mf.xc
|
|
67
67
|
else:
|
|
@@ -107,11 +107,12 @@ class Gradients(rks_grad.Gradients):
|
|
|
107
107
|
_keys = {'with_df', 'auxbasis_response'}
|
|
108
108
|
|
|
109
109
|
def __init__(self, mf):
|
|
110
|
-
# Whether to include the response of DF auxiliary basis when computing
|
|
111
|
-
# nuclear gradients of J/K matrices
|
|
112
|
-
self.auxbasis_response = True
|
|
113
110
|
rks_grad.Gradients.__init__(self, mf)
|
|
114
111
|
|
|
112
|
+
# Whether to include the response of DF auxiliary basis when computing
|
|
113
|
+
# nuclear gradients of J/K matrices
|
|
114
|
+
auxbasis_response = True
|
|
115
|
+
|
|
115
116
|
get_jk = df_rhf_grad.Gradients.get_jk
|
|
116
117
|
get_j = df_rhf_grad.Gradients.get_j
|
|
117
118
|
get_k = df_rhf_grad.Gradients.get_k
|
|
@@ -123,8 +124,4 @@ class Gradients(rks_grad.Gradients):
|
|
|
123
124
|
e1 += envs['vhf'].aux[atom_id]
|
|
124
125
|
return e1
|
|
125
126
|
|
|
126
|
-
def to_gpu(self):
|
|
127
|
-
from gpu4pyscf.df.grad.rks import Gradients
|
|
128
|
-
return lib.to_gpu(self.view(Gradients))
|
|
129
|
-
|
|
130
127
|
Grad = Gradients
|
pyscf/df/grad/sacasscf.py
CHANGED
|
@@ -370,3 +370,5 @@ class Gradients (sacasscf_grad.Gradients):
|
|
|
370
370
|
def get_LdotJnuc (self, Lvec, **kwargs):
|
|
371
371
|
with lib.temporary_env (sacasscf_grad, Lci_dot_dgci_dx=Lci_dot_dgci_dx, Lorb_dot_dgorb_dx=Lorb_dot_dgorb_dx):
|
|
372
372
|
return sacasscf_grad.Gradients.get_LdotJnuc (self, Lvec, **kwargs)
|
|
373
|
+
|
|
374
|
+
to_gpu = lib.to_gpu
|
pyscf/df/grad/uhf.py
CHANGED
|
@@ -35,11 +35,12 @@ class Gradients(uhf_grad.Gradients):
|
|
|
35
35
|
_keys = {'with_df', 'auxbasis_response'}
|
|
36
36
|
|
|
37
37
|
def __init__(self, mf):
|
|
38
|
-
# Whether to include the response of DF auxiliary basis when computing
|
|
39
|
-
# nuclear gradients of J/K matrices
|
|
40
|
-
self.auxbasis_response = True
|
|
41
38
|
uhf_grad.Gradients.__init__(self, mf)
|
|
42
39
|
|
|
40
|
+
# Whether to include the response of DF auxiliary basis when computing
|
|
41
|
+
# nuclear gradients of J/K matrices
|
|
42
|
+
auxbasis_response = True
|
|
43
|
+
|
|
43
44
|
get_jk = df_rhf_grad.Gradients.get_jk
|
|
44
45
|
get_j = df_rhf_grad.Gradients.get_j
|
|
45
46
|
get_k = df_rhf_grad.Gradients.get_k
|
pyscf/df/grad/uks.py
CHANGED
|
@@ -48,7 +48,7 @@ def get_veff(ks_grad, mol=None, dm=None):
|
|
|
48
48
|
exc, vxc = uks_grad.get_vxc_full_response(
|
|
49
49
|
ni, mol, grids, mf.xc, dm,
|
|
50
50
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
51
|
-
if mf.
|
|
51
|
+
if mf.do_nlc():
|
|
52
52
|
if ni.libxc.is_nlc(mf.xc):
|
|
53
53
|
xc = mf.xc
|
|
54
54
|
else:
|
|
@@ -63,7 +63,7 @@ def get_veff(ks_grad, mol=None, dm=None):
|
|
|
63
63
|
exc, vxc = uks_grad.get_vxc(
|
|
64
64
|
ni, mol, grids, mf.xc, dm,
|
|
65
65
|
max_memory=max_memory, verbose=ks_grad.verbose)
|
|
66
|
-
if mf.
|
|
66
|
+
if mf.do_nlc():
|
|
67
67
|
if ni.libxc.is_nlc(mf.xc):
|
|
68
68
|
xc = mf.xc
|
|
69
69
|
else:
|
|
@@ -108,11 +108,11 @@ class Gradients(uks_grad.Gradients):
|
|
|
108
108
|
_keys = {'with_df', 'auxbasis_response'}
|
|
109
109
|
|
|
110
110
|
def __init__(self, mf):
|
|
111
|
-
# Whether to include the response of DF auxiliary basis when computing
|
|
112
|
-
# nuclear gradients of J/K matrices
|
|
113
|
-
self.auxbasis_response = True
|
|
114
111
|
uks_grad.Gradients.__init__(self, mf)
|
|
115
112
|
|
|
113
|
+
# Whether to include the response of DF auxiliary basis when computing
|
|
114
|
+
# nuclear gradients of J/K matrices
|
|
115
|
+
auxbasis_response = True
|
|
116
116
|
get_jk = df_rhf_grad.Gradients.get_jk
|
|
117
117
|
get_j = df_rhf_grad.Gradients.get_j
|
|
118
118
|
get_k = df_rhf_grad.Gradients.get_k
|
pyscf/df/hessian/rhf.py
CHANGED
|
@@ -43,6 +43,13 @@ from pyscf.hessian import rhf as rhf_hess
|
|
|
43
43
|
from pyscf.df.grad.rhf import (_int3c_wrapper, _gen_metric_solver,
|
|
44
44
|
LINEAR_DEP_THRESHOLD)
|
|
45
45
|
|
|
46
|
+
def _pinv(a, lindep=LINEAR_DEP_THRESHOLD):
|
|
47
|
+
'''Similar to pinv (v1.7.0) with atol=lindep and rtol=0'''
|
|
48
|
+
w, v = scipy.linalg.eigh(a)
|
|
49
|
+
mask = w > lindep
|
|
50
|
+
v1 = v[:, mask]
|
|
51
|
+
return lib.dot(v1/w[mask], v1.conj().T)
|
|
52
|
+
|
|
46
53
|
def partial_hess_elec(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
47
54
|
atmlst=None, max_memory=4000, verbose=None):
|
|
48
55
|
e1, ej, ek = _partial_hess_ejk(hessobj, mo_energy, mo_coeff, mo_occ,
|
|
@@ -174,7 +181,7 @@ def _partial_hess_ejk(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
|
174
181
|
get_int3c_ipip2 = _int3c_wrapper(mol, auxmol, 'int3c2e_ipip2', 's1')
|
|
175
182
|
rhok0_P__ = lib.einsum('plj,li->pij', rhok0_Pl_, mocc_2)
|
|
176
183
|
rho2c_0 = lib.einsum('pij,qji->pq', rhok0_P__, rhok0_P__)
|
|
177
|
-
int2c_inv =
|
|
184
|
+
int2c_inv = _pinv(int2c, lindep=LINEAR_DEP_THRESHOLD)
|
|
178
185
|
int2c_ipip1 = auxmol.intor('int2c2e_ipip1', aosym='s1')
|
|
179
186
|
int2c_ip_ip = lib.einsum('xpq,qr,ysr->xyps', int2c_ip1, int2c_inv, int2c_ip1)
|
|
180
187
|
int2c_ip_ip -= auxmol.intor('int2c2e_ip1ip2', aosym='s1').reshape(3,3,naux,naux)
|
|
@@ -475,16 +482,12 @@ def _load_dim0(dat, p0, p1):
|
|
|
475
482
|
class Hessian(rhf_hess.Hessian):
|
|
476
483
|
'''Non-relativistic restricted Hartree-Fock hessian'''
|
|
477
484
|
def __init__(self, mf):
|
|
478
|
-
self.auxbasis_response = 1
|
|
479
485
|
rhf_hess.Hessian.__init__(self, mf)
|
|
480
486
|
|
|
487
|
+
auxbasis_response = 1
|
|
481
488
|
partial_hess_elec = partial_hess_elec
|
|
482
489
|
make_h1 = make_h1
|
|
483
490
|
|
|
484
|
-
def to_gpu(self):
|
|
485
|
-
from gpu4pyscf.df.hessian.rhf import Hessian
|
|
486
|
-
return lib.to_gpu(self.view(Hessian))
|
|
487
|
-
|
|
488
491
|
#TODO: Insert into DF class
|
|
489
492
|
|
|
490
493
|
|
pyscf/df/hessian/rks.py
CHANGED
|
@@ -42,7 +42,7 @@ def partial_hess_elec(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
|
42
42
|
mol = hessobj.mol
|
|
43
43
|
mf = hessobj.base
|
|
44
44
|
ni = mf._numint
|
|
45
|
-
if mf.
|
|
45
|
+
if mf.do_nlc():
|
|
46
46
|
raise NotImplementedError('RKS Hessian for NLC functional')
|
|
47
47
|
|
|
48
48
|
if mo_energy is None: mo_energy = mf.mo_energy
|
|
@@ -121,16 +121,12 @@ def make_h1(hessobj, mo_coeff, mo_occ, chkfile=None, atmlst=None, verbose=None):
|
|
|
121
121
|
class Hessian(rks_hess.Hessian):
|
|
122
122
|
'''Non-relativistic RKS hessian'''
|
|
123
123
|
def __init__(self, mf):
|
|
124
|
-
self.auxbasis_response = 1
|
|
125
124
|
rks_hess.Hessian.__init__(self, mf)
|
|
126
125
|
|
|
126
|
+
auxbasis_response = 1
|
|
127
127
|
partial_hess_elec = partial_hess_elec
|
|
128
128
|
make_h1 = make_h1
|
|
129
129
|
|
|
130
|
-
def to_gpu(self):
|
|
131
|
-
from gpu4pyscf.df.hessian.rks import Hessian
|
|
132
|
-
return lib.to_gpu(self.view(Hessian))
|
|
133
|
-
|
|
134
130
|
|
|
135
131
|
if __name__ == '__main__':
|
|
136
132
|
from pyscf import gto
|
pyscf/df/hessian/uhf.py
CHANGED
|
@@ -35,7 +35,7 @@ from pyscf.lib import logger
|
|
|
35
35
|
from pyscf import ao2mo
|
|
36
36
|
from pyscf.hessian import rhf as rhf_hess
|
|
37
37
|
from pyscf.hessian import uhf as uhf_hess
|
|
38
|
-
from pyscf.df.hessian.rhf import _load_dim0
|
|
38
|
+
from pyscf.df.hessian.rhf import _load_dim0, _pinv
|
|
39
39
|
from pyscf.df.grad.rhf import (_int3c_wrapper, _gen_metric_solver,
|
|
40
40
|
LINEAR_DEP_THRESHOLD)
|
|
41
41
|
|
|
@@ -197,7 +197,7 @@ def _partial_hess_ejk(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
|
197
197
|
rhok0b_P__ = lib.einsum('plj,li->pij', rhok0b_Pl_, moccb)
|
|
198
198
|
rho2c_0 = lib.einsum('pij,qij->pq', rhok0a_P__, rhok0a_P__)
|
|
199
199
|
rho2c_0 += lib.einsum('pij,qij->pq', rhok0b_P__, rhok0b_P__)
|
|
200
|
-
int2c_inv =
|
|
200
|
+
int2c_inv = _pinv(int2c, lindep=LINEAR_DEP_THRESHOLD)
|
|
201
201
|
int2c_ipip1 = auxmol.intor('int2c2e_ipip1', aosym='s1')
|
|
202
202
|
int2c_ip_ip = lib.einsum('xpq,qr,ysr->xyps', int2c_ip1, int2c_inv, int2c_ip1)
|
|
203
203
|
int2c_ip_ip -= auxmol.intor('int2c2e_ip1ip2', aosym='s1').reshape(3,3,naux,naux)
|
|
@@ -526,9 +526,9 @@ def _gen_jk(hessobj, mo_coeff, mo_occ, chkfile=None, atmlst=None,
|
|
|
526
526
|
class Hessian(uhf_hess.Hessian):
|
|
527
527
|
'''Non-relativistic UHF hessian'''
|
|
528
528
|
def __init__(self, mf):
|
|
529
|
-
self.auxbasis_response = 1
|
|
530
529
|
uhf_hess.Hessian.__init__(self, mf)
|
|
531
530
|
|
|
531
|
+
auxbasis_response = 1
|
|
532
532
|
partial_hess_elec = partial_hess_elec
|
|
533
533
|
make_h1 = make_h1
|
|
534
534
|
|
pyscf/df/hessian/uks.py
CHANGED
|
@@ -42,7 +42,7 @@ def partial_hess_elec(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
|
|
|
42
42
|
mol = hessobj.mol
|
|
43
43
|
mf = hessobj.base
|
|
44
44
|
ni = mf._numint
|
|
45
|
-
if mf.
|
|
45
|
+
if mf.do_nlc():
|
|
46
46
|
raise NotImplementedError('RKS Hessian for NLC functional')
|
|
47
47
|
|
|
48
48
|
if mo_energy is None: mo_energy = mf.mo_energy
|
|
@@ -134,9 +134,9 @@ def make_h1(hessobj, mo_coeff, mo_occ, chkfile=None, atmlst=None, verbose=None):
|
|
|
134
134
|
class Hessian(uks_hess.Hessian):
|
|
135
135
|
'''Non-relativistic RKS hessian'''
|
|
136
136
|
def __init__(self, mf):
|
|
137
|
-
self.auxbasis_response = 1
|
|
138
137
|
uks_hess.Hessian.__init__(self, mf)
|
|
139
138
|
|
|
139
|
+
auxbasis_response = 1
|
|
140
140
|
partial_hess_elec = partial_hess_elec
|
|
141
141
|
make_h1 = make_h1
|
|
142
142
|
|
pyscf/df/incore.py
CHANGED
|
@@ -28,7 +28,9 @@ from pyscf import __config__
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
MAX_MEMORY = getattr(__config__, 'df_outcore_max_memory', 2000) # 2GB
|
|
31
|
-
LINEAR_DEP_THR
|
|
31
|
+
# LINEAR_DEP_THR cannot be below 1e-7,
|
|
32
|
+
# see qchem default setting in https://manual.q-chem.com/5.4/sec_Basis_Customization.html
|
|
33
|
+
LINEAR_DEP_THR = getattr(__config__, 'df_df_DF_lindep', 1e-7)
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
# This function is aliased for backward compatibility.
|
|
@@ -179,10 +181,11 @@ def cholesky_eri(mol, auxbasis='weigend+etb', auxmol=None,
|
|
|
179
181
|
p0, p1 = p1, p1 + nrow
|
|
180
182
|
if decompose_j2c == 'cd':
|
|
181
183
|
if ints.flags.c_contiguous:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
trsm, = scipy.linalg.get_blas_funcs(('trsm',), (low, ints))
|
|
185
|
+
dat = trsm(1.0, low, ints.T, lower=True, trans_a = 1, side = 1, overwrite_b=True).T
|
|
186
|
+
else:
|
|
187
|
+
dat = scipy.linalg.solve_triangular(low, ints, lower=True,
|
|
188
|
+
overwrite_b=True, check_finite=False)
|
|
186
189
|
if dat.flags.f_contiguous:
|
|
187
190
|
dat = lib.transpose(dat.T, out=bufs2)
|
|
188
191
|
cderi[:,p0:p1] = dat
|