pyscf 2.6.2__py3-none-macosx_11_0_arm64.whl → 2.7.0__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 (244) hide show
  1. pyscf/__init__.py +2 -2
  2. pyscf/adc/__init__.py +3 -8
  3. pyscf/adc/dfadc.py +22 -6
  4. pyscf/adc/radc.py +106 -15
  5. pyscf/adc/radc_amplitudes.py +7 -1
  6. pyscf/adc/radc_ao2mo.py +4 -2
  7. pyscf/adc/radc_ea.py +524 -8
  8. pyscf/adc/radc_ip.py +492 -60
  9. pyscf/adc/radc_ip_cvs.py +4 -2
  10. pyscf/adc/uadc.py +116 -27
  11. pyscf/adc/uadc_amplitudes.py +215 -20
  12. pyscf/adc/uadc_ao2mo.py +30 -9
  13. pyscf/adc/uadc_ea.py +34 -44
  14. pyscf/adc/uadc_ip.py +9 -4
  15. pyscf/adc/uadc_ip_cvs.py +4 -1
  16. pyscf/agf2/__init__.py +2 -2
  17. pyscf/agf2/aux_space.py +1 -1
  18. pyscf/agf2/chkfile.py +1 -1
  19. pyscf/ao2mo/outcore.py +6 -4
  20. pyscf/cc/__init__.py +21 -3
  21. pyscf/cc/bccd.py +0 -46
  22. pyscf/cc/ccsd.py +16 -8
  23. pyscf/cc/uccsd.py +1 -1
  24. pyscf/data/elements.py +1 -1
  25. pyscf/df/__init__.py +2 -1
  26. pyscf/df/addons.py +79 -51
  27. pyscf/df/autoaux.py +191 -0
  28. pyscf/df/df.py +5 -1
  29. pyscf/df/grad/casscf.py +0 -41
  30. pyscf/df/hessian/rhf.py +2 -10
  31. pyscf/df/hessian/rks.py +1 -7
  32. pyscf/df/hessian/uhf.py +3 -13
  33. pyscf/df/hessian/uks.py +1 -8
  34. pyscf/df/incore.py +17 -5
  35. pyscf/dft/dks.py +1 -1
  36. pyscf/dft/libxc.py +65 -639
  37. pyscf/dft/numint.py +7 -3
  38. pyscf/dft/radi.py +39 -5
  39. pyscf/dft/rks.py +1 -1
  40. pyscf/dft/xc_deriv.py +1 -1
  41. pyscf/dft/xcfun.py +53 -2
  42. pyscf/eph/eph_fd.py +1 -1
  43. pyscf/eph/rhf.py +6 -36
  44. pyscf/eph/rks.py +0 -4
  45. pyscf/eph/uhf.py +1 -7
  46. pyscf/eph/uks.py +1 -7
  47. pyscf/fci/addons.py +117 -2
  48. pyscf/fci/cistring.py +1 -1
  49. pyscf/fci/direct_nosym.py +3 -3
  50. pyscf/fci/direct_spin0_symm.py +22 -43
  51. pyscf/fci/direct_spin1.py +65 -9
  52. pyscf/fci/direct_spin1_symm.py +49 -14
  53. pyscf/fci/direct_uhf.py +4 -4
  54. pyscf/fci/selected_ci_symm.py +1 -1
  55. pyscf/grad/lagrange.py +11 -3
  56. pyscf/grad/mp2.py +1 -1
  57. pyscf/grad/sacasscf.py +1 -1
  58. pyscf/grad/tdrks.py +1 -1
  59. pyscf/gto/basis/__init__.py +7 -0
  60. pyscf/gto/basis/bse.py +68 -15
  61. pyscf/gto/basis/parse_cp2k_pp.py +1 -1
  62. pyscf/gto/basis/parse_nwchem.py +1 -1
  63. pyscf/gto/basis/parse_nwchem_ecp.py +2 -1
  64. pyscf/gto/basis/sap_grasp_large.dat +2438 -0
  65. pyscf/gto/basis/sap_grasp_small.dat +1434 -0
  66. pyscf/gto/mole.py +99 -44
  67. pyscf/gw/gw_ac.py +2 -2
  68. pyscf/gw/gw_cd.py +2 -2
  69. pyscf/gw/rpa.py +2 -2
  70. pyscf/gw/ugw_ac.py +2 -2
  71. pyscf/gw/urpa.py +1 -1
  72. pyscf/hessian/rhf.py +30 -128
  73. pyscf/hessian/rks.py +1 -6
  74. pyscf/hessian/uhf.py +28 -138
  75. pyscf/hessian/uks.py +1 -8
  76. pyscf/lib/ao2mo/nr_ao2mo.c +1 -1
  77. pyscf/lib/ao2mo/nrr_ao2mo.c +1 -1
  78. pyscf/lib/ao2mo/r_ao2mo.c +1 -1
  79. pyscf/lib/cc/ccsd_pack.c +1 -1
  80. pyscf/lib/cc/ccsd_t.c +6 -6
  81. pyscf/lib/cc/uccsd_t.c +4 -4
  82. pyscf/lib/deps/include/XCFun/XCFunExport.h +1 -0
  83. pyscf/lib/dft/grid_common.c +1 -1
  84. pyscf/lib/dft/libxc_itrf.c +4 -1
  85. pyscf/lib/dft/xcfun_itrf.c +1 -1
  86. pyscf/lib/diis.py +1 -1
  87. pyscf/lib/exceptions.py +3 -0
  88. pyscf/lib/gto/fill_grids_int2c.c +11 -9
  89. pyscf/lib/gto/fill_int2e.c +7 -5
  90. pyscf/lib/gto/fill_r_4c.c +1 -1
  91. pyscf/lib/gto/ft_ao.c +1 -1
  92. pyscf/lib/gto/ft_ao.h +1 -1
  93. pyscf/lib/gto/gto.h +2 -2
  94. pyscf/lib/gto/nr_ecp.c +3 -2
  95. pyscf/lib/libagf2.dylib +0 -0
  96. pyscf/lib/libao2mo.dylib +0 -0
  97. pyscf/lib/libcc.dylib +0 -0
  98. pyscf/lib/libcgto.dylib +0 -0
  99. pyscf/lib/libcvhf.dylib +0 -0
  100. pyscf/lib/libdft.dylib +0 -0
  101. pyscf/lib/libfci.dylib +0 -0
  102. pyscf/lib/libmcscf.dylib +0 -0
  103. pyscf/lib/libnp_helper.dylib +0 -0
  104. pyscf/lib/libpbc.dylib +0 -0
  105. pyscf/lib/libri.dylib +0 -0
  106. pyscf/lib/libxc_itrf.dylib +0 -0
  107. pyscf/lib/libxcfun_itrf.dylib +0 -0
  108. pyscf/lib/linalg_helper.py +112 -192
  109. pyscf/lib/mcscf/fci_contract.c +2 -2
  110. pyscf/lib/misc.py +47 -14
  111. pyscf/lib/numpy_helper.py +1 -1
  112. pyscf/lib/pbc/nr_ecp.c +10 -3
  113. pyscf/lib/pbc/pbc.h +1 -1
  114. pyscf/lib/vhf/nr_sgx_direct.c +8 -6
  115. pyscf/lib/vhf/optimizer.c +2 -2
  116. pyscf/lo/iao.py +1 -1
  117. pyscf/lo/ibo.py +3 -3
  118. pyscf/lo/pipek_jacobi.py +1 -1
  119. pyscf/mcscf/__init__.py +2 -2
  120. pyscf/mcscf/addons.py +3 -3
  121. pyscf/mcscf/apc.py +2 -2
  122. pyscf/mcscf/casci.py +8 -6
  123. pyscf/mcscf/chkfile.py +70 -41
  124. pyscf/mcscf/dmet_cas.py +2 -2
  125. pyscf/mcscf/mc1step.py +62 -38
  126. pyscf/mcscf/newton_casscf.py +5 -5
  127. pyscf/mcscf/ucasci.py +1 -1
  128. pyscf/mcscf/umc1step.py +44 -25
  129. pyscf/md/integrators.py +3 -3
  130. pyscf/mp/mp2.py +6 -5
  131. pyscf/mp/ump2.py +7 -6
  132. pyscf/pbc/adc/kadc_rhf.py +1 -1
  133. pyscf/pbc/adc/kadc_rhf_amplitudes.py +2 -2
  134. pyscf/pbc/ao2mo/eris.py +1 -1
  135. pyscf/pbc/cc/kccsd_rhf.py +3 -3
  136. pyscf/pbc/cc/kccsd_t_rhf.py +2 -2
  137. pyscf/pbc/ci/kcis_rhf.py +2 -2
  138. pyscf/pbc/df/aft.py +2 -2
  139. pyscf/pbc/df/aft_ao2mo.py +1 -1
  140. pyscf/pbc/df/df.py +84 -11
  141. pyscf/pbc/df/df_jk.py +2 -1
  142. pyscf/pbc/df/fft.py +6 -2
  143. pyscf/pbc/df/fft_ao2mo.py +4 -0
  144. pyscf/pbc/df/fft_jk.py +11 -3
  145. pyscf/pbc/df/ft_ao.py +4 -3
  146. pyscf/pbc/df/gdf_builder.py +5 -4
  147. pyscf/pbc/df/incore.py +1 -1
  148. pyscf/pbc/df/mdf.py +6 -3
  149. pyscf/pbc/df/rsdf.py +2 -2
  150. pyscf/pbc/df/rsdf_builder.py +11 -6
  151. pyscf/pbc/df/rsdf_helper.py +1 -1
  152. pyscf/pbc/dft/cdft.py +5 -5
  153. pyscf/pbc/dft/multigrid/multigrid.py +19 -26
  154. pyscf/pbc/dft/multigrid/multigrid_pair.py +1 -1
  155. pyscf/pbc/dft/multigrid/pp.py +1 -1
  156. pyscf/pbc/dft/numint.py +30 -21
  157. pyscf/pbc/eph/eph_fd.py +1 -1
  158. pyscf/pbc/geomopt/geometric_solver.py +1 -1
  159. pyscf/pbc/gto/cell.py +37 -19
  160. pyscf/pbc/gto/ecp.py +12 -12
  161. pyscf/pbc/gto/eval_gto.py +2 -2
  162. pyscf/pbc/gto/pseudo/pp.py +1 -1
  163. pyscf/pbc/gw/krgw_ac.py +4 -4
  164. pyscf/pbc/gw/krgw_cd.py +4 -4
  165. pyscf/pbc/gw/kugw_ac.py +3 -3
  166. pyscf/pbc/lib/kpts_helper.py +4 -3
  167. pyscf/pbc/lib/linalg_helper.py +1 -1
  168. pyscf/pbc/mp/kmp2.py +1 -1
  169. pyscf/pbc/mpitools/mpi.py +1 -1
  170. pyscf/pbc/scf/addons.py +15 -11
  171. pyscf/pbc/scf/cphf.py +1 -1
  172. pyscf/pbc/scf/ghf.py +1 -1
  173. pyscf/pbc/scf/hf.py +21 -24
  174. pyscf/pbc/scf/kghf.py +33 -29
  175. pyscf/pbc/scf/khf.py +71 -26
  176. pyscf/pbc/scf/krohf.py +5 -7
  177. pyscf/pbc/scf/kuhf.py +53 -22
  178. pyscf/pbc/scf/rsjk.py +13 -9
  179. pyscf/pbc/scf/scfint.py +1 -1
  180. pyscf/pbc/scf/stability.py +1 -1
  181. pyscf/pbc/scf/uhf.py +3 -1
  182. pyscf/pbc/symm/symmetry.py +2 -2
  183. pyscf/pbc/tdscf/kproxy.py +1 -1
  184. pyscf/pbc/tdscf/kproxy_supercell.py +2 -2
  185. pyscf/pbc/tdscf/krhf.py +215 -133
  186. pyscf/pbc/tdscf/krhf_slow_supercell.py +1 -1
  187. pyscf/pbc/tdscf/krks.py +1 -45
  188. pyscf/pbc/tdscf/kuhf.py +58 -105
  189. pyscf/pbc/tdscf/kuks.py +0 -56
  190. pyscf/pbc/tdscf/proxy.py +1 -1
  191. pyscf/pbc/tdscf/rhf.py +111 -3
  192. pyscf/pbc/tdscf/rks.py +2 -1
  193. pyscf/pbc/tdscf/uhf.py +203 -1
  194. pyscf/pbc/tdscf/uks.py +2 -1
  195. pyscf/pbc/tools/k2gamma.py +7 -4
  196. pyscf/pbc/tools/pbc.py +63 -56
  197. pyscf/pbc/tools/pyscf_ase.py +0 -1
  198. pyscf/pbc/tools/pywannier90.py +1 -1
  199. pyscf/qmmm/mm_mole.py +1 -1
  200. pyscf/scf/_response_functions.py +2 -2
  201. pyscf/scf/_vhf.py +14 -10
  202. pyscf/scf/addons.py +29 -15
  203. pyscf/scf/cphf.py +14 -52
  204. pyscf/scf/dhf.py +39 -10
  205. pyscf/scf/dispersion.py +9 -8
  206. pyscf/scf/ghf.py +25 -13
  207. pyscf/scf/ghf_symm.py +2 -2
  208. pyscf/scf/hf.py +245 -29
  209. pyscf/scf/rohf.py +37 -5
  210. pyscf/scf/stability.py +142 -112
  211. pyscf/scf/ucphf.py +21 -16
  212. pyscf/scf/uhf.py +95 -58
  213. pyscf/sgx/sgx.py +1 -1
  214. pyscf/sgx/sgx_jk.py +4 -4
  215. pyscf/solvent/_ddcosmo_tdscf_grad.py +1 -1
  216. pyscf/solvent/ddcosmo.py +1 -1
  217. pyscf/solvent/pol_embed.py +1 -1
  218. pyscf/soscf/ciah.py +1 -1
  219. pyscf/soscf/newton_ah.py +1 -1
  220. pyscf/symm/__init__.py +1 -1
  221. pyscf/symm/addons.py +5 -5
  222. pyscf/tdscf/_lr_eig.py +505 -0
  223. pyscf/tdscf/common_slow.py +1 -1
  224. pyscf/tdscf/dhf.py +41 -37
  225. pyscf/tdscf/dks.py +0 -4
  226. pyscf/tdscf/ghf.py +91 -71
  227. pyscf/tdscf/gks.py +16 -16
  228. pyscf/tdscf/proxy.py +2 -2
  229. pyscf/tdscf/rhf.py +143 -96
  230. pyscf/tdscf/rks.py +15 -14
  231. pyscf/tdscf/uhf.py +117 -70
  232. pyscf/tdscf/uks.py +17 -18
  233. pyscf/tools/fcidump.py +3 -0
  234. pyscf/x2c/sfx2c1e.py +1 -1
  235. pyscf/x2c/tdscf.py +4 -4
  236. pyscf/x2c/x2c.py +15 -11
  237. {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/METADATA +24 -24
  238. {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/NOTICE +3 -1
  239. {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/RECORD +242 -240
  240. {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/WHEEL +1 -1
  241. pyscf/dft/gen_libxc_param.py +0 -35
  242. pyscf/dft/gen_xcfun_param.py +0 -209
  243. {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/LICENSE +0 -0
  244. {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/top_level.txt +0 -0
pyscf/hessian/uhf.py CHANGED
@@ -53,29 +53,15 @@ def hess_elec(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
53
53
  max_memory, log)
54
54
 
55
55
  if h1ao is None:
56
- h1ao = hessobj.make_h1(mo_coeff, mo_occ, hessobj.chkfile, atmlst, log)
56
+ h1ao = hessobj.make_h1(mo_coeff, mo_occ, None, atmlst, log)
57
57
  t1 = log.timer_debug1('making H1', *time0)
58
58
  if mo1 is None or mo_e1 is None:
59
59
  mo1, mo_e1 = hessobj.solve_mo1(mo_energy, mo_coeff, mo_occ, h1ao,
60
60
  None, atmlst, max_memory, log)
61
61
  t1 = log.timer_debug1('solving MO1', *t1)
62
62
 
63
- if isinstance(h1ao, str):
64
- h1ao = lib.chkfile.load(h1ao, 'scf_f1ao')
65
- h1aoa = h1ao['0']
66
- h1aob = h1ao['1']
67
- h1aoa = {int(k): h1aoa[k] for k in h1aoa}
68
- h1aob = {int(k): h1aob[k] for k in h1aob}
69
- else:
70
- h1aoa, h1aob = h1ao
71
- if isinstance(mo1, str):
72
- mo1 = lib.chkfile.load(mo1, 'scf_mo1')
73
- mo1a = mo1['0']
74
- mo1b = mo1['1']
75
- mo1a = {int(k): mo1a[k] for k in mo1a}
76
- mo1b = {int(k): mo1b[k] for k in mo1b}
77
- else:
78
- mo1a, mo1b = mo1
63
+ h1aoa, h1aob = h1ao
64
+ mo1a, mo1b = mo1
79
65
  mo_e1a, mo_e1b = mo_e1
80
66
 
81
67
  nao, nmo = mo_coeff[0].shape
@@ -159,9 +145,12 @@ def _partial_hess_ejk(hessobj, mo_energy=None, mo_coeff=None, mo_occ=None,
159
145
  ip1ip2_opt = _make_vhfopt(mol, dm0, 'ip1ip2', 'int2e_ip1ip2')
160
146
  ipvip1_opt = _make_vhfopt(mol, dm0, 'ipvip1', 'int2e_ipvip1ipvip2')
161
147
  aoslices = mol.aoslice_by_atom()
162
- e1 = numpy.zeros((mol.natm,mol.natm,3,3)) # (A,B,dR_A,dR_B)
163
- ej = numpy.zeros((mol.natm,mol.natm,3,3))
164
- ek = numpy.zeros((mol.natm,mol.natm,3,3))
148
+
149
+ natm = len(atmlst)
150
+ e1 = numpy.zeros((natm, natm, 3, 3)) # (A,B,dR_A,dR_B)
151
+ ej = numpy.zeros((natm, natm, 3, 3))
152
+ ek = numpy.zeros((natm, natm, 3, 3))
153
+
165
154
  for i0, ia in enumerate(atmlst):
166
155
  shl0, shl1, p0, p1 = aoslices[ia]
167
156
  shls_slice = (shl0, shl1) + (0, mol.nbas)*3
@@ -242,21 +231,11 @@ def make_h1(hessobj, mo_coeff, mo_occ, chkfile=None, atmlst=None, verbose=None):
242
231
  vhfa[:,p0:p1] += vj2 - vk2a
243
232
  vhfb[:,p0:p1] += vj2 - vk2b
244
233
  h1 = hcore_deriv(ia)
245
- h1a = h1 + vhfa + vhfa.transpose(0,2,1)
246
- h1b = h1 + vhfb + vhfb.transpose(0,2,1)
247
-
248
- if chkfile is None:
249
- h1aoa[ia] = h1a
250
- h1aob[ia] = h1b
251
- else:
252
- lib.chkfile.save(chkfile, 'scf_f1ao/0/%d' % ia, h1a)
253
- lib.chkfile.save(chkfile, 'scf_f1ao/1/%d' % ia, h1b)
254
- if chkfile is None:
255
- return (h1aoa,h1aob)
256
- else:
257
- return chkfile
258
-
259
- def solve_mo1(mf, mo_energy, mo_coeff, mo_occ, h1ao_or_chkfile,
234
+ h1aoa[ia] = h1 + vhfa + vhfa.transpose(0,2,1)
235
+ h1aob[ia] = h1 + vhfb + vhfb.transpose(0,2,1)
236
+ return (h1aoa,h1aob)
237
+
238
+ def solve_mo1(mf, mo_energy, mo_coeff, mo_occ, h1ao,
260
239
  fx=None, atmlst=None, max_memory=4000, verbose=None,
261
240
  max_cycle=50, level_shift=0):
262
241
  mol = mf.mol
@@ -271,6 +250,7 @@ def solve_mo1(mf, mo_energy, mo_coeff, mo_occ, h1ao_or_chkfile,
271
250
  if fx is None:
272
251
  fx = gen_vind(mf, mo_coeff, mo_occ)
273
252
  s1a = -mol.intor('int1e_ipovlp', comp=3)
253
+ h1aoa, h1aob = h1ao
274
254
 
275
255
  def _ao2mo(mat, mo_coeff, mocc):
276
256
  return numpy.asarray([reduce(numpy.dot, (mo_coeff.T, x, mocc)) for x in mat])
@@ -296,14 +276,8 @@ def solve_mo1(mf, mo_energy, mo_coeff, mo_occ, h1ao_or_chkfile,
296
276
  s1ao[:,:,p0:p1] += s1a[:,p0:p1].transpose(0,2,1)
297
277
  s1voa.append(_ao2mo(s1ao, mo_coeff[0], mocca))
298
278
  s1vob.append(_ao2mo(s1ao, mo_coeff[1], moccb))
299
- if isinstance(h1ao_or_chkfile, str):
300
- h1aoa = lib.chkfile.load(h1ao_or_chkfile, 'scf_f1ao/0/%d'%ia)
301
- h1aob = lib.chkfile.load(h1ao_or_chkfile, 'scf_f1ao/1/%d'%ia)
302
- else:
303
- h1aoa = h1ao_or_chkfile[0][ia]
304
- h1aob = h1ao_or_chkfile[1][ia]
305
- h1voa.append(_ao2mo(h1aoa, mo_coeff[0], mocca))
306
- h1vob.append(_ao2mo(h1aob, mo_coeff[1], moccb))
279
+ h1voa.append(_ao2mo(h1aoa[ia], mo_coeff[0], mocca))
280
+ h1vob.append(_ao2mo(h1aob[ia], mo_coeff[1], moccb))
307
281
 
308
282
  h1vo = (numpy.vstack(h1voa), numpy.vstack(h1vob))
309
283
  s1vo = (numpy.vstack(s1voa), numpy.vstack(s1vob))
@@ -317,20 +291,13 @@ def solve_mo1(mf, mo_energy, mo_coeff, mo_occ, h1ao_or_chkfile,
317
291
 
318
292
  for k in range(ia1-ia0):
319
293
  ia = atmlst[k+ia0]
320
- if isinstance(h1ao_or_chkfile, str):
321
- lib.chkfile.save(h1ao_or_chkfile, 'scf_mo1/0/%d'%ia, mo1a[k])
322
- lib.chkfile.save(h1ao_or_chkfile, 'scf_mo1/1/%d'%ia, mo1b[k])
323
- else:
324
- mo1sa[ia] = mo1a[k]
325
- mo1sb[ia] = mo1b[k]
294
+ mo1sa[ia] = mo1a[k]
295
+ mo1sb[ia] = mo1b[k]
326
296
  e1sa[ia] = e1a[k].reshape(3,nocca,nocca)
327
297
  e1sb[ia] = e1b[k].reshape(3,noccb,noccb)
328
298
  mo1 = e1 = mo1a = mo1b = e1a = e1b = None
329
299
 
330
- if isinstance(h1ao_or_chkfile, str):
331
- return h1ao_or_chkfile, (e1sa,e1sb)
332
- else:
333
- return (mo1sa,mo1sb), (e1sa,e1sb)
300
+ return (mo1sa,mo1sb), (e1sa,e1sb)
334
301
 
335
302
  def gen_vind(mf, mo_coeff, mo_occ):
336
303
  nao, nmoa = mo_coeff[0].shape
@@ -385,8 +352,8 @@ def gen_hop(hobj, mo_energy=None, mo_coeff=None, mo_occ=None, verbose=None):
385
352
  max_memory, log)
386
353
  de2 += hobj.hess_nuc()
387
354
 
388
- # Compute H1 integrals and store in hobj.chkfile
389
- hobj.make_h1(mo_coeff, mo_occ, hobj.chkfile, atmlst, log)
355
+ h1ao_cache = hobj.make_h1(mo_coeff, mo_occ, None, atmlst, log)
356
+ h1aoa_cache, h1aob_cache = h1ao_cache
390
357
 
391
358
  aoslices = mol.aoslice_by_atom()
392
359
  s1a = -mol.intor('int1e_ipovlp', comp=3)
@@ -400,10 +367,8 @@ def gen_hop(hobj, mo_energy=None, mo_coeff=None, mo_occ=None, verbose=None):
400
367
  s1ao = 0
401
368
  for ia in range(natm):
402
369
  shl0, shl1, p0, p1 = aoslices[ia]
403
- h1ao_i = lib.chkfile.load(hobj.chkfile, 'scf_f1ao/0/%d' % ia)
404
- h1aoa += numpy.einsum('x,xij->ij', x[ia], h1ao_i)
405
- h1ao_i = lib.chkfile.load(hobj.chkfile, 'scf_f1ao/1/%d' % ia)
406
- h1aob += numpy.einsum('x,xij->ij', x[ia], h1ao_i)
370
+ h1aoa += numpy.einsum('x,xij->ij', x[ia], h1aoa_cache[ia])
371
+ h1aob += numpy.einsum('x,xij->ij', x[ia], h1aob_cache[ia])
407
372
  s1ao_i = numpy.zeros((3,nao,nao))
408
373
  s1ao_i[:,p0:p1] += s1a[:,p0:p1]
409
374
  s1ao_i[:,:,p0:p1] += s1a[:,p0:p1].transpose(0,2,1)
@@ -429,10 +394,8 @@ def gen_hop(hobj, mo_energy=None, mo_coeff=None, mo_occ=None, verbose=None):
429
394
 
430
395
  for ja in range(natm):
431
396
  q0, q1 = aoslices[ja][2:]
432
- h1aoa = lib.chkfile.load(hobj.chkfile, 'scf_f1ao/0/%d' % ja)
433
- h1aob = lib.chkfile.load(hobj.chkfile, 'scf_f1ao/1/%d' % ja)
434
- hx[ja] += numpy.einsum('xpq,pq->x', h1aoa, dm1a) * 2
435
- hx[ja] += numpy.einsum('xpq,pq->x', h1aob, dm1b) * 2
397
+ hx[ja] += numpy.einsum('xpq,pq->x', h1aoa_cache[ja], dm1a) * 2
398
+ hx[ja] += numpy.einsum('xpq,pq->x', h1aob_cache[ja], dm1b) * 2
436
399
  hx[ja] -= numpy.einsum('xpq,pq->x', s1a[:,q0:q1], dme1[q0:q1])
437
400
  hx[ja] -= numpy.einsum('xpq,qp->x', s1a[:,q0:q1], dme1[:,q0:q1])
438
401
  return hx.ravel()
@@ -449,84 +412,11 @@ class Hessian(rhf_hess.HessianBase):
449
412
  make_h1 = make_h1
450
413
  gen_hop = gen_hop
451
414
 
452
- def solve_mo1(self, mo_energy, mo_coeff, mo_occ, h1ao_or_chkfile,
415
+ def solve_mo1(self, mo_energy, mo_coeff, mo_occ, h1ao,
453
416
  fx=None, atmlst=None, max_memory=4000, verbose=None):
454
- return solve_mo1(self.base, mo_energy, mo_coeff, mo_occ, h1ao_or_chkfile,
417
+ return solve_mo1(self.base, mo_energy, mo_coeff, mo_occ, h1ao,
455
418
  fx, atmlst, max_memory, verbose,
456
419
  max_cycle=self.max_cycle, level_shift=self.level_shift)
457
420
 
458
421
  from pyscf import scf
459
422
  scf.uhf.UHF.Hessian = lib.class_as_method(Hessian)
460
-
461
- if __name__ == '__main__':
462
- from pyscf import gto
463
- from pyscf import scf
464
-
465
- mol = gto.Mole()
466
- mol.verbose = 0
467
- mol.output = None
468
- mol.atom = [
469
- [1 , (1. , 0. , 0.000)],
470
- [1 , (0. , 1. , 0.000)],
471
- [1 , (0. , -1.517 , 1.177)],
472
- [1 , (0. , 1.517 , 1.177)] ]
473
- mol.basis = '631g'
474
- mol.unit = 'B'
475
- mol.build()
476
- mf = scf.UHF(mol)
477
- mf.conv_tol = 1e-14
478
- mf.scf()
479
- n3 = mol.natm * 3
480
- hobj = mf.Hessian()
481
- e2 = hobj.kernel().transpose(0,2,1,3).reshape(n3,n3)
482
- print(lib.fp(e2) - -0.50693144355876429)
483
-
484
- mol.spin = 2
485
- mf = scf.UHF(mol)
486
- mf.conv_tol = 1e-14
487
- mf.scf()
488
- n3 = mol.natm * 3
489
- hobj = Hessian(mf)
490
- e2 = hobj.kernel().transpose(0,2,1,3).reshape(n3,n3)
491
-
492
- def grad_full(ia, inc):
493
- coord = mol.atom_coord(ia).copy()
494
- ptr = mol._atm[ia,gto.PTR_COORD]
495
- de = []
496
- for i in range(3):
497
- mol._env[ptr+i] = coord[i] + inc
498
- mf = scf.UHF(mol).run(conv_tol=1e-14)
499
- e1a = mf.nuc_grad_method().kernel()
500
- mol._env[ptr+i] = coord[i] - inc
501
- mf = scf.UHF(mol).run(conv_tol=1e-14)
502
- e1b = mf.nuc_grad_method().kernel()
503
- mol._env[ptr+i] = coord[i]
504
- de.append((e1a-e1b)/(2*inc))
505
- return de
506
- e2ref = [grad_full(ia, .5e-3) for ia in range(mol.natm)]
507
- e2ref = numpy.asarray(e2ref).reshape(n3,n3)
508
- print(numpy.linalg.norm(e2-e2ref))
509
- print(abs(e2-e2ref).max())
510
- print(numpy.allclose(e2,e2ref,atol=1e-4))
511
-
512
- # \partial^2 E / \partial R \partial R'
513
- e2 = hobj.partial_hess_elec(mf.mo_energy, mf.mo_coeff, mf.mo_occ)
514
- e2 += hobj.hess_nuc(mol)
515
- e2 = e2.transpose(0,2,1,3).reshape(n3,n3)
516
- def grad_partial_R(ia, inc):
517
- coord = mol.atom_coord(ia).copy()
518
- ptr = mol._atm[ia,gto.PTR_COORD]
519
- de = []
520
- for i in range(3):
521
- mol._env[ptr+i] = coord[i] + inc
522
- e1a = mf.nuc_grad_method().kernel()
523
- mol._env[ptr+i] = coord[i] - inc
524
- e1b = mf.nuc_grad_method().kernel()
525
- mol._env[ptr+i] = coord[i]
526
- de.append((e1a-e1b)/(2*inc))
527
- return de
528
- e2ref = [grad_partial_R(ia, .5e-4) for ia in range(mol.natm)]
529
- e2ref = numpy.asarray(e2ref).reshape(n3,n3)
530
- print(numpy.linalg.norm(e2-e2ref))
531
- print(abs(e2-e2ref).max())
532
- print(numpy.allclose(e2,e2ref,atol=1e-8))
pyscf/hessian/uks.py CHANGED
@@ -192,14 +192,7 @@ def make_h1(hessobj, mo_coeff, mo_occ, chkfile=None, atmlst=None, verbose=None):
192
192
  h1aoa[ia] += h1 + veffa + veffa.transpose(0,2,1)
193
193
  h1aob[ia] += h1 + veffb + veffb.transpose(0,2,1)
194
194
 
195
- if chkfile is None:
196
- return h1aoa, h1aob
197
- else:
198
- for ia in atmlst:
199
- lib.chkfile.save(chkfile, 'scf_f1ao/0/%d'%ia, h1aoa[ia])
200
- lib.chkfile.save(chkfile, 'scf_f1ao/1/%d'%ia, h1aob[ia])
201
- return chkfile
202
-
195
+ return h1aoa, h1aob
203
196
 
204
197
  XX, XY, XZ = 4, 5, 6
205
198
  YX, YY, YZ = 5, 7, 8
@@ -1225,7 +1225,7 @@ void AO2MOnr_e1_drv(int (*intor)(), void (*fill)(), void (*ftrans)(), int (*fmmm
1225
1225
  int nao = ao_loc[nbas];
1226
1226
  double *eri_ao = malloc(sizeof(double) * nao*nao*nkl*ncomp);
1227
1227
  if (eri_ao == NULL) {
1228
- fprintf(stderr, "malloc(%zu) falied in AO2MOnr_e1_drv\n",
1228
+ fprintf(stderr, "malloc(%zu) failed in AO2MOnr_e1_drv\n",
1229
1229
  sizeof(double) * nao*nao*nkl*ncomp);
1230
1230
  exit(1);
1231
1231
  }
@@ -239,7 +239,7 @@ void AO2MOnrr_e1_drv(int (*intor)(), void (*fill)(),
239
239
 
240
240
  double *eri_ao = malloc(sizeof(double)* nao*nao*nkl*ncomp);
241
241
  if (eri_ao == NULL) {
242
- fprintf(stderr, "malloc(%zu) falied in AO2MOnrr_e1_drv\n",
242
+ fprintf(stderr, "malloc(%zu) failed in AO2MOnrr_e1_drv\n",
243
243
  sizeof(double) * nao*nao*nkl*ncomp);
244
244
  exit(1);
245
245
  }
pyscf/lib/ao2mo/r_ao2mo.c CHANGED
@@ -835,7 +835,7 @@ void AO2MOr_e1_drv(int (*intor)(), void (*fill)(),
835
835
  double complex *eri_ao = malloc(sizeof(double complex)
836
836
  * nao*nao*nkl*ncomp);
837
837
  if (eri_ao == NULL) {
838
- fprintf(stderr, "malloc(%zu) falied in AO2MOr_e1_drv\n",
838
+ fprintf(stderr, "malloc(%zu) failed in AO2MOr_e1_drv\n",
839
839
  sizeof(double complex) * nao*nao*nkl*ncomp);
840
840
  exit(1);
841
841
  }
pyscf/lib/cc/ccsd_pack.c CHANGED
@@ -106,7 +106,7 @@ void CCmake_021(double *out, double *v1, double *v2, int count, int m,
106
106
  /*
107
107
  * if matrix B is symmetric for the contraction A_ij B_ij,
108
108
  * Tr(AB) ~ A_ii B_ii + (A_ij + A_ji) B_ij where i > j
109
- * This function extract the A_ii and the lower triangluar part of A_ij + A_ji
109
+ * This function extract the A_ii and the lower triangular part of A_ij + A_ji
110
110
  */
111
111
  void CCprecontract(double *out, double *in, int count, int m, double diagfac)
112
112
  {
pyscf/lib/cc/ccsd_t.c CHANGED
@@ -400,7 +400,7 @@ void CCsd_t_contract(double *e_tot,
400
400
  size_t k;
401
401
  double *cache1 = malloc(sizeof(double) * (nocc*nocc*nocc*3+2));
402
402
  if (cache1 == NULL) {
403
- fprintf(stderr, "malloc(%zu) falied in CCsd_t_contract\n",
403
+ fprintf(stderr, "malloc(%zu) failed in CCsd_t_contract\n",
404
404
  sizeof(double) * nocc*nocc*nocc*3);
405
405
  exit(1);
406
406
  }
@@ -455,7 +455,7 @@ void QCIsd_t_contract(double *e_tot,
455
455
  size_t k;
456
456
  double *cache1 = malloc(sizeof(double) * (nocc*nocc*nocc*3+2));
457
457
  if (cache1 == NULL) {
458
- fprintf(stderr, "malloc(%zu) falied in QCIsd_t_contract\n",
458
+ fprintf(stderr, "malloc(%zu) failed in QCIsd_t_contract\n",
459
459
  sizeof(double) * nocc*nocc*nocc*3);
460
460
  exit(1);
461
461
  }
@@ -636,7 +636,7 @@ void CCsd_t_zcontract(double complex *e_tot,
636
636
  size_t k;
637
637
  double complex *cache1 = malloc(sizeof(double complex) * (nocc*nocc*nocc*3+2));
638
638
  if (cache1 == NULL) {
639
- fprintf(stderr, "malloc(%zu) falied in CCsd_t_zcontract\n",
639
+ fprintf(stderr, "malloc(%zu) failed in CCsd_t_zcontract\n",
640
640
  sizeof(double complex) * nocc*nocc*nocc*3);
641
641
  exit(1);
642
642
  }
@@ -694,7 +694,7 @@ void QCIsd_t_zcontract(double complex *e_tot,
694
694
  size_t k;
695
695
  double complex *cache1 = malloc(sizeof(double complex) * (nocc*nocc*nocc*3+2));
696
696
  if (cache1 == NULL) {
697
- fprintf(stderr, "malloc(%zu) falied in QCIsd_t_zcontract\n",
697
+ fprintf(stderr, "malloc(%zu) failed in QCIsd_t_zcontract\n",
698
698
  sizeof(double complex) * nocc*nocc*nocc*3);
699
699
  exit(1);
700
700
  }
@@ -880,7 +880,7 @@ void MPICCsd_t_contract(double *e_tot, double *mo_energy, double *t1T,
880
880
  size_t k;
881
881
  double *cache1 = malloc(sizeof(double) * (nocc*nocc*nocc*3+2));
882
882
  if (cache1 == NULL) {
883
- fprintf(stderr, "malloc(%zu) falied in MPICCsd_t_contract\n",
883
+ fprintf(stderr, "malloc(%zu) failed in MPICCsd_t_contract\n",
884
884
  sizeof(double) * nocc*nocc*nocc*3);
885
885
  exit(1);
886
886
  }
@@ -1113,7 +1113,7 @@ void CCsd_zcontract_t3T(double complex *t3Tw, double complex *t3Tv, double *mo_e
1113
1113
  size_t k;
1114
1114
  complex double *cache1 = malloc(sizeof(double complex) * (nocc*nocc*nocc*3+2));
1115
1115
  if (cache1 == NULL) {
1116
- fprintf(stderr, "malloc(%zu) falied in CCsd_zcontract_t3T\n",
1116
+ fprintf(stderr, "malloc(%zu) failed in CCsd_zcontract_t3T\n",
1117
1117
  sizeof(double complex) * nocc*nocc*nocc*3);
1118
1118
  exit(1);
1119
1119
  }
pyscf/lib/cc/uccsd_t.c CHANGED
@@ -308,7 +308,7 @@ void CCuccsd_t_aaa(double complex *e_tot,
308
308
  size_t k;
309
309
  double *cache1 = malloc(sizeof(double) * (nocc*nocc*nocc*3+2));
310
310
  if (cache1 == NULL) {
311
- fprintf(stderr, "malloc(%zu) falied in CCuccsd_t_aaa\n",
311
+ fprintf(stderr, "malloc(%zu) failed in CCuccsd_t_aaa\n",
312
312
  sizeof(double) * nocc*nocc*nocc*3);
313
313
  exit(1);
314
314
  }
@@ -557,7 +557,7 @@ void CCuccsd_t_baa(double complex *e_tot,
557
557
  double *cache1 = malloc(sizeof(double) * (noccb*nocca*nocca*5+1 +
558
558
  nocca*2+noccb*2));
559
559
  if (cache1 == NULL) {
560
- fprintf(stderr, "malloc(%zu) falied in CCuccsd_t_baa\n",
560
+ fprintf(stderr, "malloc(%zu) failed in CCuccsd_t_baa\n",
561
561
  sizeof(double) * noccb*nocca*nocca*5);
562
562
  exit(1);
563
563
  }
@@ -715,7 +715,7 @@ void CCuccsd_t_zaaa(double complex *e_tot,
715
715
  double complex *cache1 = malloc(sizeof(double complex) *
716
716
  (nocc*nocc*nocc*3+2));
717
717
  if (cache1 == NULL) {
718
- fprintf(stderr, "malloc(%zu) falied in CCuccsd_t_zaaa\n",
718
+ fprintf(stderr, "malloc(%zu) failed in CCuccsd_t_zaaa\n",
719
719
  sizeof(double complex) * nocc*nocc*nocc*3);
720
720
  exit(1);
721
721
  }
@@ -924,7 +924,7 @@ void CCuccsd_t_zbaa(double complex *e_tot,
924
924
  (noccb*nocca*nocca*5+1 +
925
925
  nocca*2+noccb*2));
926
926
  if (cache1 == NULL) {
927
- fprintf(stderr, "malloc(%zu) falied in CCuccsd_t_zbaa\n",
927
+ fprintf(stderr, "malloc(%zu) failed in CCuccsd_t_zbaa\n",
928
928
  sizeof(double complex) * noccb*nocca*nocca*5);
929
929
  exit(1);
930
930
  }
@@ -33,6 +33,7 @@
33
33
  # define XCFUN_DEPRECATED_NO_EXPORT XCFUN_NO_EXPORT XCFUN_DEPRECATED
34
34
  #endif
35
35
 
36
+ /* NOLINTNEXTLINE(readability-avoid-unconditional-preprocessor-if) */
36
37
  #if 1 /* DEFINE_NO_DEPRECATED */
37
38
  # ifndef XCFUN_NO_DEPRECATED
38
39
  # define XCFUN_NO_DEPRECATED
@@ -242,7 +242,7 @@ int orth_components(double *xs_exp, int* bounds, double dx, double radius,
242
242
  }
243
243
  }
244
244
 
245
- // add up contributions from all images to the referece image
245
+ // add up contributions from all images to the reference image
246
246
  if (ngridx >= nx_per_cell) {
247
247
  memset(xs_exp, 0, (topl+1)*nx_per_cell*sizeof(double));
248
248
  int ix, l, lb, ub, size_x;
@@ -1153,6 +1153,7 @@ void LIBXC_xc_reference(int xc_id, const char **refs)
1153
1153
  }
1154
1154
  refs[i] = func.info->refs[i]->ref;
1155
1155
  }
1156
+ xc_func_end(&func);
1156
1157
  }
1157
1158
 
1158
1159
  int LIBXC_is_nlc(int xc_id)
@@ -1162,5 +1163,7 @@ int LIBXC_is_nlc(int xc_id)
1162
1163
  fprintf(stderr, "XC functional %d not found\n", xc_id);
1163
1164
  raise_error -1;
1164
1165
  }
1165
- return func.info->flags & XC_FLAGS_VV10;
1166
+ int is_nlc = func.info->flags & XC_FLAGS_VV10;
1167
+ xc_func_end(&func);
1168
+ return is_nlc;
1166
1169
  }
@@ -102,7 +102,7 @@ int XCFUN_eval_xc(int nfn, int *fn_id, double *fac, double *omega,
102
102
  rho = rho_u;
103
103
  err = eval_xc(fun, deriv, XC_N, np, 1, outlen, rho, output);
104
104
  }
105
- // xcfun computed rho*Exc[rho] for zeroth order deriviative instead of Exc[rho]
105
+ // xcfun computed rho*Exc[rho] for zeroth order derivative instead of Exc[rho]
106
106
  for (i = 0; i < np; i++) {
107
107
  output[i*outlen] /= rho_u[i] + 1e-150;
108
108
  }
pyscf/lib/diis.py CHANGED
@@ -135,7 +135,7 @@ class DIIS:
135
135
  else:
136
136
  self._diisfile[key] = value
137
137
  # to avoid "Unable to find a valid file signature" error when reload the hdf5
138
- # file from a crashed claculation
138
+ # file from a crashed calculation
139
139
  self._diisfile.flush()
140
140
 
141
141
  def push_err_vec(self, xerr):
pyscf/lib/exceptions.py CHANGED
@@ -20,3 +20,6 @@ class BasisNotFoundError(RuntimeError):
20
20
 
21
21
  class PointGroupSymmetryError(RuntimeError):
22
22
  pass
23
+
24
+ class WfnSymmetryError(RuntimeError):
25
+ pass
@@ -34,24 +34,26 @@
34
34
  #define BLKSIZE 312
35
35
 
36
36
  // for grids integrals only
37
- int _max_cache_size(int (*intor)(), int *shls_slice, int ncenter,
38
- int *atm, int natm, int *bas, int nbas, double *env)
37
+ size_t _max_cache_size(int (*intor)(), int *shls_slice, int ncenter,
38
+ int *atm, int natm, int *bas, int nbas, double *env)
39
39
  {
40
- int i, n;
40
+ int i;
41
41
  int i0 = shls_slice[0];
42
42
  int i1 = shls_slice[1];
43
43
  for (i = 1; i < ncenter; i++) {
44
44
  i0 = MIN(i0, shls_slice[i*2 ]);
45
45
  i1 = MAX(i1, shls_slice[i*2+1]);
46
46
  }
47
+ size_t (*f)() = (size_t (*)())intor;
48
+ size_t cache_size = 0;
49
+ size_t n;
47
50
  int shls[4];
48
- int cache_size = 0;
49
51
  for (i = i0; i < i1; i++) {
50
52
  shls[0] = i;
51
53
  shls[1] = i;
52
54
  shls[2] = 0;
53
55
  shls[3] = BLKSIZE;
54
- n = (*intor)(NULL, NULL, shls, atm, natm, bas, nbas, env, NULL, NULL);
56
+ n = (*f)(NULL, NULL, shls, atm, natm, bas, nbas, env, NULL, NULL);
55
57
  cache_size = MAX(cache_size, n);
56
58
  }
57
59
  return cache_size;
@@ -73,8 +75,8 @@ void GTOgrids_int2c(int (*intor)(), double *mat, int comp, int hermi,
73
75
  const int njsh = jsh1 - jsh0;
74
76
  const size_t naoi = ao_loc[ish1] - ao_loc[ish0];
75
77
  const size_t naoj = ao_loc[jsh1] - ao_loc[jsh0];
76
- const int cache_size = _max_cache_size(intor, shls_slice, 2,
77
- atm, natm, bas, nbas, env);
78
+ const size_t cache_size = _max_cache_size(intor, shls_slice, 2,
79
+ atm, natm, bas, nbas, env);
78
80
  const int dims[] = {naoi, naoj, ngrids};
79
81
  #pragma omp parallel
80
82
  {
@@ -151,8 +153,8 @@ void GTOgrids_int2c_spinor(int (*intor)(), double complex *mat, int comp, int he
151
153
  const int njsh = jsh1 - jsh0;
152
154
  const size_t naoi = ao_loc[ish1] - ao_loc[ish0];
153
155
  const size_t naoj = ao_loc[jsh1] - ao_loc[jsh0];
154
- const int cache_size = _max_cache_size(intor, shls_slice, 2,
155
- atm, natm, bas, nbas, env);
156
+ const size_t cache_size = _max_cache_size(intor, shls_slice, 2,
157
+ atm, natm, bas, nbas, env);
156
158
  int dims[] = {naoi, naoj, ngrids};
157
159
  #pragma omp parallel
158
160
  {
@@ -39,24 +39,26 @@ int GTOmax_shell_dim(const int *ao_loc, const int *shls_slice, int ncenter)
39
39
  }
40
40
  return di;
41
41
  }
42
- int GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
43
- int *atm, int natm, int *bas, int nbas, double *env)
42
+ size_t GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
43
+ int *atm, int natm, int *bas, int nbas, double *env)
44
44
  {
45
- int i, n;
45
+ int i;
46
46
  int i0 = shls_slice[0];
47
47
  int i1 = shls_slice[1];
48
48
  for (i = 1; i < ncenter; i++) {
49
49
  i0 = MIN(i0, shls_slice[i*2 ]);
50
50
  i1 = MAX(i1, shls_slice[i*2+1]);
51
51
  }
52
+ size_t (*f)() = (size_t (*)())intor;
53
+ size_t cache_size = 0;
54
+ size_t n;
52
55
  int shls[4];
53
- int cache_size = 0;
54
56
  for (i = i0; i < i1; i++) {
55
57
  shls[0] = i;
56
58
  shls[1] = i;
57
59
  shls[2] = i;
58
60
  shls[3] = i;
59
- n = (*intor)(NULL, NULL, shls, atm, natm, bas, nbas, env, NULL, NULL);
61
+ n = (*f)(NULL, NULL, shls, atm, natm, bas, nbas, env, NULL, NULL);
60
62
  cache_size = MAX(cache_size, n);
61
63
  }
62
64
  return cache_size;
pyscf/lib/gto/fill_r_4c.c CHANGED
@@ -88,7 +88,7 @@ void GTOr4c_drv(int (*intor)(), void (*fill)(), int (*prescreen)(),
88
88
  int ish, jsh, ij;
89
89
  double *buf = malloc(sizeof(double) * cache_size);
90
90
  if (buf == NULL) {
91
- fprintf(stderr, "malloc(%zu) falied in GTOr4c_drv\n",
91
+ fprintf(stderr, "malloc(%zu) failed in GTOr4c_drv\n",
92
92
  sizeof(double) * cache_size);
93
93
  exit(1);
94
94
  }
pyscf/lib/gto/ft_ao.c CHANGED
@@ -803,7 +803,7 @@ int GTO_ft_aopair_drv(double *outR, double *outI, int *dims,
803
803
  size_t cache_size = ft_aopair_cache_size(envs) * (size_t)block_size;
804
804
  stack = malloc(sizeof(double)*cache_size);
805
805
  if (stack == NULL) {
806
- fprintf(stderr, "gctr = malloc(%zu) falied in GTO_ft_aopair_drv\n",
806
+ fprintf(stderr, "gctr = malloc(%zu) failed in GTO_ft_aopair_drv\n",
807
807
  sizeof(double) * cache_size);
808
808
  return 0;
809
809
  }
pyscf/lib/gto/ft_ao.h CHANGED
@@ -32,7 +32,7 @@ typedef struct {
32
32
 
33
33
  int i_l;
34
34
  int j_l;
35
- int nfi; // number of cartesion components
35
+ int nfi; // number of cartesian components
36
36
  int nfj;
37
37
  int nf; // = nfi*nfj
38
38
  int ngrids; // number of grids or planewaves
pyscf/lib/gto/gto.h CHANGED
@@ -14,5 +14,5 @@
14
14
  */
15
15
 
16
16
  int GTOmax_shell_dim(const int *ao_loc, const int *shls, int ncenter);
17
- int GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
18
- int *atm, int natm, int *bas, int nbas, double *env);
17
+ size_t GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
18
+ int *atm, int natm, int *bas, int nbas, double *env);
pyscf/lib/gto/nr_ecp.c CHANGED
@@ -5553,7 +5553,7 @@ int ECPtype_so_cart(double *gctr, int *shls, int *ecpbas, int necpbas,
5553
5553
  // be careful with the factor 1/2 for the spin operator s = 1/2 Pauli matrix
5554
5554
  // The ECPso_cart and ECPso_sph integral code evaluates the integrals
5555
5555
  // <i|H^{SO}|j> as shown in NWChem ECP doc
5556
- // http://www.nwchem-sw.org/index.php/ECP
5556
+ // https://nwchemgit.github.io/ECP.html
5557
5557
  // Note when calling ECPso_spinor function to evaluate the integrals in
5558
5558
  // spinor basis pyscf evaluates the expression like
5559
5559
  // einsum('sxy,spq,xpi,yqj->ij', pauli_matrix, so_sph, ui.conj(), uj)
@@ -5872,7 +5872,8 @@ int ECPtype1_cart(double *gctr, int *shls, int *ecpbas, int necpbas,
5872
5872
  for (i = 0; i < d3; i++) { rad_all[i] = 0; }
5873
5873
 
5874
5874
  for (iloc = 0; iloc < nslots; iloc++) {
5875
- if (ecpbas[ANG_OF+ecploc[iloc]*BAS_SLOTS] != -1) {
5875
+ if (ecpbas[ANG_OF+ecploc[iloc]*BAS_SLOTS] != -1 ||
5876
+ ecpbas[SO_TYPE_OF+ecploc[iloc]*BAS_SLOTS] == 1) {
5876
5877
  continue;
5877
5878
  }
5878
5879
  atm_id = ecpbas[ATOM_OF+ecploc[iloc]*BAS_SLOTS];
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
Binary file
pyscf/lib/libpbc.dylib CHANGED
Binary file
pyscf/lib/libri.dylib CHANGED
Binary file
Binary file
Binary file