pyscf 2.6.0__py3-none-macosx_11_0_arm64.whl → 2.6.2__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 +3 -3
- pyscf/ao2mo/r_outcore.py +3 -3
- pyscf/ao2mo/semi_incore.py +2 -2
- pyscf/cc/ccsd_lambda.py +1 -1
- pyscf/cc/dfccsd.py +1 -1
- pyscf/cc/rccsd_lambda.py +1 -1
- pyscf/cc/rccsd_slow.py +1 -1
- pyscf/ci/cisd.py +1 -1
- pyscf/ci/ucisd.py +1 -1
- pyscf/df/df_jk.py +2 -0
- pyscf/df/incore.py +3 -1
- pyscf/df/outcore.py +3 -4
- pyscf/dft/__init__.py +0 -10
- pyscf/dft/gen_grid.py +1 -1
- pyscf/geomopt/__init__.py +1 -1
- pyscf/grad/ccsd.py +1 -1
- pyscf/grad/rhf.py +1 -0
- pyscf/grad/rks.py +1 -0
- pyscf/grad/uccsd.py +1 -1
- pyscf/gto/__init__.py +0 -1
- pyscf/gto/basis/__init__.py +0 -1
- pyscf/gto/eval_gto.py +11 -2
- pyscf/gto/mole.py +2 -2
- pyscf/hessian/dispersion.py +5 -5
- pyscf/hessian/rhf.py +1 -0
- pyscf/hessian/rks.py +1 -0
- pyscf/lib/chkfile.py +3 -2
- pyscf/lib/diis.py +1 -1
- 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 +4 -7
- pyscf/lib/misc.py +92 -15
- pyscf/lib/numpy_helper.py +1 -1
- pyscf/lib/parameters.py +1 -0
- pyscf/mcscf/chkfile.py +3 -2
- pyscf/mp/dfmp2.py +1 -1
- pyscf/mp/ump2.py +1 -1
- pyscf/mrpt/nevpt2.py +1 -1
- pyscf/pbc/adc/__init__.py +0 -1
- pyscf/pbc/cc/eom_kccsd_uhf.py +2 -2
- pyscf/pbc/cc/kccsd_rhf_ksymm.py +1 -0
- pyscf/pbc/cc/kccsd_t_rhf.py +1 -1
- 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/kgks.py +3 -0
- pyscf/pbc/dft/multigrid/multigrid.py +2 -2
- pyscf/pbc/dft/numint.py +1 -1
- pyscf/pbc/dft/numint2c.py +1 -0
- pyscf/pbc/lib/kpts.py +1 -1
- pyscf/pbc/mp/kmp2_ksymm.py +1 -0
- pyscf/pbc/mpicc/kccsd_rhf.py +1 -1
- pyscf/pbc/mpicc/kintermediates_rhf.py +6 -6
- pyscf/pbc/scf/__init__.py +0 -10
- pyscf/pbc/scf/ghf.py +1 -0
- pyscf/pbc/scf/hf.py +1 -1
- pyscf/pbc/scf/kghf.py +2 -0
- pyscf/pbc/scf/khf.py +1 -1
- pyscf/pbc/scf/khf_ksymm.py +1 -1
- pyscf/pbc/symm/group.py +1 -1
- pyscf/scf/__init__.py +0 -7
- pyscf/scf/chkfile.py +2 -1
- pyscf/scf/dhf.py +2 -2
- pyscf/scf/hf.py +6 -0
- pyscf/scf/ucphf.py +1 -1
- pyscf/solvent/__init__.py +1 -1
- pyscf/x2c/x2c.py +2 -2
- {pyscf-2.6.0.dist-info → pyscf-2.6.2.dist-info}/METADATA +3 -3
- {pyscf-2.6.0.dist-info → pyscf-2.6.2.dist-info}/RECORD +89 -89
- {pyscf-2.6.0.dist-info → pyscf-2.6.2.dist-info}/WHEEL +1 -1
- {pyscf-2.6.0.dist-info → pyscf-2.6.2.dist-info}/LICENSE +0 -0
- {pyscf-2.6.0.dist-info → pyscf-2.6.2.dist-info}/NOTICE +0 -0
- {pyscf-2.6.0.dist-info → pyscf-2.6.2.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
|
|
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/ccsd_lambda.py
CHANGED
pyscf/cc/dfccsd.py
CHANGED
pyscf/cc/rccsd_lambda.py
CHANGED
|
@@ -69,7 +69,7 @@ def make_intermediates(mycc, t1, t2, eris):
|
|
|
69
69
|
oooo = np.asarray(eris.oooo)
|
|
70
70
|
woooo = lib.einsum('icjl,kc->ikjl', ovoo, t1)
|
|
71
71
|
woooo += lib.einsum('jcil,kc->iljk', ovoo, t1)
|
|
72
|
-
woooo += oooo
|
|
72
|
+
woooo += oooo
|
|
73
73
|
woooo += lib.einsum('icjd,klcd->ikjl', ovov, tau)
|
|
74
74
|
|
|
75
75
|
theta = t2*2 - t2.transpose(0,1,3,2)
|
pyscf/cc/rccsd_slow.py
CHANGED
pyscf/ci/cisd.py
CHANGED
pyscf/ci/ucisd.py
CHANGED
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)
|
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.
|
pyscf/df/outcore.py
CHANGED
|
@@ -27,12 +27,11 @@ from pyscf.lib import logger
|
|
|
27
27
|
from pyscf import ao2mo
|
|
28
28
|
from pyscf.ao2mo import _ao2mo
|
|
29
29
|
from pyscf.ao2mo.outcore import _load_from_h5g
|
|
30
|
-
from pyscf.df.incore import _eig_decompose
|
|
30
|
+
from pyscf.df.incore import _eig_decompose, LINEAR_DEP_THR
|
|
31
31
|
from pyscf.df.addons import make_auxmol
|
|
32
32
|
from pyscf import __config__
|
|
33
33
|
|
|
34
34
|
MAX_MEMORY = getattr(__config__, 'df_outcore_max_memory', 2000) # 2GB
|
|
35
|
-
LINEAR_DEP_THR = getattr(__config__, 'df_df_DF_lindep', 1e-12)
|
|
36
35
|
|
|
37
36
|
#
|
|
38
37
|
# for auxe1 (P|ij)
|
|
@@ -303,11 +302,11 @@ def _create_h5file(erifile, dataname):
|
|
|
303
302
|
erifile = erifile.name
|
|
304
303
|
|
|
305
304
|
if h5py.is_hdf5(erifile):
|
|
306
|
-
feri =
|
|
305
|
+
feri = lib.H5FileWrap(erifile, 'a')
|
|
307
306
|
if dataname in feri:
|
|
308
307
|
del (feri[dataname])
|
|
309
308
|
else:
|
|
310
|
-
feri =
|
|
309
|
+
feri = lib.H5FileWrap(erifile, 'w')
|
|
311
310
|
return feri
|
|
312
311
|
|
|
313
312
|
del (MAX_MEMORY)
|
pyscf/dft/__init__.py
CHANGED
|
@@ -66,7 +66,6 @@ def KS(mol, xc='LDA,VWN'):
|
|
|
66
66
|
KS.__doc__ = '''
|
|
67
67
|
A wrap function to create DFT object (RKS or UKS).\n
|
|
68
68
|
''' + rks.RKS.__doc__
|
|
69
|
-
gto.Mole.KS = gto.Mole.DFT = property(KS)
|
|
70
69
|
DFT = KS
|
|
71
70
|
|
|
72
71
|
def RKS(mol, xc='LDA,VWN'):
|
|
@@ -78,7 +77,6 @@ def RKS(mol, xc='LDA,VWN'):
|
|
|
78
77
|
else:
|
|
79
78
|
return ROKS(mol, xc)
|
|
80
79
|
RKS.__doc__ = rks.RKS.__doc__
|
|
81
|
-
gto.Mole.RKS = property(RKS)
|
|
82
80
|
|
|
83
81
|
def ROKS(mol, xc='LDA,VWN'):
|
|
84
82
|
if not mol.symmetry or mol.groupname == 'C1':
|
|
@@ -86,7 +84,6 @@ def ROKS(mol, xc='LDA,VWN'):
|
|
|
86
84
|
else:
|
|
87
85
|
return rks_symm.ROKS(mol, xc)
|
|
88
86
|
ROKS.__doc__ = roks.ROKS.__doc__
|
|
89
|
-
gto.Mole.ROKS = property(ROKS)
|
|
90
87
|
|
|
91
88
|
def UKS(mol, xc='LDA,VWN'):
|
|
92
89
|
if not mol.symmetry or mol.groupname == 'C1':
|
|
@@ -94,7 +91,6 @@ def UKS(mol, xc='LDA,VWN'):
|
|
|
94
91
|
else:
|
|
95
92
|
return uks_symm.UKS(mol, xc)
|
|
96
93
|
UKS.__doc__ = uks.UKS.__doc__
|
|
97
|
-
gto.Mole.UKS = property(UKS)
|
|
98
94
|
|
|
99
95
|
def GKS(mol, xc='LDA,VWN'):
|
|
100
96
|
if not mol.symmetry or mol.groupname == 'C1':
|
|
@@ -102,7 +98,6 @@ def GKS(mol, xc='LDA,VWN'):
|
|
|
102
98
|
else:
|
|
103
99
|
return gks_symm.GKS(mol, xc)
|
|
104
100
|
GKS.__doc__ = gks.GKS.__doc__
|
|
105
|
-
gto.Mole.GKS = property(GKS)
|
|
106
101
|
|
|
107
102
|
def DKS(mol, xc='LDA,VWN'):
|
|
108
103
|
from pyscf.scf import dhf
|
|
@@ -110,12 +105,8 @@ def DKS(mol, xc='LDA,VWN'):
|
|
|
110
105
|
return dks.RDKS(mol, xc=xc)
|
|
111
106
|
else:
|
|
112
107
|
return dks.UDKS(mol, xc=xc)
|
|
113
|
-
|
|
114
108
|
UDKS = dks.UDKS
|
|
115
109
|
RDKS = dks.RDKS
|
|
116
|
-
gto.Mole.DKS = property(DKS)
|
|
117
|
-
gto.Mole.UDKS = property(UDKS)
|
|
118
|
-
gto.Mole.RDKS = property(RDKS)
|
|
119
110
|
|
|
120
111
|
def X2C(mol, *args):
|
|
121
112
|
'''X2C Kohn-Sham'''
|
|
@@ -126,4 +117,3 @@ def X2C(mol, *args):
|
|
|
126
117
|
else:
|
|
127
118
|
return dft.UKS(mol, *args)
|
|
128
119
|
X2C_KS = X2C
|
|
129
|
-
gto.Mole.X2C_KS = property(X2C)
|
pyscf/dft/gen_grid.py
CHANGED
|
@@ -366,7 +366,7 @@ def arg_group_grids(mol, coords, box_size=GROUP_BOX_SIZE):
|
|
|
366
366
|
box_ids[box_ids[:,2] > boxes[2], 2] = boxes[2]
|
|
367
367
|
rev_idx, counts = numpy.unique(box_ids, axis=0, return_inverse=True,
|
|
368
368
|
return_counts=True)[1:3]
|
|
369
|
-
return rev_idx.argsort(kind='stable')
|
|
369
|
+
return rev_idx.ravel().argsort(kind='stable')
|
|
370
370
|
|
|
371
371
|
def _load_conf(mod, name, default):
|
|
372
372
|
var = getattr(__config__, name, None)
|
pyscf/geomopt/__init__.py
CHANGED
pyscf/grad/ccsd.py
CHANGED
pyscf/grad/rhf.py
CHANGED
pyscf/grad/rks.py
CHANGED
pyscf/grad/uccsd.py
CHANGED
pyscf/gto/__init__.py
CHANGED
pyscf/gto/basis/__init__.py
CHANGED
|
@@ -531,7 +531,6 @@ def _convert_contraction(contr_string):
|
|
|
531
531
|
def _truncate(basis, contr_scheme, symb, split_name):
|
|
532
532
|
# keep only first n_keep contractions for each l
|
|
533
533
|
contr_b = []
|
|
534
|
-
b_index = 0
|
|
535
534
|
for l, n_keep in enumerate(contr_scheme):
|
|
536
535
|
n_saved = 0
|
|
537
536
|
if n_keep > 0:
|
pyscf/gto/eval_gto.py
CHANGED
|
@@ -82,8 +82,14 @@ def eval_gto(mol, eval_name, coords, comp=None, shls_slice=None, non0tab=None,
|
|
|
82
82
|
If provided, results are written into this array.
|
|
83
83
|
|
|
84
84
|
Returns:
|
|
85
|
-
2D
|
|
86
|
-
|
|
85
|
+
An 2D to 4D array for AO values on grids.
|
|
86
|
+
If eval_name is scalar functions, such as GTOval and GTOval_ip_cart,
|
|
87
|
+
the shape of the return is (N,nao) for GTOval, and (*,N,nao) for other
|
|
88
|
+
functions.
|
|
89
|
+
If eval_name is spinor functions, such as GTOval_spinor and GTOval_sp_spinor,
|
|
90
|
+
the shape of the return is (2,N,nao) for GTOval_spinor, and (2,*,N,nao)
|
|
91
|
+
for other functions. The leading dimension 2 represents the spin-up and
|
|
92
|
+
spin-down components of the spinor basis.
|
|
87
93
|
|
|
88
94
|
Examples:
|
|
89
95
|
|
|
@@ -95,6 +101,9 @@ def eval_gto(mol, eval_name, coords, comp=None, shls_slice=None, non0tab=None,
|
|
|
95
101
|
>>> ao_value = mol.eval_gto("GTOval_ig_sph", coords)
|
|
96
102
|
>>> print(ao_value.shape)
|
|
97
103
|
(3, 100, 24)
|
|
104
|
+
>>> ao_a, ao_b = mol.eval_gto("GTOval_spinor", coords)
|
|
105
|
+
>>> print(ao_a.shape)
|
|
106
|
+
(100, 24)
|
|
98
107
|
'''
|
|
99
108
|
eval_name, comp = _get_intor_and_comp(mol, eval_name, comp)
|
|
100
109
|
|
pyscf/gto/mole.py
CHANGED
|
@@ -3189,7 +3189,7 @@ class MoleBase(lib.StreamObject):
|
|
|
3189
3189
|
return self._env[ptr:ptr+3].copy()
|
|
3190
3190
|
|
|
3191
3191
|
def atom_coords(self, unit='Bohr'):
|
|
3192
|
-
'''np.asarray([mol.
|
|
3192
|
+
'''np.asarray([mol.atom_coord(i) for i in range(mol.natm)])'''
|
|
3193
3193
|
ptr = self._atm[:,PTR_COORD]
|
|
3194
3194
|
c = self._env[numpy.vstack((ptr,ptr+1,ptr+2)).T].copy()
|
|
3195
3195
|
if not is_au(unit):
|
|
@@ -3840,7 +3840,7 @@ def _parse_nuc_mod(str_or_int_or_fn):
|
|
|
3840
3840
|
def _update_from_cmdargs_(mol):
|
|
3841
3841
|
try:
|
|
3842
3842
|
# Detect whether in Ipython shell
|
|
3843
|
-
__IPYTHON__ # noqa:
|
|
3843
|
+
__IPYTHON__ # noqa: F821
|
|
3844
3844
|
return
|
|
3845
3845
|
except Exception:
|
|
3846
3846
|
pass
|
pyscf/hessian/dispersion.py
CHANGED
|
@@ -46,7 +46,7 @@ def get_dispersion(hessobj, disp=None, with_3body=None):
|
|
|
46
46
|
if with_3body is not None:
|
|
47
47
|
with_3body = disp_with_3body
|
|
48
48
|
|
|
49
|
-
if
|
|
49
|
+
if disp_version[:2].upper() == 'D3':
|
|
50
50
|
logger.info(mf, "Calc dispersion correction with DFTD3.")
|
|
51
51
|
logger.info(mf, f"Parameters: xc={method}, version={disp_version}, atm={with_3body}")
|
|
52
52
|
logger.warn(mf, "DFTD3 does not support analytical Hessian, using finite difference")
|
|
@@ -57,21 +57,21 @@ def get_dispersion(hessobj, disp=None, with_3body=None):
|
|
|
57
57
|
for j in range(3):
|
|
58
58
|
coords[i,j] += eps
|
|
59
59
|
mol.set_geom_(coords, unit='Bohr')
|
|
60
|
-
d3_model = dftd3.DFTD3Dispersion(mol, xc=method, version=
|
|
60
|
+
d3_model = dftd3.DFTD3Dispersion(mol, xc=method, version=disp_version, atm=with_3body)
|
|
61
61
|
res = d3_model.get_dispersion(grad=True)
|
|
62
62
|
g1 = res.get('gradient')
|
|
63
63
|
|
|
64
64
|
coords[i,j] -= 2.0*eps
|
|
65
65
|
mol.set_geom_(coords, unit='Bohr')
|
|
66
|
-
d3_model = dftd3.DFTD3Dispersion(mol, xc=method, version=
|
|
66
|
+
d3_model = dftd3.DFTD3Dispersion(mol, xc=method, version=disp_version, atm=with_3body)
|
|
67
67
|
res = d3_model.get_dispersion(grad=True)
|
|
68
68
|
g2 = res.get('gradient')
|
|
69
69
|
|
|
70
70
|
coords[i,j] += eps
|
|
71
71
|
h_disp[i,:,j,:] = (g1 - g2)/(2.0*eps)
|
|
72
|
-
|
|
72
|
+
return h_disp
|
|
73
73
|
|
|
74
|
-
elif
|
|
74
|
+
elif disp_version[:2].upper() == 'D4':
|
|
75
75
|
logger.info(mf, "Calc dispersion correction with DFTD4.")
|
|
76
76
|
logger.info(mf, f"Parameters: xc={method}, atm={with_3body}")
|
|
77
77
|
logger.warn(mf, "DFTD4 does not support analytical Hessian, using finite difference.")
|
pyscf/hessian/rhf.py
CHANGED
pyscf/hessian/rks.py
CHANGED
pyscf/lib/chkfile.py
CHANGED
|
@@ -105,6 +105,7 @@ def dump(chkfile, key, value):
|
|
|
105
105
|
>>> f['symm/Ci/op']
|
|
106
106
|
<HDF5 dataset "op": shape (2,), type "|S1">
|
|
107
107
|
'''
|
|
108
|
+
from pyscf.lib import H5FileWrap
|
|
108
109
|
def save_as_group(key, value, root):
|
|
109
110
|
if isinstance(value, dict):
|
|
110
111
|
root1 = root.create_group(key)
|
|
@@ -126,14 +127,14 @@ def dump(chkfile, key, value):
|
|
|
126
127
|
save_as_group('%06d'%k, v, root1)
|
|
127
128
|
|
|
128
129
|
if h5py.is_hdf5(chkfile):
|
|
129
|
-
with
|
|
130
|
+
with H5FileWrap(chkfile, 'r+') as fh5:
|
|
130
131
|
if key in fh5:
|
|
131
132
|
del (fh5[key])
|
|
132
133
|
elif key + '__from_list__' in fh5:
|
|
133
134
|
del (fh5[key+'__from_list__'])
|
|
134
135
|
save_as_group(key, value, fh5)
|
|
135
136
|
else:
|
|
136
|
-
with
|
|
137
|
+
with H5FileWrap(chkfile, 'w') as fh5:
|
|
137
138
|
save_as_group(key, value, fh5)
|
|
138
139
|
dump_chkfile_key = save = dump
|
|
139
140
|
|
pyscf/lib/diis.py
CHANGED
|
@@ -217,7 +217,7 @@ class DIIS:
|
|
|
217
217
|
if nd < self.min_space:
|
|
218
218
|
return x
|
|
219
219
|
|
|
220
|
-
dt = numpy.
|
|
220
|
+
dt = numpy.asarray(self.get_err_vec(self._head-1))
|
|
221
221
|
if self._H is None:
|
|
222
222
|
self._H = numpy.zeros((self.space+1,self.space+1), dt.dtype)
|
|
223
223
|
self._H[0,1:] = self._H[1:,0] = 1
|
pyscf/lib/libagf2.dylib
CHANGED
|
Binary file
|
pyscf/lib/libao2mo.dylib
CHANGED
|
Binary file
|
pyscf/lib/libcc.dylib
CHANGED
|
Binary file
|
pyscf/lib/libcgto.dylib
CHANGED
|
Binary file
|
pyscf/lib/libcvhf.dylib
CHANGED
|
Binary file
|
pyscf/lib/libdft.dylib
CHANGED
|
Binary file
|
pyscf/lib/libfci.dylib
CHANGED
|
Binary file
|
pyscf/lib/libmcscf.dylib
CHANGED
|
Binary file
|
pyscf/lib/libnp_helper.dylib
CHANGED
|
Binary file
|
pyscf/lib/libpbc.dylib
CHANGED
|
Binary file
|
pyscf/lib/libri.dylib
CHANGED
|
Binary file
|
pyscf/lib/libxc_itrf.dylib
CHANGED
|
Binary file
|
pyscf/lib/libxcfun_itrf.dylib
CHANGED
|
Binary file
|
pyscf/lib/linalg_helper.py
CHANGED
|
@@ -33,7 +33,7 @@ from pyscf import __config__
|
|
|
33
33
|
|
|
34
34
|
SAFE_EIGH_LINDEP = getattr(__config__, 'lib_linalg_helper_safe_eigh_lindep', 1e-15)
|
|
35
35
|
DAVIDSON_LINDEP = getattr(__config__, 'lib_linalg_helper_davidson_lindep', 1e-14)
|
|
36
|
-
DSOLVE_LINDEP = getattr(__config__, 'lib_linalg_helper_dsolve_lindep', 1e-
|
|
36
|
+
DSOLVE_LINDEP = getattr(__config__, 'lib_linalg_helper_dsolve_lindep', 1e-13)
|
|
37
37
|
MAX_MEMORY = getattr(__config__, 'lib_linalg_helper_davidson_max_memory', 2000) # 2GB
|
|
38
38
|
|
|
39
39
|
# sort by similarity has problem which flips the ordering of eigenvalues when
|
|
@@ -1477,15 +1477,12 @@ def _qr(xs, dot, lindep=1e-14):
|
|
|
1477
1477
|
xs = (r.T).dot(qs)
|
|
1478
1478
|
'''
|
|
1479
1479
|
nvec = len(xs)
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
rmat = numpy.empty((nvec,nvec), order='F', dtype=dtype)
|
|
1480
|
+
xs = qs = numpy.array(xs, copy=True)
|
|
1481
|
+
rmat = numpy.eye(nvec, order='F', dtype=xs.dtype)
|
|
1483
1482
|
|
|
1484
1483
|
nv = 0
|
|
1485
1484
|
for i in range(nvec):
|
|
1486
|
-
xi =
|
|
1487
|
-
rmat[:,nv] = 0
|
|
1488
|
-
rmat[nv,nv] = 1
|
|
1485
|
+
xi = xs[i]
|
|
1489
1486
|
for j in range(nv):
|
|
1490
1487
|
prod = dot(qs[j].conj(), xi)
|
|
1491
1488
|
xi -= qs[j] * prod
|