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.
Files changed (263) hide show
  1. pyscf/__init__.py +1 -1
  2. pyscf/adc/__init__.py +0 -2
  3. pyscf/ao2mo/nrr_outcore.py +3 -3
  4. pyscf/ao2mo/outcore.py +9 -9
  5. pyscf/ao2mo/r_outcore.py +3 -3
  6. pyscf/ao2mo/semi_incore.py +2 -2
  7. pyscf/cc/__init__.py +1 -7
  8. pyscf/cc/ccsd.py +9 -0
  9. pyscf/cc/ccsd_t.py +1 -1
  10. pyscf/cc/ccsd_t_slow.py +1 -1
  11. pyscf/cc/dfccsd.py +2 -0
  12. pyscf/cc/gccsd.py +2 -0
  13. pyscf/cc/qcisd_t_slow.py +1 -1
  14. pyscf/cc/uccsd.py +2 -0
  15. pyscf/ci/cisd.py +2 -0
  16. pyscf/df/addons.py +1 -1
  17. pyscf/df/df.py +2 -4
  18. pyscf/df/df_jk.py +11 -9
  19. pyscf/df/grad/casdm2_util.py +1 -1
  20. pyscf/df/grad/casscf.py +2 -0
  21. pyscf/df/grad/rhf.py +9 -9
  22. pyscf/df/grad/rks.py +6 -9
  23. pyscf/df/grad/sacasscf.py +2 -0
  24. pyscf/df/grad/uhf.py +4 -3
  25. pyscf/df/grad/uks.py +5 -5
  26. pyscf/df/hessian/rhf.py +9 -6
  27. pyscf/df/hessian/rks.py +2 -6
  28. pyscf/df/hessian/uhf.py +3 -3
  29. pyscf/df/hessian/uks.py +2 -2
  30. pyscf/df/incore.py +8 -5
  31. pyscf/df/outcore.py +19 -6
  32. pyscf/dft/LebedevGrid.py +5047 -0
  33. pyscf/dft/__init__.py +1 -10
  34. pyscf/dft/dft_parser.py +24 -0
  35. pyscf/dft/dks.py +10 -1
  36. pyscf/dft/gen_grid.py +3 -44
  37. pyscf/dft/gks.py +2 -3
  38. pyscf/dft/gks_symm.py +3 -0
  39. pyscf/dft/libxc.py +14 -3
  40. pyscf/dft/numint.py +5 -4
  41. pyscf/dft/rks.py +39 -13
  42. pyscf/dft/rks_symm.py +6 -1
  43. pyscf/dft/roks.py +1 -8
  44. pyscf/dft/uks.py +2 -8
  45. pyscf/dft/uks_symm.py +3 -0
  46. pyscf/dft/xc_deriv.py +4 -3
  47. pyscf/dft/xcfun.py +9 -0
  48. pyscf/fci/addons.py +17 -14
  49. pyscf/fci/direct_nosym.py +45 -56
  50. pyscf/fci/direct_spin0.py +4 -2
  51. pyscf/fci/direct_spin1.py +9 -5
  52. pyscf/geomopt/__init__.py +1 -1
  53. pyscf/grad/__init__.py +1 -1
  54. pyscf/grad/casci.py +2 -0
  55. pyscf/grad/casscf.py +2 -0
  56. pyscf/grad/ccsd.py +2 -0
  57. pyscf/grad/cisd.py +2 -0
  58. pyscf/grad/dhf.py +2 -0
  59. pyscf/grad/dispersion.py +34 -27
  60. pyscf/grad/mp2.py +2 -0
  61. pyscf/grad/rhf.py +9 -6
  62. pyscf/grad/rks.py +4 -11
  63. pyscf/grad/tdrhf.py +2 -0
  64. pyscf/grad/uhf.py +0 -3
  65. pyscf/grad/uks.py +2 -6
  66. pyscf/gto/__init__.py +0 -1
  67. pyscf/gto/basis/__init__.py +0 -1
  68. pyscf/gto/eval_gto.py +11 -2
  69. pyscf/gto/mole.py +35 -31
  70. pyscf/gto/moleintor.py +1 -0
  71. pyscf/gw/rpa.py +235 -94
  72. pyscf/gw/urpa.py +135 -127
  73. pyscf/hessian/__init__.py +1 -1
  74. pyscf/hessian/dispersion.py +43 -33
  75. pyscf/hessian/rhf.py +12 -9
  76. pyscf/hessian/rks.py +2 -5
  77. pyscf/hessian/uhf.py +2 -4
  78. pyscf/hessian/uks.py +1 -4
  79. pyscf/lib/CMakeLists.txt +46 -1
  80. pyscf/lib/chkfile.py +3 -2
  81. pyscf/lib/dft/CMakeLists.txt +9 -5
  82. pyscf/lib/dft/grid_collocate.c +655 -0
  83. pyscf/lib/dft/grid_common.c +660 -0
  84. pyscf/lib/dft/grid_common.h +109 -0
  85. pyscf/lib/dft/grid_integrate.c +1358 -0
  86. pyscf/lib/dft/libxc_itrf.c +252 -38
  87. pyscf/lib/dft/multigrid.c +744 -0
  88. pyscf/lib/dft/multigrid.h +72 -0
  89. pyscf/lib/dft/utils.c +71 -0
  90. pyscf/lib/dft/utils.h +27 -0
  91. pyscf/lib/diis.py +2 -0
  92. pyscf/lib/libagf2.dylib +0 -0
  93. pyscf/lib/libao2mo.dylib +0 -0
  94. pyscf/lib/libcc.dylib +0 -0
  95. pyscf/lib/libcgto.dylib +0 -0
  96. pyscf/lib/libcvhf.dylib +0 -0
  97. pyscf/lib/libdft.dylib +0 -0
  98. pyscf/lib/libfci.dylib +0 -0
  99. pyscf/lib/libmcscf.dylib +0 -0
  100. pyscf/lib/libnp_helper.dylib +0 -0
  101. pyscf/lib/libpbc.dylib +0 -0
  102. pyscf/lib/libri.dylib +0 -0
  103. pyscf/lib/libxc_itrf.dylib +0 -0
  104. pyscf/lib/libxcfun_itrf.dylib +0 -0
  105. pyscf/lib/linalg_helper.py +1 -1
  106. pyscf/lib/mcscf/fci_string.c +1 -6
  107. pyscf/lib/misc.py +179 -24
  108. pyscf/lib/np_helper/np_helper.h +7 -0
  109. pyscf/lib/numpy_helper.py +9 -2
  110. pyscf/lib/parameters.py +1 -0
  111. pyscf/lib/pbc/CMakeLists.txt +11 -1
  112. pyscf/lib/pbc/cell.c +280 -0
  113. pyscf/lib/pbc/cell.h +29 -0
  114. pyscf/lib/pbc/fft.c +147 -0
  115. pyscf/lib/pbc/fft.h +26 -0
  116. pyscf/lib/pbc/fill_ints.c +3 -3
  117. pyscf/lib/pbc/fill_ints.h +29 -0
  118. pyscf/lib/pbc/fill_ints_screened.c +1012 -0
  119. pyscf/lib/pbc/hf_grad.c +95 -0
  120. pyscf/lib/pbc/neighbor_list.c +206 -0
  121. pyscf/lib/pbc/neighbor_list.h +41 -0
  122. pyscf/lib/pbc/optimizer.c +37 -1
  123. pyscf/lib/pbc/optimizer.h +3 -3
  124. pyscf/lib/pbc/pp.c +448 -0
  125. pyscf/lib/solvent/CMakeLists.txt +38 -0
  126. pyscf/mcscf/__init__.py +9 -23
  127. pyscf/mcscf/casci.py +3 -1
  128. pyscf/mcscf/casci_symm.py +3 -1
  129. pyscf/mcscf/chkfile.py +3 -2
  130. pyscf/mcscf/mc1step.py +8 -6
  131. pyscf/mcscf/newton_casscf_symm.py +1 -1
  132. pyscf/mcscf/ucasci.py +1 -1
  133. pyscf/mcscf/umc1step.py +1 -1
  134. pyscf/mp/__init__.py +1 -1
  135. pyscf/mp/dfgmp2.py +2 -2
  136. pyscf/mp/dfmp2.py +2 -2
  137. pyscf/mp/dfmp2_native.py +2 -0
  138. pyscf/mp/dfump2_native.py +2 -0
  139. pyscf/mp/gmp2.py +4 -2
  140. pyscf/mp/mp2.py +44 -12
  141. pyscf/mp/ump2.py +50 -19
  142. pyscf/mrpt/nevpt2.py +1 -1
  143. pyscf/pbc/adc/__init__.py +0 -1
  144. pyscf/pbc/cc/kccsd.py +2 -0
  145. pyscf/pbc/cc/kccsd_rhf.py +2 -0
  146. pyscf/pbc/cc/kccsd_t_rhf.py +1 -1
  147. pyscf/pbc/cc/kccsd_uhf.py +2 -0
  148. pyscf/pbc/df/aft.py +1 -1
  149. pyscf/pbc/df/aft_jk.py +1 -1
  150. pyscf/pbc/df/df.py +5 -0
  151. pyscf/pbc/df/df_jk.py +4 -7
  152. pyscf/pbc/df/fft.py +5 -0
  153. pyscf/pbc/df/incore.py +244 -0
  154. pyscf/pbc/df/mdf.py +3 -0
  155. pyscf/pbc/df/mdf_jk.py +0 -3
  156. pyscf/pbc/df/outcore.py +4 -4
  157. pyscf/pbc/df/rsdf.py +7 -4
  158. pyscf/pbc/df/rsdf_builder.py +3 -4
  159. pyscf/pbc/df/rsdf_helper.py +2 -2
  160. pyscf/pbc/dft/__init__.py +0 -12
  161. pyscf/pbc/dft/gen_grid.py +4 -0
  162. pyscf/pbc/dft/gks.py +4 -2
  163. pyscf/pbc/dft/kgks.py +16 -4
  164. pyscf/pbc/dft/krks.py +15 -25
  165. pyscf/pbc/dft/krks_ksymm.py +5 -5
  166. pyscf/pbc/dft/kroks.py +9 -19
  167. pyscf/pbc/dft/kuks.py +14 -24
  168. pyscf/pbc/dft/kuks_ksymm.py +5 -5
  169. pyscf/pbc/dft/multigrid/__init__.py +57 -0
  170. pyscf/pbc/dft/{multigrid.py → multigrid/multigrid.py} +86 -93
  171. pyscf/pbc/dft/multigrid/multigrid_pair.py +1405 -0
  172. pyscf/pbc/dft/multigrid/pp.py +290 -0
  173. pyscf/pbc/dft/multigrid/utils.py +70 -0
  174. pyscf/pbc/dft/numint.py +5 -1
  175. pyscf/pbc/dft/numint2c.py +1 -0
  176. pyscf/pbc/dft/rks.py +8 -7
  177. pyscf/pbc/dft/roks.py +2 -0
  178. pyscf/pbc/dft/uks.py +6 -4
  179. pyscf/pbc/grad/__init__.py +5 -2
  180. pyscf/pbc/grad/krhf.py +7 -1
  181. pyscf/pbc/grad/rhf.py +167 -0
  182. pyscf/pbc/grad/rks.py +24 -0
  183. pyscf/pbc/grad/uhf.py +92 -0
  184. pyscf/pbc/grad/uks.py +24 -0
  185. pyscf/pbc/gto/__init__.py +1 -0
  186. pyscf/pbc/gto/_pbcintor.py +14 -7
  187. pyscf/pbc/gto/cell.py +218 -20
  188. pyscf/pbc/gto/ewald_methods.py +293 -0
  189. pyscf/pbc/gto/neighborlist.py +199 -0
  190. pyscf/pbc/gto/pseudo/pp_int.py +350 -17
  191. pyscf/pbc/lib/kpts.py +1 -1
  192. pyscf/pbc/mp/kmp2.py +2 -0
  193. pyscf/pbc/scf/__init__.py +0 -10
  194. pyscf/pbc/scf/addons.py +11 -5
  195. pyscf/pbc/scf/ghf.py +3 -0
  196. pyscf/pbc/scf/hf.py +30 -19
  197. pyscf/pbc/scf/kghf.py +4 -0
  198. pyscf/pbc/scf/khf.py +9 -6
  199. pyscf/pbc/scf/khf_ksymm.py +5 -3
  200. pyscf/pbc/scf/krohf.py +1 -0
  201. pyscf/pbc/scf/kuhf.py +5 -2
  202. pyscf/pbc/scf/kuhf_ksymm.py +4 -2
  203. pyscf/pbc/scf/rohf.py +1 -0
  204. pyscf/pbc/scf/rsjk.py +2 -0
  205. pyscf/pbc/scf/uhf.py +7 -3
  206. pyscf/pbc/symm/geom.py +1 -1
  207. pyscf/pbc/symm/pyscf_spglib.py +1 -1
  208. pyscf/pbc/symm/symmetry.py +1 -1
  209. pyscf/pbc/tools/pbc.py +51 -8
  210. pyscf/qmmm/itrf.py +12 -0
  211. pyscf/scf/__init__.py +1 -7
  212. pyscf/scf/_response_functions.py +3 -3
  213. pyscf/scf/addons.py +12 -6
  214. pyscf/scf/atom_hf.py +15 -2
  215. pyscf/scf/atom_hf_pp.py +154 -0
  216. pyscf/scf/chkfile.py +2 -1
  217. pyscf/scf/dhf.py +5 -7
  218. pyscf/scf/diis.py +4 -8
  219. pyscf/scf/dispersion.py +136 -39
  220. pyscf/scf/ghf.py +3 -7
  221. pyscf/scf/ghf_symm.py +1 -2
  222. pyscf/scf/hf.py +46 -31
  223. pyscf/scf/hf_symm.py +2 -4
  224. pyscf/scf/rohf.py +1 -3
  225. pyscf/scf/ucphf.py +1 -1
  226. pyscf/scf/uhf.py +7 -8
  227. pyscf/scf/uhf_symm.py +1 -2
  228. pyscf/sgx/sgx.py +5 -0
  229. pyscf/solvent/__init__.py +25 -1
  230. pyscf/solvent/_attach_solvent.py +49 -3
  231. pyscf/solvent/_ddcosmo_tdscf_grad.py +1 -1
  232. pyscf/solvent/ddcosmo.py +5 -4
  233. pyscf/solvent/ddpcm.py +1 -0
  234. pyscf/solvent/grad/__init__.py +17 -0
  235. pyscf/solvent/grad/pcm.py +384 -0
  236. pyscf/solvent/grad/smd.py +176 -0
  237. pyscf/solvent/grad/smd_experiment.py +216 -0
  238. pyscf/solvent/hessian/__init__.py +0 -0
  239. pyscf/solvent/hessian/pcm.py +230 -0
  240. pyscf/solvent/hessian/smd.py +171 -0
  241. pyscf/solvent/hessian/smd_experiment.py +208 -0
  242. pyscf/solvent/pcm.py +137 -56
  243. pyscf/solvent/smd.py +433 -0
  244. pyscf/solvent/smd_experiment.py +273 -0
  245. pyscf/soscf/newton_ah.py +3 -0
  246. pyscf/symm/geom.py +3 -7
  247. pyscf/tdscf/common_slow.py +1 -4
  248. pyscf/tdscf/dhf.py +1 -1
  249. pyscf/tdscf/ghf.py +1 -1
  250. pyscf/tdscf/rhf.py +8 -1
  251. pyscf/tdscf/uhf.py +5 -1
  252. pyscf/tools/chgcar.py +1 -5
  253. pyscf/x2c/sfx2c1e.py +7 -2
  254. pyscf/x2c/tdscf.py +1 -1
  255. pyscf/x2c/x2c.py +8 -0
  256. pyscf-2.6.1.dist-info/METADATA +140 -0
  257. {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/NOTICE +4 -0
  258. {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/RECORD +262 -220
  259. {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/WHEEL +1 -1
  260. pyscf-2.5.0.dist-info/METADATA +0 -81
  261. /pyscf/solvent/{ddcosmo_grad.py → grad/ddcosmo_grad.py} +0 -0
  262. {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/LICENSE +0 -0
  263. {pyscf-2.5.0.dist-info → pyscf-2.6.1.dist-info}/top_level.txt +0 -0
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)
@@ -93,6 +92,11 @@ def cholesky_eri(mol, erifile, auxbasis='weigend+etb', dataname='j3c', tmpdir=No
93
92
  ti0 = log.timer('step 2 [%d/%d], [%d:%d], row = %d'%
94
93
  (istep+1, totstep, row0, row1, nrow), *ti0)
95
94
 
95
+ # A bug in NFS / HDF5 may cause .close() not to
96
+ # flush properly, hanging the calculation. Flush manually
97
+ fswap.flush()
98
+ feri.flush()
99
+
96
100
  fswap.close()
97
101
  feri.close()
98
102
  log.timer('cholesky_eri', *time0)
@@ -163,6 +167,7 @@ def cholesky_eri_b(mol, erifile, auxbasis='weigend+etb', dataname='j3c',
163
167
  # cintopt = gto.moleintor.make_cintopt(atm, bas, env, int3c)
164
168
  cintopt = gto.moleintor.make_cintopt(atm, bas, env, int3c)
165
169
  bufs1 = numpy.empty((comp*max([x[2] for x in shranges]),naoaux))
170
+ bufs2 = numpy.empty_like(bufs1)
166
171
 
167
172
  def transform(b):
168
173
  if b.ndim == 3 and b.flags.f_contiguous:
@@ -173,11 +178,16 @@ def cholesky_eri_b(mol, erifile, auxbasis='weigend+etb', dataname='j3c',
173
178
  return lib.dot(low, b)
174
179
 
175
180
  if b.flags.c_contiguous:
176
- b = lib.transpose(b).T
177
- return scipy.linalg.solve_triangular(low, b, lower=True,
181
+ trsm, = scipy.linalg.get_blas_funcs(('trsm',), (low, b))
182
+ return trsm(1.0, low, b.T, lower=True, trans_a = 1, side = 1,
183
+ overwrite_b=True).T
184
+ else:
185
+ return scipy.linalg.solve_triangular(low, b, lower=True,
178
186
  overwrite_b=True, check_finite=False)
179
187
 
180
188
  def process(sh_range):
189
+ nonlocal bufs1, bufs2
190
+ bufs2, bufs1 = bufs1, bufs2
181
191
  bstart, bend, nrow = sh_range
182
192
  shls_slice = (bstart, bend, 0, mol.nbas, mol.nbas, mol.nbas+auxmol.nbas)
183
193
  ints = gto.moleintor.getints3c(int3c, atm, bas, env, shls_slice, comp,
@@ -189,6 +199,7 @@ def cholesky_eri_b(mol, erifile, auxbasis='weigend+etb', dataname='j3c',
189
199
  return dat
190
200
 
191
201
  feri = _create_h5file(erifile, dataname)
202
+
192
203
  for istep, dat in enumerate(lib.map_with_prefetch(process, shranges)):
193
204
  sh_range = shranges[istep]
194
205
  label = '%s/%d'%(dataname,istep)
@@ -204,6 +215,8 @@ def cholesky_eri_b(mol, erifile, auxbasis='weigend+etb', dataname='j3c',
204
215
  istep+1, len(shranges), *sh_range)
205
216
  time1 = log.timer('gen CD eri [%d/%d]' % (istep+1,len(shranges)), *time1)
206
217
  bufs1 = None
218
+ bufs2 = None
219
+ feri.flush()
207
220
  feri.close()
208
221
  return erifile
209
222
 
@@ -289,11 +302,11 @@ def _create_h5file(erifile, dataname):
289
302
  erifile = erifile.name
290
303
 
291
304
  if h5py.is_hdf5(erifile):
292
- feri = h5py.File(erifile, 'a')
305
+ feri = lib.H5FileWrap(erifile, 'a')
293
306
  if dataname in feri:
294
307
  del (feri[dataname])
295
308
  else:
296
- feri = h5py.File(erifile, 'w')
309
+ feri = lib.H5FileWrap(erifile, 'w')
297
310
  return feri
298
311
 
299
312
  del (MAX_MEMORY)