pyscf 2.6.2__py3-none-macosx_11_0_arm64.whl → 2.8.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 (360) 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/__init__.py +13 -2
  20. pyscf/ao2mo/_ao2mo.py +10 -1
  21. pyscf/ao2mo/incore.py +3 -0
  22. pyscf/ao2mo/nrr_outcore.py +2 -2
  23. pyscf/ao2mo/outcore.py +9 -7
  24. pyscf/ao2mo/r_outcore.py +2 -2
  25. pyscf/cc/__init__.py +21 -3
  26. pyscf/cc/bccd.py +0 -46
  27. pyscf/cc/ccsd.py +29 -13
  28. pyscf/cc/ccsd_rdm.py +6 -1
  29. pyscf/cc/gccsd.py +2 -2
  30. pyscf/cc/uccsd.py +7 -7
  31. pyscf/cc/uccsd_rdm.py +2 -2
  32. pyscf/data/elements.py +1 -1
  33. pyscf/df/__init__.py +2 -1
  34. pyscf/df/addons.py +79 -51
  35. pyscf/df/autoaux.py +195 -0
  36. pyscf/df/df.py +5 -1
  37. pyscf/df/df_jk.py +27 -25
  38. pyscf/df/grad/casscf.py +0 -41
  39. pyscf/df/grad/rhf.py +31 -1
  40. pyscf/df/hessian/rhf.py +2 -10
  41. pyscf/df/hessian/rks.py +1 -7
  42. pyscf/df/hessian/uhf.py +3 -13
  43. pyscf/df/hessian/uks.py +1 -8
  44. pyscf/df/incore.py +18 -6
  45. pyscf/df/outcore.py +6 -6
  46. pyscf/dft/dks.py +1 -1
  47. pyscf/dft/gks.py +25 -21
  48. pyscf/dft/libxc.py +91 -645
  49. pyscf/dft/numint.py +40 -19
  50. pyscf/dft/radi.py +48 -7
  51. pyscf/dft/rks.py +29 -25
  52. pyscf/dft/roks.py +7 -1
  53. pyscf/dft/uks.py +34 -25
  54. pyscf/dft/xc_deriv.py +1 -1
  55. pyscf/dft/xcfun.py +53 -2
  56. pyscf/eph/eph_fd.py +1 -1
  57. pyscf/eph/rhf.py +6 -36
  58. pyscf/eph/rks.py +0 -4
  59. pyscf/eph/uhf.py +1 -7
  60. pyscf/eph/uks.py +1 -7
  61. pyscf/fci/addons.py +117 -2
  62. pyscf/fci/cistring.py +1 -1
  63. pyscf/fci/direct_nosym.py +3 -3
  64. pyscf/fci/direct_spin0_symm.py +22 -43
  65. pyscf/fci/direct_spin1.py +65 -10
  66. pyscf/fci/direct_spin1_symm.py +49 -14
  67. pyscf/fci/direct_uhf.py +4 -4
  68. pyscf/fci/selected_ci_symm.py +1 -1
  69. pyscf/grad/ccsd.py +3 -7
  70. pyscf/grad/ccsd_slow.py +2 -3
  71. pyscf/grad/lagrange.py +11 -3
  72. pyscf/grad/mp2.py +13 -4
  73. pyscf/grad/sacasscf.py +1 -1
  74. pyscf/grad/tdrks.py +1 -1
  75. pyscf/grad/uccsd.py +3 -7
  76. pyscf/grad/ump2.py +2 -4
  77. pyscf/gto/basis/__init__.py +17 -4
  78. pyscf/gto/basis/bse.py +68 -15
  79. pyscf/gto/basis/def2-mtzvp.dat +4719 -0
  80. pyscf/gto/basis/def2-mtzvpp.dat +4739 -0
  81. pyscf/gto/basis/dyall-basis/__init__.py +0 -0
  82. pyscf/gto/basis/dyall-basis/dyall_2zp.py +6492 -0
  83. pyscf/gto/basis/dyall-basis/dyall_3zp.py +8343 -0
  84. pyscf/gto/basis/dyall-basis/dyall_4zp.py +10055 -0
  85. pyscf/gto/basis/dyall-basis/dyall_aae2z.py +1818 -0
  86. pyscf/gto/basis/dyall-basis/dyall_aae3z.py +2521 -0
  87. pyscf/gto/basis/dyall-basis/dyall_aae4z.py +3351 -0
  88. pyscf/gto/basis/dyall-basis/dyall_acv2z.py +1790 -0
  89. pyscf/gto/basis/dyall-basis/dyall_acv3z.py +2417 -0
  90. pyscf/gto/basis/dyall-basis/dyall_acv4z.py +3085 -0
  91. pyscf/gto/basis/dyall-basis/dyall_ae2z.py +6619 -0
  92. pyscf/gto/basis/dyall-basis/dyall_ae3z.py +9027 -0
  93. pyscf/gto/basis/dyall-basis/dyall_ae4z.py +11839 -0
  94. pyscf/gto/basis/dyall-basis/dyall_av2z.py +1742 -0
  95. pyscf/gto/basis/dyall-basis/dyall_av3z.py +2318 -0
  96. pyscf/gto/basis/dyall-basis/dyall_av4z.py +2905 -0
  97. pyscf/gto/basis/dyall-basis/dyall_cv2z.py +6558 -0
  98. pyscf/gto/basis/dyall-basis/dyall_cv3z.py +8767 -0
  99. pyscf/gto/basis/dyall-basis/dyall_cv4z.py +11098 -0
  100. pyscf/gto/basis/dyall-basis/dyall_v2z.py +6472 -0
  101. pyscf/gto/basis/dyall-basis/dyall_v3z.py +8539 -0
  102. pyscf/gto/basis/dyall-basis/dyall_v4z.py +10658 -0
  103. pyscf/gto/basis/ma-def2-qzvp.dat +5959 -0
  104. pyscf/gto/basis/ma-def2-qzvpp.dat +6195 -0
  105. pyscf/gto/basis/ma-def2-svp.dat +3504 -0
  106. pyscf/gto/basis/ma-def2-svpp.dat +3504 -0
  107. pyscf/gto/basis/ma-def2-tzvp.dat +4347 -0
  108. pyscf/gto/basis/ma-def2-tzvpp.dat +4549 -0
  109. pyscf/gto/basis/parse_cp2k.py +8 -7
  110. pyscf/gto/basis/parse_cp2k_pp.py +1 -1
  111. pyscf/gto/basis/parse_nwchem.py +26 -11
  112. pyscf/gto/basis/parse_nwchem_ecp.py +2 -1
  113. pyscf/gto/basis/sap_grasp_large.dat +2438 -0
  114. pyscf/gto/basis/sap_grasp_small.dat +1434 -0
  115. pyscf/gto/eval_gto.py +1 -1
  116. pyscf/gto/ft_ao.py +6 -6
  117. pyscf/gto/mole.py +123 -71
  118. pyscf/gto/moleintor.py +1 -1
  119. pyscf/gw/gw_ac.py +2 -2
  120. pyscf/gw/gw_cd.py +2 -2
  121. pyscf/gw/rpa.py +135 -246
  122. pyscf/gw/ugw_ac.py +2 -2
  123. pyscf/gw/urpa.py +80 -131
  124. pyscf/hessian/rhf.py +30 -128
  125. pyscf/hessian/rks.py +1 -6
  126. pyscf/hessian/uhf.py +28 -138
  127. pyscf/hessian/uks.py +1 -8
  128. pyscf/lib/CMakeLists.txt +6 -2
  129. pyscf/lib/ao2mo/nr_ao2mo.c +1 -1
  130. pyscf/lib/ao2mo/nrr_ao2mo.c +1 -1
  131. pyscf/lib/ao2mo/r_ao2mo.c +1 -1
  132. pyscf/lib/cc/ccsd_pack.c +1 -1
  133. pyscf/lib/cc/ccsd_t.c +6 -6
  134. pyscf/lib/cc/uccsd_t.c +4 -4
  135. pyscf/lib/config.h +0 -1
  136. pyscf/lib/config.h.in +0 -1
  137. pyscf/lib/deps/include/XCFun/XCFunExport.h +1 -0
  138. pyscf/lib/deps/include/xc.h +28 -18
  139. pyscf/lib/deps/include/xc_funcs.h +50 -2
  140. pyscf/lib/deps/include/xc_version.h +3 -3
  141. pyscf/lib/deps/lib/libcint.6.dylib +0 -0
  142. pyscf/lib/deps/lib/{libxc.12.dylib → libxc.15.dylib} +0 -0
  143. pyscf/lib/deps/lib/libxcfun.2.dylib +0 -0
  144. pyscf/lib/dft/grid_common.c +1 -1
  145. pyscf/lib/dft/libxc_itrf.c +10 -7
  146. pyscf/lib/dft/nr_numint_sparse.c +3 -3
  147. pyscf/lib/dft/xcfun_itrf.c +1 -1
  148. pyscf/lib/diis.py +2 -2
  149. pyscf/lib/exceptions.py +6 -0
  150. pyscf/lib/gto/fill_grids_int2c.c +11 -9
  151. pyscf/lib/gto/fill_int2e.c +7 -5
  152. pyscf/lib/gto/fill_r_4c.c +1 -1
  153. pyscf/lib/gto/ft_ao.c +1 -1
  154. pyscf/lib/gto/ft_ao.h +1 -1
  155. pyscf/lib/gto/gto.h +2 -2
  156. pyscf/lib/gto/nr_ecp.c +3 -2
  157. pyscf/lib/libagf2.dylib +0 -0
  158. pyscf/lib/libao2mo.dylib +0 -0
  159. pyscf/lib/libcc.dylib +0 -0
  160. pyscf/lib/libcgto.dylib +0 -0
  161. pyscf/lib/libcvhf.dylib +0 -0
  162. pyscf/lib/libdft.dylib +0 -0
  163. pyscf/lib/libfci.dylib +0 -0
  164. pyscf/lib/libmcscf.dylib +0 -0
  165. pyscf/lib/libmp.dylib +0 -0
  166. pyscf/lib/libnp_helper.dylib +0 -0
  167. pyscf/lib/libpbc.dylib +0 -0
  168. pyscf/lib/libri.dylib +0 -0
  169. pyscf/lib/libxc_itrf.dylib +0 -0
  170. pyscf/lib/libxcfun_itrf.dylib +0 -0
  171. pyscf/lib/linalg_helper.py +117 -198
  172. pyscf/lib/logger.py +2 -1
  173. pyscf/lib/mcscf/fci_contract.c +10 -3
  174. pyscf/lib/misc.py +63 -22
  175. pyscf/lib/mp/CMakeLists.txt +22 -0
  176. pyscf/lib/mp/mp2.c +518 -0
  177. pyscf/lib/mp/mp2.h +44 -0
  178. pyscf/lib/np_helper/CMakeLists.txt +1 -1
  179. pyscf/lib/np_helper/imatcopy.c +360 -0
  180. pyscf/lib/np_helper/np_helper.c +94 -0
  181. pyscf/lib/np_helper/np_helper.h +26 -0
  182. pyscf/lib/numpy_helper.py +195 -11
  183. pyscf/lib/pbc/nr_direct.c +2 -7
  184. pyscf/lib/pbc/nr_ecp.c +10 -3
  185. pyscf/lib/pbc/pbc.h +1 -1
  186. pyscf/lib/vhf/fblas.h +3 -0
  187. pyscf/lib/vhf/nr_sgx_direct.c +8 -6
  188. pyscf/lib/vhf/nr_sr_vhf.c +8 -12
  189. pyscf/lib/vhf/optimizer.c +2 -2
  190. pyscf/lib/vhf/rkb_screen.c +139 -0
  191. pyscf/lo/iao.py +1 -1
  192. pyscf/lo/ibo.py +3 -3
  193. pyscf/lo/pipek_jacobi.py +1 -1
  194. pyscf/mcscf/__init__.py +2 -2
  195. pyscf/mcscf/addons.py +3 -3
  196. pyscf/mcscf/apc.py +2 -2
  197. pyscf/mcscf/casci.py +13 -7
  198. pyscf/mcscf/chkfile.py +69 -41
  199. pyscf/mcscf/dmet_cas.py +2 -2
  200. pyscf/mcscf/mc1step.py +72 -44
  201. pyscf/mcscf/newton_casscf.py +5 -5
  202. pyscf/mcscf/ucasci.py +1 -1
  203. pyscf/mcscf/umc1step.py +49 -28
  204. pyscf/md/integrators.py +3 -3
  205. pyscf/mp/__init__.py +1 -0
  206. pyscf/mp/dfmp2.py +498 -59
  207. pyscf/mp/dfmp2_native.py +11 -1
  208. pyscf/mp/dfmp2_slow.py +133 -0
  209. pyscf/mp/dfump2.py +672 -0
  210. pyscf/mp/dfump2_native.py +9 -0
  211. pyscf/mp/dfump2_slow.py +161 -0
  212. pyscf/mp/gmp2.py +6 -47
  213. pyscf/mp/mp2.py +25 -10
  214. pyscf/mp/ump2.py +30 -24
  215. pyscf/pbc/adc/kadc_rhf.py +1 -1
  216. pyscf/pbc/adc/kadc_rhf_amplitudes.py +2 -2
  217. pyscf/pbc/ao2mo/eris.py +1 -1
  218. pyscf/pbc/cc/kccsd_rhf.py +3 -3
  219. pyscf/pbc/cc/kccsd_t_rhf.py +2 -2
  220. pyscf/pbc/ci/kcis_rhf.py +2 -2
  221. pyscf/pbc/df/aft.py +8 -9
  222. pyscf/pbc/df/aft_ao2mo.py +1 -1
  223. pyscf/pbc/df/df.py +85 -12
  224. pyscf/pbc/df/df_jk.py +6 -2
  225. pyscf/pbc/df/fft.py +9 -5
  226. pyscf/pbc/df/fft_ao2mo.py +4 -0
  227. pyscf/pbc/df/fft_jk.py +18 -10
  228. pyscf/pbc/df/ft_ao.py +4 -3
  229. pyscf/pbc/df/gdf_builder.py +5 -4
  230. pyscf/pbc/df/incore.py +2 -2
  231. pyscf/pbc/df/mdf.py +6 -3
  232. pyscf/pbc/df/mdf_jk.py +2 -1
  233. pyscf/pbc/df/outcore.py +10 -10
  234. pyscf/pbc/df/rsdf.py +2 -2
  235. pyscf/pbc/df/rsdf_builder.py +13 -8
  236. pyscf/pbc/df/rsdf_helper.py +6 -6
  237. pyscf/pbc/df/rsdf_jk.py +2 -1
  238. pyscf/pbc/dft/cdft.py +5 -5
  239. pyscf/pbc/dft/gen_grid.py +3 -2
  240. pyscf/pbc/dft/gks.py +14 -3
  241. pyscf/pbc/dft/kgks.py +15 -4
  242. pyscf/pbc/dft/krks.py +28 -10
  243. pyscf/pbc/dft/krks_ksymm.py +21 -9
  244. pyscf/pbc/dft/krkspu.py +1 -30
  245. pyscf/pbc/dft/krkspu_ksymm.py +0 -30
  246. pyscf/pbc/dft/kuks.py +30 -13
  247. pyscf/pbc/dft/kuks_ksymm.py +22 -10
  248. pyscf/pbc/dft/kukspu.py +0 -27
  249. pyscf/pbc/dft/kukspu_ksymm.py +0 -30
  250. pyscf/pbc/dft/multigrid/multigrid.py +36 -33
  251. pyscf/pbc/dft/multigrid/multigrid_pair.py +7 -2
  252. pyscf/pbc/dft/multigrid/pp.py +1 -1
  253. pyscf/pbc/dft/numint.py +56 -31
  254. pyscf/pbc/dft/rks.py +16 -24
  255. pyscf/pbc/dft/uks.py +21 -4
  256. pyscf/pbc/eph/eph_fd.py +1 -1
  257. pyscf/pbc/geomopt/geometric_solver.py +1 -1
  258. pyscf/pbc/gto/_pbcintor.py +1 -0
  259. pyscf/pbc/gto/cell.py +194 -23
  260. pyscf/pbc/gto/ecp.py +12 -12
  261. pyscf/pbc/gto/eval_gto.py +3 -3
  262. pyscf/pbc/gto/neighborlist.py +4 -1
  263. pyscf/pbc/gto/pseudo/pp.py +1 -1
  264. pyscf/pbc/gw/krgw_ac.py +4 -4
  265. pyscf/pbc/gw/krgw_cd.py +4 -4
  266. pyscf/pbc/gw/kugw_ac.py +3 -3
  267. pyscf/pbc/lib/kpts_helper.py +4 -3
  268. pyscf/pbc/lib/linalg_helper.py +1 -1
  269. pyscf/pbc/mp/kmp2.py +1 -1
  270. pyscf/pbc/mpitools/mpi.py +1 -1
  271. pyscf/pbc/scf/_response_functions.py +141 -34
  272. pyscf/pbc/scf/addons.py +15 -11
  273. pyscf/pbc/scf/cphf.py +1 -1
  274. pyscf/pbc/scf/ghf.py +1 -1
  275. pyscf/pbc/scf/hf.py +21 -32
  276. pyscf/pbc/scf/kghf.py +33 -29
  277. pyscf/pbc/scf/khf.py +103 -29
  278. pyscf/pbc/scf/khf_ksymm.py +15 -1
  279. pyscf/pbc/scf/krohf.py +5 -7
  280. pyscf/pbc/scf/kuhf.py +54 -23
  281. pyscf/pbc/scf/kuhf_ksymm.py +1 -1
  282. pyscf/pbc/scf/rsjk.py +14 -10
  283. pyscf/pbc/scf/scfint.py +1 -1
  284. pyscf/pbc/scf/stability.py +27 -15
  285. pyscf/pbc/scf/uhf.py +3 -1
  286. pyscf/pbc/symm/symmetry.py +2 -2
  287. pyscf/pbc/tdscf/krhf.py +238 -154
  288. pyscf/pbc/tdscf/krks.py +1 -45
  289. pyscf/pbc/tdscf/kuhf.py +319 -171
  290. pyscf/pbc/tdscf/kuks.py +0 -56
  291. pyscf/pbc/tdscf/rhf.py +116 -3
  292. pyscf/pbc/tdscf/rks.py +2 -1
  293. pyscf/pbc/tdscf/uhf.py +214 -1
  294. pyscf/pbc/tdscf/uks.py +2 -1
  295. pyscf/pbc/tools/k2gamma.py +20 -6
  296. pyscf/pbc/tools/lattice.py +3 -3
  297. pyscf/pbc/tools/pbc.py +111 -91
  298. pyscf/pbc/tools/pyscf_ase.py +0 -1
  299. pyscf/pbc/tools/pywannier90.py +1 -1
  300. pyscf/qmmm/mm_mole.py +1 -1
  301. pyscf/scf/_response_functions.py +87 -46
  302. pyscf/scf/_vhf.py +15 -10
  303. pyscf/scf/addons.py +29 -15
  304. pyscf/scf/cphf.py +14 -52
  305. pyscf/scf/dhf.py +121 -38
  306. pyscf/scf/dispersion.py +10 -9
  307. pyscf/scf/ghf.py +25 -13
  308. pyscf/scf/ghf_symm.py +2 -2
  309. pyscf/scf/hf.py +262 -30
  310. pyscf/scf/rohf.py +37 -5
  311. pyscf/scf/stability.py +142 -112
  312. pyscf/scf/ucphf.py +21 -16
  313. pyscf/scf/uhf.py +104 -61
  314. pyscf/sgx/sgx.py +1 -1
  315. pyscf/sgx/sgx_jk.py +4 -4
  316. pyscf/solvent/__init__.py +2 -2
  317. pyscf/solvent/_attach_solvent.py +2 -0
  318. pyscf/solvent/_ddcosmo_tdscf_grad.py +1 -1
  319. pyscf/solvent/cosmors.py +366 -0
  320. pyscf/solvent/ddcosmo.py +1 -1
  321. pyscf/solvent/pcm.py +4 -4
  322. pyscf/solvent/pol_embed.py +1 -1
  323. pyscf/solvent/smd.py +5 -3
  324. pyscf/soscf/ciah.py +3 -11
  325. pyscf/soscf/newton_ah.py +5 -2
  326. pyscf/symm/__init__.py +1 -1
  327. pyscf/symm/addons.py +5 -5
  328. pyscf/symm/geom.py +1 -5
  329. pyscf/tdscf/_lr_eig.py +1002 -0
  330. pyscf/tdscf/dhf.py +84 -87
  331. pyscf/tdscf/dks.py +0 -4
  332. pyscf/tdscf/ghf.py +139 -127
  333. pyscf/tdscf/gks.py +27 -25
  334. pyscf/tdscf/rhf.py +194 -147
  335. pyscf/tdscf/rks.py +26 -22
  336. pyscf/tdscf/uhf.py +166 -118
  337. pyscf/tdscf/uks.py +32 -31
  338. pyscf/tools/fcidump.py +3 -0
  339. pyscf/tools/qcschema.py +265 -0
  340. pyscf/x2c/sfx2c1e.py +1 -1
  341. pyscf/x2c/tdscf.py +41 -41
  342. pyscf/x2c/x2c.py +15 -11
  343. {pyscf-2.6.2.dist-info → pyscf-2.8.0.dist-info}/METADATA +39 -36
  344. {pyscf-2.6.2.dist-info → pyscf-2.8.0.dist-info}/NOTICE +14 -1
  345. {pyscf-2.6.2.dist-info → pyscf-2.8.0.dist-info}/RECORD +348 -316
  346. {pyscf-2.6.2.dist-info → pyscf-2.8.0.dist-info}/WHEEL +1 -1
  347. pyscf/dft/gen_libxc_param.py +0 -35
  348. pyscf/dft/gen_xcfun_param.py +0 -209
  349. pyscf/pbc/tdscf/kproxy.py +0 -189
  350. pyscf/pbc/tdscf/kproxy_supercell.py +0 -664
  351. pyscf/pbc/tdscf/krhf_slow.py +0 -300
  352. pyscf/pbc/tdscf/krhf_slow_gamma.py +0 -175
  353. pyscf/pbc/tdscf/krhf_slow_supercell.py +0 -250
  354. pyscf/pbc/tdscf/proxy.py +0 -39
  355. pyscf/pbc/tdscf/rhf_slow.py +0 -35
  356. pyscf/tdscf/common_slow.py +0 -799
  357. pyscf/tdscf/proxy.py +0 -258
  358. pyscf/tdscf/rhf_slow.py +0 -181
  359. {pyscf-2.6.2.dist-info → pyscf-2.8.0.dist-info}/LICENSE +0 -0
  360. {pyscf-2.6.2.dist-info → pyscf-2.8.0.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-macosx_11_0_arm64
5
5
 
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env python
2
- # Copyright 2014-2019 The PySCF Developers. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- import os
17
- import sys
18
- ldpath = os.path.abspath(os.path.join(__file__, '..', '..', 'lib', 'deps', 'lib'))
19
- if ldpath not in os.environ['LD_LIBRARY_PATH']:
20
- sys.stderr.write(f'Set\n\tLD_LIBRARY_PATH={ldpath}:$LD_LIBRARY_PATH\n'
21
- 'and rerun the script\n')
22
- exit()
23
-
24
- pypath = os.path.join(__file__, '..', '..', 'lib', 'build', 'deps', 'src', 'libxc')
25
- sys.path.insert(0, os.path.abspath(pypath))
26
- import pylibxc
27
-
28
- for xcname in pylibxc.util.xc_available_functional_names():
29
- f = pylibxc.LibXCFunctional(xcname, 1)
30
- f_id = f.get_number()
31
- ref = f.get_references()
32
- key = f"'{xcname.upper()}'"
33
- print(f"{key:<31s}: {f_id:<3d}, # {ref[0]}")
34
- for r in ref[1:]:
35
- print(f" # {r}")
@@ -1,209 +0,0 @@
1
- #!/usr/bin/env python
2
- # Copyright 2014-2020 The PySCF Developers. All Rights Reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- from pyscf import dft
17
- import ctypes
18
-
19
- libdft = dft.xcfun._itrf
20
- libdft.xc_enumerate_parameters.restype = ctypes.c_char_p
21
- libdft.XCFUN_xc_type.restype = ctypes.c_int
22
- libdft.xc_describe_short.restype = ctypes.c_char_p
23
- libdft.xc_describe_short.argtype = [ctypes.c_char_p]
24
- libdft.xc_describe_long.restype = ctypes.c_char_p
25
- libdft.xc_describe_long.argtype = [ctypes.c_char_p]
26
- lda_ids = []
27
- gga_ids = []
28
- mgga_ids = []
29
- mlgga_ids = []
30
- xc_codes = {}
31
- for i in range(68):
32
- name = libdft.xc_enumerate_parameters(ctypes.c_int(i))
33
- sdescr = libdft.xc_describe_short(name)
34
- #ldescr = libdft.xc_describe_long(ctypes.c_int(i))
35
- if sdescr is not None:
36
- #print("'%s' : %d, # %s" % (name, i, sdescr.replace('\n', '. ')))
37
- print('%-16s: %2d, # %s' % ("'%s'"%name, i, sdescr.replace('\n', '. ')))
38
- xc_codes[name] = i
39
-
40
- fntype = libdft.XCFUN_xc_type(ctypes.c_int(i))
41
- if fntype == 0:
42
- lda_ids.append(i)
43
- elif fntype == 1:
44
- gga_ids.append(i)
45
- elif fntype == 2:
46
- mgga_ids.append(i)
47
-
48
- alias = {
49
- 'SLATER': 'SLATERX',
50
- 'LDA' : 'SLATERX',
51
- 'VWN' : 'VWN5C',
52
- 'VWN5' : 'VWN5C',
53
- 'B88' : 'BECKEX',
54
- 'LYP' : 'LYPC',
55
- }
56
- for k, v in alias.items():
57
- print('%-16s: %2d, # %s' % ("'%s'"%k, xc_codes[v], v))
58
- print('LDA_IDS = %s' % lda_ids)
59
- print('GGA_IDS = %s' % gga_ids)
60
- print('MGGA_IDS = %s' % mgga_ids)
61
-
62
- #define XC_D0 0
63
- #define XC_D1 1
64
- #define XC_D2 2
65
- #define XC_D3 3
66
- #define XC_D4 4
67
-
68
- #define XC_D00 0
69
- #define XC_D10 1
70
- #define XC_D01 2
71
- #define XC_D20 3
72
- #define XC_D11 4
73
- #define XC_D02 5
74
- #define XC_D30 6
75
- #define XC_D21 7
76
- #define XC_D12 8
77
- #define XC_D03 9
78
- #define XC_D40 10
79
- #define XC_D31 11
80
- #define XC_D22 12
81
- #define XC_D13 13
82
- #define XC_D04 14
83
-
84
- #define XC_D00000 0
85
- #define XC_D10000 1
86
- #define XC_D01000 2
87
- #define XC_D00100 3
88
- #define XC_D00010 4
89
- #define XC_D00001 5
90
- #define XC_D20000 6
91
- #define XC_D11000 7
92
- #define XC_D10100 8
93
- #define XC_D10010 9
94
- #define XC_D10001 10
95
- #define XC_D02000 11
96
- #define XC_D01100 12
97
- #define XC_D01010 13
98
- #define XC_D01001 14
99
- #define XC_D00200 15
100
- #define XC_D00110 16
101
- #define XC_D00101 17
102
- #define XC_D00020 18
103
- #define XC_D00011 19
104
- #define XC_D00002 20
105
- #define XC_D30000 21
106
- #define XC_D21000 22
107
- #define XC_D20100 23
108
- #define XC_D20010 24
109
- #define XC_D20001 25
110
- #define XC_D12000 26
111
- #define XC_D11100 27
112
- #define XC_D11010 28
113
- #define XC_D11001 29
114
- #define XC_D10200 30
115
- #define XC_D10110 31
116
- #define XC_D10101 32
117
- #define XC_D10020 33
118
- #define XC_D10011 34
119
- #define XC_D10002 35
120
- #define XC_D03000 36
121
- #define XC_D02100 37
122
- #define XC_D02010 38
123
- #define XC_D02001 39
124
- #define XC_D01200 40
125
- #define XC_D01110 41
126
- #define XC_D01101 42
127
- #define XC_D01020 43
128
- #define XC_D01011 44
129
- #define XC_D01002 45
130
- #define XC_D00300 46
131
- #define XC_D00210 47
132
- #define XC_D00201 48
133
- #define XC_D00120 49
134
- #define XC_D00111 50
135
- #define XC_D00102 51
136
- #define XC_D00030 52
137
- #define XC_D00021 53
138
- #define XC_D00012 54
139
- #define XC_D00003 55
140
- #define XC_D40000 56
141
- #define XC_D31000 57
142
- #define XC_D30100 58
143
- #define XC_D30010 59
144
- #define XC_D30001 60
145
- #define XC_D22000 61
146
- #define XC_D21100 62
147
- #define XC_D21010 63
148
- #define XC_D21001 64
149
- #define XC_D20200 65
150
- #define XC_D20110 66
151
- #define XC_D20101 67
152
- #define XC_D20020 68
153
- #define XC_D20011 69
154
- #define XC_D20002 70
155
- #define XC_D13000 71
156
- #define XC_D12100 72
157
- #define XC_D12010 73
158
- #define XC_D12001 74
159
- #define XC_D11200 75
160
- #define XC_D11110 76
161
- #define XC_D11101 77
162
- #define XC_D11020 78
163
- #define XC_D11011 79
164
- #define XC_D11002 80
165
- #define XC_D10300 81
166
- #define XC_D10210 82
167
- #define XC_D10201 83
168
- #define XC_D10120 84
169
- #define XC_D10111 85
170
- #define XC_D10102 86
171
- #define XC_D10030 87
172
- #define XC_D10021 88
173
- #define XC_D10012 89
174
- #define XC_D10003 90
175
- #define XC_D04000 91
176
- #define XC_D03100 92
177
- #define XC_D03010 93
178
- #define XC_D03001 94
179
- #define XC_D02200 95
180
- #define XC_D02110 96
181
- #define XC_D02101 97
182
- #define XC_D02020 98
183
- #define XC_D02011 99
184
- #define XC_D02002 100
185
- #define XC_D01300 101
186
- #define XC_D01210 102
187
- #define XC_D01201 103
188
- #define XC_D01120 104
189
- #define XC_D01111 105
190
- #define XC_D01102 106
191
- #define XC_D01030 107
192
- #define XC_D01021 108
193
- #define XC_D01012 109
194
- #define XC_D01003 110
195
- #define XC_D00400 111
196
- #define XC_D00310 112
197
- #define XC_D00301 113
198
- #define XC_D00220 114
199
- #define XC_D00211 115
200
- #define XC_D00202 116
201
- #define XC_D00130 117
202
- #define XC_D00121 118
203
- #define XC_D00112 119
204
- #define XC_D00103 120
205
- #define XC_D00040 121
206
- #define XC_D00031 122
207
- #define XC_D00022 123
208
- #define XC_D00013 124
209
- #define XC_D00004 125
pyscf/pbc/tdscf/kproxy.py DELETED
@@ -1,189 +0,0 @@
1
- # Author: Artem Pulkin
2
- # flake8: noqa
3
- """
4
- This and other `proxy` modules implement the time-dependent mean-field procedure using the existing pyscf
5
- implementations as a black box. The main purpose of these modules is to overcome the existing limitations in pyscf
6
- (i.e. real-only orbitals, davidson diagonalizer, incomplete Bloch space, etc). The primary performance drawback is that,
7
- unlike the original pyscf routines with an implicit construction of the eigenvalue problem, these modules construct TD
8
- matrices explicitly by proxying to pyscf density response routines with a O(N^4) complexity scaling. As a result,
9
- regular `numpy.linalg.eig` can be used to retrieve TD roots. Several variants of proxy-TD are available:
10
-
11
- * `pyscf.tdscf.proxy`: the molecular implementation;
12
- * `pyscf.pbc.tdscf.proxy`: PBC (periodic boundary condition) Gamma-point-only implementation;
13
- * `pyscf.pbc.tdscf.kproxy_supercell`: PBC implementation constructing supercells. Works with an arbitrary number of
14
- k-points but has an overhead due to ignoring the momentum conservation law. In addition, works only with
15
- time reversal invariant (TRI) models: i.e. the k-point grid has to be aligned and contain at least one TRI momentum.
16
- * (this module) `pyscf.pbc.tdscf.kproxy`: same as the above but respect the momentum conservation and, thus, diagonlizes smaller
17
- matrices (the performance gain is the total number of k-points in the model).
18
- """
19
-
20
- # Convention for these modules:
21
- # * PhysERI is the proxying class constructing time-dependent matrices
22
- # * vector_to_amplitudes reshapes and normalizes the solution
23
- # * TDProxy provides a container
24
-
25
- from functools import reduce
26
- from pyscf.pbc.tdscf import kproxy_supercell, krhf_slow
27
-
28
- import numpy
29
-
30
-
31
- def kov2ov(nocc, nmo, k):
32
- """
33
- Converts k point pairs into ov mask.
34
- Args:
35
- nocc (Iterable): occupation numbers per k-point;
36
- nmo (Iterable): numbers of orbitals per k-point;
37
- k (ndarray): k-point pairs;
38
-
39
- Returns:
40
- An ov-mask. Basis order: [k_o, o, k_v, v].
41
- """
42
- nocc = numpy.asanyarray(nocc)
43
- nmo = numpy.asanyarray(nmo)
44
-
45
- nvirt = nmo - nocc
46
-
47
- mask = numpy.zeros((sum(nocc), sum(nvirt)), dtype=bool)
48
-
49
- o_e = numpy.cumsum(nocc)
50
- o_s = o_e - o_e[0]
51
-
52
- v_e = numpy.cumsum(nvirt)
53
- v_s = v_e - v_e[0]
54
-
55
- for k1, k2 in enumerate(k):
56
- mask[o_s[k1]:o_e[k1], v_s[k2]:v_e[k2]] = True
57
-
58
- return mask.reshape(-1)
59
-
60
-
61
- class PhysERI(kproxy_supercell.PhysERI):
62
- def __init__(self, model, proxy, x, mf_constructor, frozen=None, **kwargs):
63
- """
64
- A proxy class for calculating the TD matrix blocks (k-point version).
65
-
66
- Args:
67
- model: the base model with a time reversal-invariant k-point grid;
68
- proxy: a pyscf proxy with TD response function, one of 'hf', 'dft';
69
- x (Iterable): the original k-grid dimensions (numbers of k-points per each axis);
70
- mf_constructor (Callable): a function constructing the mean-field object;
71
- frozen (int, Iterable): the number of frozen valence orbitals or the list of frozen orbitals;
72
- **kwargs: arguments to `k2s` function constructing supercells;
73
- """
74
- super(PhysERI, self).__init__(model, proxy, x, mf_constructor, frozen=frozen, **kwargs)
75
-
76
- def get_ov_space_mask(self):
77
- """
78
- Prepares the space mask in the ov form.
79
- Returns:
80
- The mask in the ov form.
81
- """
82
- return kproxy_supercell.orb2ov(numpy.concatenate(self.space), self.nocc_full, self.nmo_full)
83
-
84
- def kov2ov(self, k):
85
- """
86
- Converts k-ov mask into ov mask.
87
- Args:
88
- k (ndarray): k-point pairs;
89
-
90
- Returns:
91
- An ov-mask. Basis order: [k_o, o, k_v, v].
92
- """
93
- mask = self.get_ov_space_mask()
94
- return numpy.logical_and(mask, kov2ov(self.nocc_full, self.nmo_full, k))
95
-
96
- def proxy_response_ov_batch(self, k_row, k_col):
97
- """
98
- A raw response submatrix corresponding to specific k-points.
99
- Args:
100
- k_row (ndarray): sets of k-point pairs (row index);
101
- k_col (ndarray): sets of k-point pairs (column index);
102
-
103
- Returns:
104
- A raw response matrix.
105
- """
106
- masks_row = tuple(self.kov2ov(i) for i in k_row)
107
- masks_col = tuple(self.kov2ov(i) for i in k_col)
108
-
109
- full_mask_row = reduce(numpy.logical_or, masks_row)
110
- full_mask_col = reduce(numpy.logical_or, masks_col)
111
-
112
- big = kproxy_supercell.supercell_response_ov(
113
- self.proxy_vind,
114
- (full_mask_row, full_mask_col),
115
- self.nocc_full,
116
- self.nmo_full,
117
- self.proxy_is_double(),
118
- self.model_super.supercell_inv_rotation,
119
- self.model,
120
- )
121
-
122
- result = []
123
-
124
- for m_row, m_col in zip(masks_row, masks_col):
125
- m_row_red = m_row[full_mask_row]
126
- m_col_red = m_col[full_mask_col]
127
- result.append(tuple(i[m_row_red][:, m_col_red] for i in big))
128
-
129
- return tuple(result)
130
-
131
- # This is needed for krhf_slow.get_block_k_ix
132
- get_k_ix = krhf_slow.PhysERI.get_k_ix.im_func
133
-
134
- def tdhf_primary_form(self, k):
135
- """
136
- A primary form of TD matrices (full).
137
- Args:
138
- k (tuple, int): momentum transfer: either a pair of k-point indexes specifying the momentum transfer
139
- vector or a single integer with the second index assuming the first index being zero;
140
-
141
- Returns:
142
- Output type: "full", and the corresponding matrix.
143
- """
144
- r1, r2, c1, c2 = krhf_slow.get_block_k_ix(self, k)
145
- (a, _), (_, b), (_, b_star), (a_star, _) = self.proxy_response_ov_batch((r1, r1, r2, r2), (c1, c2, c1, c2))
146
- return "full", numpy.block([[a, b], [-b_star.conj(), -a_star.conj()]])
147
-
148
-
149
- vector_to_amplitudes = krhf_slow.vector_to_amplitudes
150
-
151
-
152
- class TDProxy(kproxy_supercell.TDProxy):
153
- v2a = staticmethod(vector_to_amplitudes)
154
- proxy_eri = PhysERI
155
-
156
- def __init__(self, mf, proxy, x, mf_constructor, frozen=None, **kwargs):
157
- """
158
- Performs TD calculation. Roots and eigenvectors are stored in `self.e`, `self.xy`.
159
- Args:
160
- mf: the base model with a time-reversal invariant k-point grid;
161
- proxy: a pyscf proxy with TD response function, one of 'hf', 'dft';
162
- x (Iterable): the original k-grid dimensions (numbers of k-points per each axis);
163
- mf_constructor (Callable): a function constructing the mean-field object;
164
- frozen (int, Iterable): the number of frozen valence orbitals or the list of frozen orbitals;
165
- **kwargs: arguments to `k2s` function constructing supercells;
166
- """
167
- super(TDProxy, self).__init__(mf, proxy, x, mf_constructor, frozen=frozen, **kwargs)
168
- self.e = {}
169
- self.xy = {}
170
-
171
- def kernel(self, k=None):
172
- """
173
- Calculates eigenstates and eigenvalues of the TDHF problem.
174
- Args:
175
- k (tuple, int): momentum transfer: either an index specifying the momentum transfer or a list of such
176
- indexes;
177
-
178
- Returns:
179
- Positive eigenvalues and eigenvectors.
180
- """
181
- if k is None:
182
- k = numpy.arange(len(self._scf.kpts))
183
-
184
- if isinstance(k, int):
185
- k = [k]
186
-
187
- for kk in k:
188
- self.e[kk], self.xy[kk] = self.__kernel__(k=kk)
189
- return self.e, self.xy