pyscf 2.4.0__py3-none-macosx_11_0_arm64.whl → 2.6.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.
- pyscf/__init__.py +1 -1
- pyscf/adc/__init__.py +9 -12
- pyscf/adc/radc.py +2 -2
- pyscf/adc/radc_ea.py +2 -2
- pyscf/adc/radc_ip.py +2 -2
- pyscf/adc/radc_ip_cvs.py +2 -2
- pyscf/adc/uadc.py +2 -2
- pyscf/adc/uadc_ea.py +2 -2
- pyscf/adc/uadc_ip.py +2 -2
- pyscf/adc/uadc_ip_cvs.py +2 -2
- pyscf/agf2/__init__.py +1 -1
- pyscf/agf2/chempot.py +2 -2
- pyscf/agf2/dfragf2.py +4 -4
- pyscf/agf2/dfuagf2.py +4 -4
- pyscf/agf2/ragf2.py +5 -5
- pyscf/agf2/ragf2_slow.py +2 -2
- pyscf/agf2/uagf2.py +3 -3
- pyscf/agf2/uagf2_slow.py +2 -2
- pyscf/ao2mo/outcore.py +6 -6
- pyscf/cc/__init__.py +28 -35
- pyscf/cc/addons.py +2 -4
- pyscf/cc/ccsd.py +13 -2
- pyscf/cc/ccsd_t.py +1 -1
- pyscf/cc/ccsd_t_slow.py +1 -1
- pyscf/cc/dfccsd.py +4 -1
- pyscf/cc/eom_rccsd.py +2 -2
- pyscf/cc/gccsd.py +5 -1
- pyscf/cc/gccsd_t.py +2 -2
- pyscf/cc/gccsd_t_rdm.py +1 -1
- pyscf/cc/momgfccsd.py +2 -2
- pyscf/cc/qcisd_t_slow.py +1 -1
- pyscf/cc/rccsd.py +2 -0
- pyscf/cc/rccsd_slow.py +1 -1
- pyscf/cc/uccsd.py +5 -1
- pyscf/cc/uccsd_slow.py +1 -1
- pyscf/ci/__init__.py +31 -25
- pyscf/ci/addons.py +1 -2
- pyscf/ci/cisd.py +4 -2
- pyscf/data/elements.py +2 -2
- pyscf/df/addons.py +9 -9
- pyscf/df/df.py +9 -2
- pyscf/df/df_jk.py +14 -10
- pyscf/df/grad/casdm2_util.py +1 -1
- pyscf/df/grad/casscf.py +2 -0
- pyscf/df/grad/rhf.py +12 -8
- pyscf/df/grad/rks.py +6 -5
- pyscf/df/grad/sacasscf.py +2 -0
- pyscf/df/grad/uhf.py +4 -3
- pyscf/df/grad/uks.py +5 -5
- pyscf/df/hessian/rhf.py +9 -2
- pyscf/df/hessian/rks.py +2 -2
- pyscf/df/hessian/uhf.py +3 -3
- pyscf/df/hessian/uks.py +2 -2
- pyscf/df/incore.py +6 -5
- pyscf/df/outcore.py +16 -2
- pyscf/dft/LebedevGrid.py +5047 -0
- pyscf/dft/__init__.py +1 -0
- pyscf/dft/dft_parser.py +24 -0
- pyscf/dft/dks.py +10 -1
- pyscf/dft/gen_grid.py +9 -46
- pyscf/dft/gks.py +3 -1
- pyscf/dft/gks_symm.py +3 -0
- pyscf/dft/libxc.py +265 -147
- pyscf/dft/numint.py +24 -34
- pyscf/dft/numint2c.py +17 -30
- pyscf/dft/rks.py +47 -13
- pyscf/dft/rks_symm.py +6 -1
- pyscf/dft/roks.py +2 -0
- pyscf/dft/uks.py +4 -2
- pyscf/dft/uks_symm.py +3 -0
- pyscf/dft/xc_deriv.py +187 -82
- pyscf/dft/xcfun.py +117 -86
- pyscf/eph/rhf.py +1 -1
- pyscf/eph/rks.py +1 -1
- pyscf/eph/uhf.py +2 -2
- pyscf/eph/uks.py +2 -2
- pyscf/fci/addons.py +18 -15
- pyscf/fci/cistring.py +43 -10
- pyscf/fci/direct_nosym.py +45 -56
- pyscf/fci/direct_spin0.py +4 -2
- pyscf/fci/direct_spin1.py +11 -7
- pyscf/fci/direct_spin1_cyl_sym.py +7 -3
- pyscf/fci/direct_spin1_symm.py +12 -0
- pyscf/fci/selected_ci.py +2 -2
- pyscf/geomopt/geometric_solver.py +1 -1
- pyscf/grad/__init__.py +1 -0
- pyscf/grad/casci.py +5 -3
- pyscf/grad/casscf.py +2 -0
- pyscf/grad/ccsd.py +2 -0
- pyscf/grad/cisd.py +2 -0
- pyscf/grad/dhf.py +3 -1
- pyscf/grad/dispersion.py +66 -0
- pyscf/grad/mp2.py +9 -3
- pyscf/grad/rhf.py +11 -0
- pyscf/grad/rks.py +4 -8
- pyscf/grad/tdrhf.py +3 -1
- pyscf/grad/uks.py +3 -4
- pyscf/gto/basis/__init__.py +8 -2
- pyscf/gto/basis/parse_cp2k.py +13 -8
- pyscf/gto/basis/parse_cp2k_pp.py +18 -5
- pyscf/gto/ecp.py +5 -5
- pyscf/gto/mole.py +83 -79
- pyscf/gto/moleintor.py +1 -0
- pyscf/gw/gw_ac.py +2 -2
- pyscf/gw/gw_cd.py +2 -2
- pyscf/gw/gw_exact.py +2 -2
- pyscf/gw/gw_slow.py +1 -1
- pyscf/gw/rpa.py +237 -96
- pyscf/gw/ugw_ac.py +2 -2
- pyscf/gw/urpa.py +135 -127
- pyscf/hessian/__init__.py +1 -0
- pyscf/hessian/dispersion.py +104 -0
- pyscf/hessian/rhf.py +44 -15
- pyscf/hessian/rks.py +37 -7
- pyscf/hessian/uhf.py +13 -8
- pyscf/hessian/uks.py +7 -5
- pyscf/lib/CMakeLists.txt +59 -10
- pyscf/lib/ao2mo/nr_ao2mo.c +6 -1
- pyscf/lib/ao2mo/nrr_ao2mo.c +6 -1
- pyscf/lib/ao2mo/r_ao2mo.c +6 -1
- pyscf/lib/cc/ccsd_t.c +37 -6
- pyscf/lib/cc/uccsd_t.c +25 -4
- pyscf/lib/chkfile.py +1 -2
- pyscf/lib/config.h +1 -1
- pyscf/lib/config.h.in +1 -1
- pyscf/lib/deps/include/cint.h +1 -1
- pyscf/lib/deps/include/cint_funcs.h +47 -16
- pyscf/lib/deps/lib/libcint.6.dylib +0 -0
- pyscf/lib/deps/lib/libxcfun.2.dylib +0 -0
- pyscf/lib/dft/CMakeLists.txt +10 -6
- pyscf/lib/dft/grid_collocate.c +655 -0
- pyscf/lib/dft/grid_common.c +660 -0
- pyscf/lib/dft/grid_common.h +109 -0
- pyscf/lib/dft/grid_integrate.c +1358 -0
- pyscf/lib/dft/libxc_itrf.c +587 -357
- pyscf/lib/dft/multigrid.c +744 -0
- pyscf/lib/dft/multigrid.h +72 -0
- pyscf/lib/dft/utils.c +71 -0
- pyscf/lib/dft/utils.h +27 -0
- pyscf/lib/dft/xc_deriv.c +85 -89
- pyscf/lib/dft/xcfun_itrf.c +24 -17
- pyscf/lib/diis.py +2 -0
- pyscf/lib/gto/fill_r_4c.c +5 -0
- pyscf/lib/libagf2.dylib +0 -0
- pyscf/lib/libao2mo.dylib +0 -0
- pyscf/lib/libcc.dylib +0 -0
- pyscf/lib/libcgto.dylib +0 -0
- pyscf/lib/libcvhf.dylib +0 -0
- pyscf/lib/libdft.dylib +0 -0
- pyscf/lib/libfci.dylib +0 -0
- pyscf/lib/libmcscf.dylib +0 -0
- pyscf/lib/libnp_helper.dylib +0 -0
- pyscf/lib/libpbc.dylib +0 -0
- pyscf/lib/libri.dylib +0 -0
- pyscf/lib/libxc_itrf.dylib +0 -0
- pyscf/lib/libxcfun_itrf.dylib +0 -0
- pyscf/lib/linalg_helper.py +2 -2
- pyscf/lib/mcscf/fci_contract.c +25 -19
- pyscf/lib/mcscf/fci_contract_nosym.c +11 -5
- pyscf/lib/mcscf/fci_string.c +29 -29
- pyscf/lib/misc.py +121 -19
- pyscf/lib/np_helper/np_helper.h +7 -0
- pyscf/lib/numpy_helper.py +11 -4
- pyscf/lib/pbc/CMakeLists.txt +11 -1
- pyscf/lib/pbc/cell.c +280 -0
- pyscf/lib/pbc/cell.h +29 -0
- pyscf/lib/pbc/fft.c +147 -0
- pyscf/lib/pbc/fft.h +26 -0
- pyscf/lib/pbc/fill_ints.c +3 -3
- pyscf/lib/pbc/fill_ints.h +29 -0
- pyscf/lib/pbc/fill_ints_screened.c +1012 -0
- pyscf/lib/pbc/hf_grad.c +95 -0
- pyscf/lib/pbc/neighbor_list.c +206 -0
- pyscf/lib/pbc/neighbor_list.h +41 -0
- pyscf/lib/pbc/optimizer.c +37 -1
- pyscf/lib/pbc/optimizer.h +3 -3
- pyscf/lib/pbc/pp.c +448 -0
- pyscf/lib/solvent/CMakeLists.txt +38 -0
- pyscf/lib/vhf/nr_sgx_direct.c +5 -0
- pyscf/lib/vhf/optimizer.c +10 -0
- pyscf/lo/boys.py +4 -1
- pyscf/lo/pipek.py +77 -71
- pyscf/lo/pipek_jacobi.py +161 -0
- pyscf/mcscf/__init__.py +31 -31
- pyscf/mcscf/addons.py +20 -12
- pyscf/mcscf/casci.py +5 -3
- pyscf/mcscf/casci_symm.py +3 -1
- pyscf/mcscf/df.py +2 -2
- pyscf/mcscf/mc1step.py +14 -8
- pyscf/mcscf/newton_casscf_symm.py +1 -1
- pyscf/mcscf/ucasci.py +1 -1
- pyscf/mcscf/umc1step.py +3 -3
- pyscf/mp/__init__.py +10 -12
- pyscf/mp/dfgmp2.py +3 -2
- pyscf/mp/dfmp2.py +3 -3
- pyscf/mp/dfmp2_native.py +4 -2
- pyscf/mp/dfump2_native.py +4 -3
- pyscf/mp/gmp2.py +6 -3
- pyscf/mp/mp2.py +48 -14
- pyscf/mp/ump2.py +56 -23
- pyscf/mrpt/nevpt2.py +2 -2
- pyscf/nac/__init__.py +32 -0
- pyscf/nac/sacasscf.py +293 -0
- pyscf/pbc/__all__.py +3 -0
- pyscf/pbc/adc/__init__.py +1 -1
- pyscf/pbc/adc/kadc_rhf.py +2 -2
- pyscf/pbc/adc/kadc_rhf_ea.py +2 -2
- pyscf/pbc/adc/kadc_rhf_ip.py +2 -2
- pyscf/pbc/cc/__init__.py +10 -7
- pyscf/pbc/cc/kccsd.py +3 -1
- pyscf/pbc/cc/kccsd_rhf.py +4 -2
- pyscf/pbc/cc/kccsd_rhf_ksymm.py +1 -1
- pyscf/pbc/cc/kccsd_uhf.py +3 -1
- pyscf/pbc/cc/kintermediates.py +1 -1
- pyscf/pbc/ci/__init__.py +4 -4
- pyscf/pbc/df/aft.py +5 -4
- pyscf/pbc/df/aft_jk.py +1 -1
- pyscf/pbc/df/df.py +7 -2
- pyscf/pbc/df/df_jk.py +12 -11
- pyscf/pbc/df/fft.py +7 -2
- pyscf/pbc/df/ft_ao.py +17 -9
- pyscf/pbc/df/gdf_builder.py +8 -7
- pyscf/pbc/df/incore.py +246 -2
- pyscf/pbc/df/mdf.py +3 -0
- pyscf/pbc/df/mdf_jk.py +0 -3
- pyscf/pbc/df/rsdf_builder.py +20 -11
- pyscf/pbc/df/rsdf_helper.py +16 -13
- pyscf/pbc/dft/gen_grid.py +14 -9
- pyscf/pbc/dft/gks.py +4 -2
- pyscf/pbc/dft/kgks.py +13 -4
- pyscf/pbc/dft/krks.py +15 -25
- pyscf/pbc/dft/krks_ksymm.py +16 -15
- pyscf/pbc/dft/krkspu.py +3 -3
- pyscf/pbc/dft/krkspu_ksymm.py +2 -2
- pyscf/pbc/dft/kroks.py +9 -19
- pyscf/pbc/dft/kuks.py +14 -24
- pyscf/pbc/dft/kuks_ksymm.py +16 -15
- pyscf/pbc/dft/kukspu.py +3 -3
- pyscf/pbc/dft/kukspu_ksymm.py +2 -2
- pyscf/pbc/dft/multigrid/__init__.py +57 -0
- pyscf/pbc/dft/{multigrid.py → multigrid/multigrid.py} +87 -94
- pyscf/pbc/dft/multigrid/multigrid_pair.py +1405 -0
- pyscf/pbc/dft/multigrid/pp.py +290 -0
- pyscf/pbc/dft/multigrid/utils.py +70 -0
- pyscf/pbc/dft/numint.py +5 -0
- pyscf/pbc/dft/rks.py +12 -8
- pyscf/pbc/dft/roks.py +2 -0
- pyscf/pbc/dft/uks.py +6 -4
- pyscf/pbc/geomopt/geometric_solver.py +1 -1
- pyscf/pbc/grad/__init__.py +5 -2
- pyscf/pbc/grad/krhf.py +7 -1
- pyscf/pbc/grad/krks.py +1 -1
- pyscf/pbc/grad/kuks.py +1 -1
- pyscf/pbc/grad/rhf.py +167 -0
- pyscf/pbc/grad/rks.py +24 -0
- pyscf/pbc/grad/uhf.py +92 -0
- pyscf/pbc/grad/uks.py +24 -0
- pyscf/pbc/gto/__init__.py +1 -0
- pyscf/pbc/gto/_pbcintor.py +14 -7
- pyscf/pbc/gto/cell.py +228 -23
- pyscf/pbc/gto/ewald_methods.py +293 -0
- pyscf/pbc/gto/neighborlist.py +199 -0
- pyscf/pbc/gto/pseudo/pp_int.py +350 -17
- pyscf/pbc/gw/__init__.py +44 -1
- pyscf/pbc/gw/kgw_slow_supercell.py +1 -1
- pyscf/pbc/gw/krgw_ac.py +4 -4
- pyscf/pbc/gw/krgw_cd.py +4 -4
- pyscf/pbc/gw/kugw_ac.py +7 -4
- pyscf/pbc/lib/kpts_helper.py +1 -1
- pyscf/pbc/mp/__init__.py +3 -3
- pyscf/pbc/mp/kmp2.py +3 -1
- pyscf/pbc/mpicc/__init__.py +4 -2
- pyscf/pbc/scf/addons.py +22 -18
- pyscf/pbc/scf/ghf.py +3 -1
- pyscf/pbc/scf/hf.py +34 -20
- pyscf/pbc/scf/kghf.py +3 -1
- pyscf/pbc/scf/khf.py +15 -15
- pyscf/pbc/scf/khf_ksymm.py +8 -6
- pyscf/pbc/scf/krohf.py +6 -4
- pyscf/pbc/scf/kuhf.py +14 -10
- pyscf/pbc/scf/kuhf_ksymm.py +4 -2
- pyscf/pbc/scf/rohf.py +2 -1
- pyscf/pbc/scf/rsjk.py +14 -4
- pyscf/pbc/scf/uhf.py +9 -5
- pyscf/pbc/symm/geom.py +1 -1
- pyscf/pbc/symm/pyscf_spglib.py +1 -1
- pyscf/pbc/symm/symmetry.py +1 -1
- pyscf/pbc/tdscf/__init__.py +6 -9
- pyscf/pbc/tdscf/krhf.py +1 -1
- pyscf/pbc/tdscf/krhf_slow_supercell.py +3 -3
- pyscf/pbc/tdscf/rhf.py +1 -1
- pyscf/pbc/tools/k2gamma.py +27 -15
- pyscf/pbc/tools/pbc.py +55 -10
- pyscf/pbc/x2c/sfx2c1e.py +1 -1
- pyscf/pbc/x2c/x2c1e.py +1 -1
- pyscf/post_scf.py +3 -0
- pyscf/qmmm/itrf.py +13 -1
- pyscf/scf/__init__.py +3 -1
- pyscf/scf/_response_functions.py +5 -4
- pyscf/scf/addons.py +50 -51
- pyscf/scf/atom_hf.py +16 -3
- pyscf/scf/atom_hf_pp.py +154 -0
- pyscf/scf/atom_ks.py +1 -1
- pyscf/scf/cphf.py +39 -17
- pyscf/scf/dhf.py +6 -8
- pyscf/scf/diis.py +12 -11
- pyscf/scf/dispersion.py +177 -0
- pyscf/scf/ghf.py +8 -8
- pyscf/scf/ghf_symm.py +3 -1
- pyscf/scf/hf.py +150 -54
- pyscf/scf/hf_symm.py +9 -4
- pyscf/scf/rohf.py +30 -7
- pyscf/scf/ucphf.py +46 -30
- pyscf/scf/uhf.py +17 -19
- pyscf/scf/uhf_symm.py +7 -5
- pyscf/sgx/sgx.py +9 -4
- pyscf/solvent/__init__.py +26 -2
- pyscf/solvent/_attach_solvent.py +58 -11
- pyscf/solvent/_ddcosmo_tdscf_grad.py +2 -2
- pyscf/solvent/ddcosmo.py +7 -6
- pyscf/solvent/ddpcm.py +1 -0
- pyscf/solvent/grad/__init__.py +17 -0
- pyscf/solvent/{ddcosmo_grad.py → grad/ddcosmo_grad.py} +1 -1
- pyscf/solvent/grad/pcm.py +384 -0
- pyscf/solvent/grad/smd.py +176 -0
- pyscf/solvent/grad/smd_experiment.py +216 -0
- pyscf/solvent/hessian/__init__.py +0 -0
- pyscf/solvent/hessian/pcm.py +230 -0
- pyscf/solvent/hessian/smd.py +171 -0
- pyscf/solvent/hessian/smd_experiment.py +208 -0
- pyscf/solvent/pcm.py +138 -57
- pyscf/solvent/pol_embed.py +3 -3
- pyscf/solvent/smd.py +433 -0
- pyscf/solvent/smd_experiment.py +273 -0
- pyscf/soscf/newton_ah.py +21 -10
- pyscf/symm/basis.py +1 -1
- pyscf/symm/geom.py +3 -7
- pyscf/tdscf/common_slow.py +4 -7
- pyscf/tdscf/dhf.py +1 -1
- pyscf/tdscf/ghf.py +1 -1
- pyscf/tdscf/proxy.py +1 -1
- pyscf/tdscf/rhf.py +10 -3
- pyscf/tdscf/rhf_slow.py +1 -1
- pyscf/tdscf/uhf.py +5 -1
- pyscf/tools/chgcar.py +1 -5
- pyscf/tools/molden.py +15 -2
- pyscf/x2c/sfx2c1e.py +8 -3
- pyscf/x2c/tdscf.py +1 -1
- pyscf/x2c/x2c.py +10 -2
- pyscf-2.6.0.dist-info/METADATA +140 -0
- {pyscf-2.4.0.dist-info → pyscf-2.6.0.dist-info}/NOTICE +8 -1
- {pyscf-2.4.0.dist-info → pyscf-2.6.0.dist-info}/RECORD +355 -307
- {pyscf-2.4.0.dist-info → pyscf-2.6.0.dist-info}/WHEEL +1 -1
- pyscf-2.4.0.dist-info/METADATA +0 -81
- {pyscf-2.4.0.dist-info → pyscf-2.6.0.dist-info}/LICENSE +0 -0
- {pyscf-2.4.0.dist-info → pyscf-2.6.0.dist-info}/top_level.txt +0 -0
pyscf/__init__.py
CHANGED
pyscf/adc/__init__.py
CHANGED
|
@@ -23,7 +23,6 @@ Algebraic Diagrammatic Construction
|
|
|
23
23
|
===================================
|
|
24
24
|
'''
|
|
25
25
|
|
|
26
|
-
from pyscf import scf
|
|
27
26
|
from pyscf import lib
|
|
28
27
|
from pyscf.adc import uadc
|
|
29
28
|
from pyscf.adc import radc
|
|
@@ -41,15 +40,15 @@ def ADC(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
|
41
40
|
if not (frozen is None or frozen == 0):
|
|
42
41
|
raise NotImplementedError
|
|
43
42
|
|
|
44
|
-
if
|
|
43
|
+
if mf.istype('UHF'):
|
|
45
44
|
return UADC(mf, frozen, mo_coeff, mo_occ)
|
|
46
45
|
#elif isinstance(mf, scf.rohf.ROHF):
|
|
47
46
|
# lib.logger.warn(mf, 'RADC method does not support ROHF reference. ROHF object '
|
|
48
47
|
# 'is converted to UHF object and UADC method is called.')
|
|
49
|
-
# mf =
|
|
48
|
+
# mf = mf.to_uhf(mf)
|
|
50
49
|
# return UADC(mf, frozen, mo_coeff, mo_occ)
|
|
51
50
|
# TODO add ROHF functionality
|
|
52
|
-
elif
|
|
51
|
+
elif mf.istype('RHF'):
|
|
53
52
|
return RADC(mf, frozen, mo_coeff, mo_occ)
|
|
54
53
|
else :
|
|
55
54
|
raise RuntimeError('ADC code only supports RHF, ROHF, and UHF references')
|
|
@@ -62,10 +61,9 @@ def UADC(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
|
62
61
|
if not (frozen is None or frozen == 0):
|
|
63
62
|
raise NotImplementedError
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
mf = scf.addons.convert_to_uhf(mf)
|
|
64
|
+
mf = mf.remove_soscf()
|
|
65
|
+
if not mf.istype('UHF'):
|
|
66
|
+
mf = mf.to_uhf()
|
|
69
67
|
|
|
70
68
|
return uadc.UADC(mf, frozen, mo_coeff, mo_occ)
|
|
71
69
|
|
|
@@ -77,10 +75,9 @@ def RADC(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
|
77
75
|
if not (frozen is None or frozen == 0):
|
|
78
76
|
raise NotImplementedError
|
|
79
77
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
mf = scf.addons.convert_to_rhf(mf)
|
|
78
|
+
mf = mf.remove_soscf()
|
|
79
|
+
if not mf.istype('RHF'):
|
|
80
|
+
mf = mf.to_rhf()
|
|
84
81
|
|
|
85
82
|
return radc.RADC(mf, frozen, mo_coeff, mo_occ)
|
|
86
83
|
|
pyscf/adc/radc.py
CHANGED
|
@@ -111,7 +111,7 @@ class RADC(lib.StreamObject):
|
|
|
111
111
|
blkmin = getattr(__config__, 'adc_radc_RADC_blkmin', 4)
|
|
112
112
|
memorymin = getattr(__config__, 'adc_radc_RADC_memorymin', 2000)
|
|
113
113
|
|
|
114
|
-
_keys =
|
|
114
|
+
_keys = {
|
|
115
115
|
'tol_residual','conv_tol', 'e_corr', 'method', 'mo_coeff',
|
|
116
116
|
'mol', 'mo_energy', 'incore_complete',
|
|
117
117
|
'scf_energy', 'e_tot', 't1', 'frozen', 'chkfile',
|
|
@@ -119,7 +119,7 @@ class RADC(lib.StreamObject):
|
|
|
119
119
|
'imds', 'method', 'method_type', 'with_df', 'compute_properties',
|
|
120
120
|
'approx_trans_moments', 'evec_print_tol', 'spec_factor_print_tol',
|
|
121
121
|
'ncvs', 'E', 'U', 'P', 'X',
|
|
122
|
-
|
|
122
|
+
}
|
|
123
123
|
|
|
124
124
|
def __init__(self, mf, frozen=0, mo_coeff=None, mo_occ=None):
|
|
125
125
|
from pyscf import gto
|
pyscf/adc/radc_ea.py
CHANGED
|
@@ -966,13 +966,13 @@ class RADCEA(radc.RADC):
|
|
|
966
966
|
Spectroscopic amplitudes for each EA transition.
|
|
967
967
|
'''
|
|
968
968
|
|
|
969
|
-
_keys =
|
|
969
|
+
_keys = {
|
|
970
970
|
'tol_residual','conv_tol', 'e_corr', 'method', 'mo_coeff',
|
|
971
971
|
'mo_energy', 't1', 'max_space', 't2', 'max_cycle',
|
|
972
972
|
'nmo', 'transform_integrals', 'with_df', 'compute_properties',
|
|
973
973
|
'approx_trans_moments', 'E', 'U', 'P', 'X',
|
|
974
974
|
'evec_print_tol', 'spec_factor_print_tol',
|
|
975
|
-
|
|
975
|
+
}
|
|
976
976
|
|
|
977
977
|
def __init__(self, adc):
|
|
978
978
|
self.mol = adc.mol
|
pyscf/adc/radc_ip.py
CHANGED
|
@@ -921,14 +921,14 @@ class RADCIP(radc.RADC):
|
|
|
921
921
|
Spectroscopic amplitudes for each IP transition.
|
|
922
922
|
'''
|
|
923
923
|
|
|
924
|
-
_keys =
|
|
924
|
+
_keys = {
|
|
925
925
|
'tol_residual','conv_tol', 'e_corr', 'method', 'mo_coeff',
|
|
926
926
|
'mo_energy_b', 't1', 'mo_energy_a',
|
|
927
927
|
'max_space', 't2', 'max_cycle',
|
|
928
928
|
'nmo', 'transform_integrals', 'with_df', 'compute_properties',
|
|
929
929
|
'approx_trans_moments', 'E', 'U', 'P', 'X',
|
|
930
930
|
'evec_print_tol', 'spec_factor_print_tol',
|
|
931
|
-
|
|
931
|
+
}
|
|
932
932
|
|
|
933
933
|
def __init__(self, adc):
|
|
934
934
|
self.mol = adc.mol
|
pyscf/adc/radc_ip_cvs.py
CHANGED
|
@@ -938,14 +938,14 @@ class RADCIPCVS(radc.RADC):
|
|
|
938
938
|
Spectroscopic amplitudes for each IP transition.
|
|
939
939
|
'''
|
|
940
940
|
|
|
941
|
-
_keys =
|
|
941
|
+
_keys = {
|
|
942
942
|
'tol_residual','conv_tol', 'e_corr', 'method', 'mo_coeff',
|
|
943
943
|
'mo_energy_b', 't1', 'mo_energy_a',
|
|
944
944
|
'max_space', 't2', 'max_cycle',
|
|
945
945
|
'nmo', 'transform_integrals', 'with_df', 'compute_properties',
|
|
946
946
|
'approx_trans_moments', 'E', 'U', 'P', 'X',
|
|
947
947
|
'evec_print_tol', 'spec_factor_print_tol', 'ncvs',
|
|
948
|
-
|
|
948
|
+
}
|
|
949
949
|
|
|
950
950
|
def __init__(self, adc):
|
|
951
951
|
self.mol = adc.mol
|
pyscf/adc/uadc.py
CHANGED
|
@@ -113,7 +113,7 @@ class UADC(lib.StreamObject):
|
|
|
113
113
|
'''
|
|
114
114
|
incore_complete = getattr(__config__, 'adc_uadc_UADC_incore_complete', False)
|
|
115
115
|
|
|
116
|
-
_keys =
|
|
116
|
+
_keys = {
|
|
117
117
|
'tol_residual','conv_tol', 'e_corr', 'method',
|
|
118
118
|
'method_type', 'mo_coeff', 'mol', 'mo_energy_b',
|
|
119
119
|
'scf_energy', 'e_tot', 't1', 'frozen',
|
|
@@ -122,7 +122,7 @@ class UADC(lib.StreamObject):
|
|
|
122
122
|
'compute_mpn_energy', 'compute_spec', 'compute_properties',
|
|
123
123
|
'approx_trans_moments', 'evec_print_tol', 'spec_factor_print_tol',
|
|
124
124
|
'E', 'U', 'P', 'X', 'ncvs',
|
|
125
|
-
|
|
125
|
+
}
|
|
126
126
|
|
|
127
127
|
def __init__(self, mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
128
128
|
from pyscf import gto
|
pyscf/adc/uadc_ea.py
CHANGED
|
@@ -1960,7 +1960,7 @@ class UADCEA(uadc.UADC):
|
|
|
1960
1960
|
Spectroscopic amplitudes for each EA transition.
|
|
1961
1961
|
'''
|
|
1962
1962
|
|
|
1963
|
-
_keys =
|
|
1963
|
+
_keys = {
|
|
1964
1964
|
'tol_residual','conv_tol', 'e_corr', 'method',
|
|
1965
1965
|
'method_type', 'mo_coeff', 'mo_energy_b', 'max_memory',
|
|
1966
1966
|
't1', 'mo_energy_a', 'max_space', 't2', 'max_cycle',
|
|
@@ -1968,7 +1968,7 @@ class UADCEA(uadc.UADC):
|
|
|
1968
1968
|
'mo_energy_b', 'nmo_a', 'nmo_b', 'mol', 'transform_integrals',
|
|
1969
1969
|
'with_df', 'spec_factor_print_tol', 'evec_print_tol',
|
|
1970
1970
|
'compute_properties', 'approx_trans_moments', 'E', 'U', 'P', 'X',
|
|
1971
|
-
|
|
1971
|
+
}
|
|
1972
1972
|
|
|
1973
1973
|
def __init__(self, adc):
|
|
1974
1974
|
self.verbose = adc.verbose
|
pyscf/adc/uadc_ip.py
CHANGED
|
@@ -1838,7 +1838,7 @@ class UADCIP(uadc.UADC):
|
|
|
1838
1838
|
Spectroscopic amplitudes for each IP transition.
|
|
1839
1839
|
'''
|
|
1840
1840
|
|
|
1841
|
-
_keys =
|
|
1841
|
+
_keys = {
|
|
1842
1842
|
'tol_residual','conv_tol', 'e_corr', 'method',
|
|
1843
1843
|
'method_type', 'mo_coeff', 'mo_energy_b', 'max_memory',
|
|
1844
1844
|
't1', 'mo_energy_a', 'max_space', 't2', 'max_cycle',
|
|
@@ -1846,7 +1846,7 @@ class UADCIP(uadc.UADC):
|
|
|
1846
1846
|
'mo_energy_b', 'nmo_a', 'nmo_b', 'mol', 'transform_integrals',
|
|
1847
1847
|
'with_df', 'spec_factor_print_tol', 'evec_print_tol',
|
|
1848
1848
|
'compute_properties', 'approx_trans_moments', 'E', 'U', 'P', 'X',
|
|
1849
|
-
|
|
1849
|
+
}
|
|
1850
1850
|
|
|
1851
1851
|
def __init__(self, adc):
|
|
1852
1852
|
self.verbose = adc.verbose
|
pyscf/adc/uadc_ip_cvs.py
CHANGED
|
@@ -2035,7 +2035,7 @@ class UADCIPCVS(uadc.UADC):
|
|
|
2035
2035
|
Spectroscopic amplitudes for each IP transition.
|
|
2036
2036
|
'''
|
|
2037
2037
|
|
|
2038
|
-
_keys =
|
|
2038
|
+
_keys = {
|
|
2039
2039
|
'tol_residual','conv_tol', 'e_corr', 'method',
|
|
2040
2040
|
'method_type', 'mo_coeff', 'mo_energy_b', 'max_memory',
|
|
2041
2041
|
't1', 'mo_energy_a', 'max_space', 't2', 'max_cycle',
|
|
@@ -2043,7 +2043,7 @@ class UADCIPCVS(uadc.UADC):
|
|
|
2043
2043
|
'mo_energy_b', 'nmo_a', 'nmo_b', 'mol', 'transform_integrals',
|
|
2044
2044
|
'with_df', 'spec_factor_print_tol', 'evec_print_tol', 'ncvs',
|
|
2045
2045
|
'compute_properties', 'approx_trans_moments', 'E', 'U', 'P', 'X',
|
|
2046
|
-
|
|
2046
|
+
}
|
|
2047
2047
|
|
|
2048
2048
|
def __init__(self, adc):
|
|
2049
2049
|
self.verbose = adc.verbose
|
pyscf/agf2/__init__.py
CHANGED
|
@@ -102,7 +102,7 @@ def AGF2(mf, nmom=(None,0), frozen=None, mo_energy=None, mo_coeff=None, mo_occ=N
|
|
|
102
102
|
elif isinstance(mf, scf.rohf.ROHF):
|
|
103
103
|
lib.logger.warn(mf, 'RAGF2 method does not support ROHF reference. '
|
|
104
104
|
'Converting to UHF and using UAGF2.')
|
|
105
|
-
mf =
|
|
105
|
+
mf = mf.to_uhf()
|
|
106
106
|
return UAGF2(mf, nmom, frozen, mo_energy, mo_coeff, mo_occ)
|
|
107
107
|
|
|
108
108
|
elif isinstance(mf, scf.rhf.RHF):
|
pyscf/agf2/chempot.py
CHANGED
|
@@ -154,8 +154,8 @@ def minimize_chempot(se, fock, nelec, occupancy=2, x0=0.0, tol=1e-6, maxiter=200
|
|
|
154
154
|
buf = np.zeros((se.nphys+se.naux, se.nphys+se.naux), dtype=dtype)
|
|
155
155
|
fargs = (se, fock, nelec, occupancy, buf)
|
|
156
156
|
|
|
157
|
-
options =
|
|
158
|
-
kwargs =
|
|
157
|
+
options = {'maxiter': maxiter, 'ftol': tol, 'xtol': tol, 'gtol': tol}
|
|
158
|
+
kwargs = {'x0': x0, 'method': 'TNC', 'jac': jac, 'options': options}
|
|
159
159
|
fun = _objective if not jac else _gradient
|
|
160
160
|
|
|
161
161
|
opt = optimize.minimize(fun, args=fargs, **kwargs)
|
pyscf/agf2/dfragf2.py
CHANGED
|
@@ -67,7 +67,7 @@ def build_se_part(agf2, eri, gf_occ, gf_vir, os_factor=1.0, ss_factor=1.0):
|
|
|
67
67
|
nocc, nvir = gf_occ.naux, gf_vir.naux
|
|
68
68
|
naux = agf2.with_df.get_naoaux()
|
|
69
69
|
tol = agf2.weight_tol
|
|
70
|
-
facs =
|
|
70
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
71
71
|
|
|
72
72
|
ei, ci = gf_occ.energy, gf_occ.coupling
|
|
73
73
|
ea, ca = gf_vir.energy, gf_vir.coupling
|
|
@@ -258,7 +258,7 @@ class DFRAGF2(ragf2.RAGF2):
|
|
|
258
258
|
Auxiliaries of the Green's function
|
|
259
259
|
'''
|
|
260
260
|
|
|
261
|
-
_keys =
|
|
261
|
+
_keys = {'_with_df', 'allow_lowmem_build'}
|
|
262
262
|
|
|
263
263
|
def __init__(self, mf, frozen=None, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
264
264
|
ragf2.RAGF2.__init__(self, mf, frozen=frozen, mo_energy=mo_energy,
|
|
@@ -335,7 +335,7 @@ def _make_mo_eris_incore(agf2, mo_coeff=None):
|
|
|
335
335
|
qxy = np.zeros((naux, npair))
|
|
336
336
|
mo = np.asarray(eris.mo_coeff, order='F')
|
|
337
337
|
sij = (0, nmo, 0, nmo)
|
|
338
|
-
sym =
|
|
338
|
+
sym = {'aosym': 's2', 'mosym': 's2'}
|
|
339
339
|
|
|
340
340
|
for p0, p1 in with_df.prange():
|
|
341
341
|
eri0 = with_df._cderi[p0:p1]
|
|
@@ -370,7 +370,7 @@ def _make_qmo_eris_incore(agf2, eri, coeffs):
|
|
|
370
370
|
|
|
371
371
|
xisym, nxi, cxi, sxi = ao2mo.incore._conc_mos(cx, ci, compact=False)
|
|
372
372
|
jasym, nja, cja, sja = ao2mo.incore._conc_mos(cj, ca, compact=False)
|
|
373
|
-
sym =
|
|
373
|
+
sym = {'aosym': 's2', 'mosym': 's1'}
|
|
374
374
|
|
|
375
375
|
qxi = np.zeros((naux, nxi))
|
|
376
376
|
qja = np.zeros((naux, nja))
|
pyscf/agf2/dfuagf2.py
CHANGED
|
@@ -70,7 +70,7 @@ def build_se_part(agf2, eri, gf_occ, gf_vir, os_factor=1.0, ss_factor=1.0):
|
|
|
70
70
|
noccb, nvirb = gf_occ[1].naux, gf_vir[1].naux
|
|
71
71
|
naux = agf2.with_df.get_naoaux()
|
|
72
72
|
tol = agf2.weight_tol
|
|
73
|
-
facs =
|
|
73
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
74
74
|
|
|
75
75
|
ci_a, ei_a = gf_occ[0].coupling, gf_occ[0].energy
|
|
76
76
|
ci_b, ei_b = gf_occ[1].coupling, gf_occ[1].energy
|
|
@@ -209,7 +209,7 @@ class DFUAGF2(uagf2.UAGF2):
|
|
|
209
209
|
Auxiliaries of the Green's function for each spin
|
|
210
210
|
'''
|
|
211
211
|
|
|
212
|
-
_keys =
|
|
212
|
+
_keys = {'_with_df', 'allow_lowmem_build'}
|
|
213
213
|
|
|
214
214
|
def __init__(self, mf, frozen=None, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
215
215
|
uagf2.UAGF2.__init__(self, mf, frozen=frozen, mo_energy=mo_energy,
|
|
@@ -277,7 +277,7 @@ def _make_mo_eris_incore(agf2, mo_coeff=None):
|
|
|
277
277
|
mob = np.asarray(mob, order='F')
|
|
278
278
|
sija = (0, nmoa, 0, nmoa)
|
|
279
279
|
sijb = (0, nmob, 0, nmob)
|
|
280
|
-
sym =
|
|
280
|
+
sym = {'aosym': 's2', 'mosym': 's2'}
|
|
281
281
|
|
|
282
282
|
for p0, p1 in with_df.prange():
|
|
283
283
|
eri0 = with_df._cderi[p0:p1]
|
|
@@ -324,7 +324,7 @@ def _make_qmo_eris_incore(agf2, eri, coeffs_a, coeffs_b):
|
|
|
324
324
|
jasym_a, nja_a, cja_a, sja_a = ao2mo.incore._conc_mos(cja, caa, compact=False)
|
|
325
325
|
xisym_b, nxi_b, cxi_b, sxi_b = ao2mo.incore._conc_mos(cxb, cib, compact=False)
|
|
326
326
|
jasym_b, nja_b, cja_b, sja_b = ao2mo.incore._conc_mos(cjb, cab, compact=False)
|
|
327
|
-
sym =
|
|
327
|
+
sym = {'aosym': 's2', 'mosym': 's1'}
|
|
328
328
|
|
|
329
329
|
qxi_a = np.zeros((naux, nxi_a))
|
|
330
330
|
qxi_b = np.zeros((naux, nxi_b))
|
pyscf/agf2/ragf2.py
CHANGED
|
@@ -150,7 +150,7 @@ def build_se_part(agf2, eri, gf_occ, gf_vir, os_factor=1.0, ss_factor=1.0):
|
|
|
150
150
|
|
|
151
151
|
nmo = eri.nmo
|
|
152
152
|
tol = agf2.weight_tol
|
|
153
|
-
facs =
|
|
153
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
154
154
|
|
|
155
155
|
ci, ei = gf_occ.coupling, gf_occ.energy
|
|
156
156
|
ca, ea = gf_vir.coupling, gf_vir.energy
|
|
@@ -304,7 +304,7 @@ def fock_loop(agf2, eri, gf, se):
|
|
|
304
304
|
nqmo = nmo + naux
|
|
305
305
|
buf = np.zeros((nqmo, nqmo))
|
|
306
306
|
converged = False
|
|
307
|
-
opts =
|
|
307
|
+
opts = {'tol': agf2.conv_tol_nelec, 'maxiter': agf2.max_cycle_inner}
|
|
308
308
|
rdm1_prev = 0
|
|
309
309
|
|
|
310
310
|
for niter1 in range(1, agf2.max_cycle_outer+1):
|
|
@@ -507,7 +507,7 @@ class RAGF2(lib.StreamObject):
|
|
|
507
507
|
async_io = getattr(__config__, 'agf2_async_io', True)
|
|
508
508
|
incore_complete = getattr(__config__, 'agf2_incore_complete', False)
|
|
509
509
|
|
|
510
|
-
_keys =
|
|
510
|
+
_keys = {
|
|
511
511
|
'async_io', 'mol', 'incore_complete',
|
|
512
512
|
'conv_tol', 'conv_tol_rdm1', 'conv_tol_nelec', 'max_cycle',
|
|
513
513
|
'max_cycle_outer', 'max_cycle_inner', 'weight_tol', 'fock_diis_space',
|
|
@@ -515,7 +515,7 @@ class RAGF2(lib.StreamObject):
|
|
|
515
515
|
'os_factor', 'ss_factor', 'damping',
|
|
516
516
|
'mo_energy', 'mo_coeff', 'mo_occ', 'se', 'gf', 'e_1b', 'e_2b', 'e_init',
|
|
517
517
|
'frozen', 'converged', 'chkfile',
|
|
518
|
-
|
|
518
|
+
}
|
|
519
519
|
|
|
520
520
|
def __init__(self, mf, frozen=None, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
521
521
|
|
|
@@ -697,7 +697,7 @@ class RAGF2(lib.StreamObject):
|
|
|
697
697
|
if os_factor is None: os_factor = self.os_factor
|
|
698
698
|
if ss_factor is None: ss_factor = self.ss_factor
|
|
699
699
|
|
|
700
|
-
facs =
|
|
700
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
701
701
|
gf_occ = gf.get_occupied()
|
|
702
702
|
gf_vir = gf.get_virtual()
|
|
703
703
|
|
pyscf/agf2/ragf2_slow.py
CHANGED
|
@@ -177,7 +177,7 @@ class RAGF2(ragf2.RAGF2):
|
|
|
177
177
|
Auxiliaries of the Green's function
|
|
178
178
|
'''
|
|
179
179
|
|
|
180
|
-
_keys =
|
|
180
|
+
_keys = {'nmom'}
|
|
181
181
|
|
|
182
182
|
def __init__(self, mf, nmom=(None,0), frozen=None, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
183
183
|
|
|
@@ -222,7 +222,7 @@ class RAGF2(ragf2.RAGF2):
|
|
|
222
222
|
if os_factor is None: os_factor = self.os_factor
|
|
223
223
|
if ss_factor is None: ss_factor = self.ss_factor
|
|
224
224
|
|
|
225
|
-
facs =
|
|
225
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
226
226
|
gf_occ = gf.get_occupied()
|
|
227
227
|
gf_vir = gf.get_virtual()
|
|
228
228
|
|
pyscf/agf2/uagf2.py
CHANGED
|
@@ -73,7 +73,7 @@ def build_se_part(agf2, eri, gf_occ, gf_vir, os_factor=1.0, ss_factor=1.0):
|
|
|
73
73
|
noa, nob = gf_occ[0].naux, gf_occ[1].naux
|
|
74
74
|
nva, nvb = gf_vir[0].naux, gf_vir[1].naux
|
|
75
75
|
tol = agf2.weight_tol
|
|
76
|
-
facs =
|
|
76
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
77
77
|
|
|
78
78
|
ci_a, ei_a = gf_occ[0].coupling, gf_occ[0].energy
|
|
79
79
|
ci_b, ei_b = gf_occ[1].coupling, gf_occ[1].energy
|
|
@@ -206,7 +206,7 @@ def fock_loop(agf2, eri, gf, se):
|
|
|
206
206
|
rdm1a_prev = 0
|
|
207
207
|
rdm1b_prev = 0
|
|
208
208
|
converged = False
|
|
209
|
-
opts =
|
|
209
|
+
opts = {'tol': agf2.conv_tol_nelec, 'maxiter': agf2.max_cycle_inner}
|
|
210
210
|
|
|
211
211
|
for niter1 in range(1, agf2.max_cycle_outer+1):
|
|
212
212
|
sea, opt = minimize_chempot(sea, focka, nalph, x0=sea.chempot,
|
|
@@ -557,7 +557,7 @@ class UAGF2(ragf2.RAGF2):
|
|
|
557
557
|
if os_factor is None: os_factor = self.os_factor
|
|
558
558
|
if ss_factor is None: ss_factor = self.ss_factor
|
|
559
559
|
|
|
560
|
-
facs =
|
|
560
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
561
561
|
gf_occ = (gf[0].get_occupied(), gf[1].get_occupied())
|
|
562
562
|
gf_vir = (gf[0].get_virtual(), gf[1].get_virtual())
|
|
563
563
|
|
pyscf/agf2/uagf2_slow.py
CHANGED
|
@@ -205,7 +205,7 @@ class UAGF2(uagf2.UAGF2):
|
|
|
205
205
|
Auxiliaries of the Green's function for each spin
|
|
206
206
|
'''
|
|
207
207
|
|
|
208
|
-
_keys =
|
|
208
|
+
_keys = {'nmom'}
|
|
209
209
|
|
|
210
210
|
def __init__(self, mf, nmom=(None,0), frozen=None, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
211
211
|
|
|
@@ -250,7 +250,7 @@ class UAGF2(uagf2.UAGF2):
|
|
|
250
250
|
if os_factor is None: os_factor = self.os_factor
|
|
251
251
|
if ss_factor is None: ss_factor = self.ss_factor
|
|
252
252
|
|
|
253
|
-
facs =
|
|
253
|
+
facs = {'os_factor': os_factor, 'ss_factor': ss_factor}
|
|
254
254
|
gf_occ = (gf[0].get_occupied(), gf[1].get_occupied())
|
|
255
255
|
gf_vir = (gf[0].get_virtual(), gf[1].get_virtual())
|
|
256
256
|
|
pyscf/ao2mo/outcore.py
CHANGED
|
@@ -486,16 +486,16 @@ def _load_from_h5g(h5group, row0, row1, out=None):
|
|
|
486
486
|
out = numpy.ndarray((row1-row0, ncol), dat.dtype, buffer=out)
|
|
487
487
|
col1 = 0
|
|
488
488
|
for key in range(nkeys):
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
489
|
+
col0, col1 = col1, col1 + h5group[str(key)].shape[1]
|
|
490
|
+
h5group[str(key)].read_direct(out, dest_sel=numpy.s_[:,col0:col1],
|
|
491
|
+
source_sel=numpy.s_[row0:row1])
|
|
492
492
|
else: # multiple components
|
|
493
493
|
out = numpy.ndarray((dat.shape[0], row1-row0, ncol), dat.dtype, buffer=out)
|
|
494
494
|
col1 = 0
|
|
495
495
|
for key in range(nkeys):
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
col0, col1 = col1, col1 + h5group[str(key)].shape[2]
|
|
497
|
+
h5group[str(key)].read_direct(out, dest_sel=numpy.s_[:,:,col0:col1],
|
|
498
|
+
source_sel=numpy.s_[:,row0:row1])
|
|
499
499
|
return out
|
|
500
500
|
|
|
501
501
|
def _transpose_to_h5g(h5group, key, dat, blksize, chunks=None):
|
pyscf/cc/__init__.py
CHANGED
|
@@ -75,13 +75,12 @@ from pyscf.cc import eom_rccsd
|
|
|
75
75
|
from pyscf.cc import eom_uccsd
|
|
76
76
|
from pyscf.cc import eom_gccsd
|
|
77
77
|
from pyscf.cc import qcisd
|
|
78
|
-
from pyscf.cc import momgfccsd
|
|
79
78
|
from pyscf import scf
|
|
80
79
|
|
|
81
80
|
def CCSD(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
82
|
-
if
|
|
81
|
+
if mf.istype('UHF'):
|
|
83
82
|
return UCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
84
|
-
elif
|
|
83
|
+
elif mf.istype('GHF'):
|
|
85
84
|
return GCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
86
85
|
else:
|
|
87
86
|
return RCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
@@ -93,21 +92,22 @@ scf.hf.SCF.CCSD = CCSD
|
|
|
93
92
|
def RCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
94
93
|
import numpy
|
|
95
94
|
from pyscf import lib
|
|
96
|
-
from pyscf.
|
|
95
|
+
from pyscf.df.df_jk import _DFHF
|
|
97
96
|
from pyscf.cc import dfccsd
|
|
98
97
|
|
|
99
|
-
if
|
|
98
|
+
if mf.istype('UHF'):
|
|
100
99
|
raise RuntimeError('RCCSD cannot be used with UHF method.')
|
|
101
|
-
elif
|
|
100
|
+
elif mf.istype('ROHF'):
|
|
102
101
|
lib.logger.warn(mf, 'RCCSD method does not support ROHF method. ROHF object '
|
|
103
102
|
'is converted to UHF object and UCCSD method is called.')
|
|
104
|
-
mf =
|
|
103
|
+
mf = mf.to_uhf()
|
|
105
104
|
return UCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
mf = mf.remove_soscf()
|
|
107
|
+
if not mf.istype('RHF'):
|
|
108
|
+
mf = mf.to_rhf()
|
|
109
109
|
|
|
110
|
-
if
|
|
110
|
+
if isinstance(mf, _DFHF) and mf.with_df:
|
|
111
111
|
return dfccsd.RCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
112
112
|
|
|
113
113
|
elif numpy.iscomplexobj(mo_coeff) or numpy.iscomplexobj(mf.mo_coeff):
|
|
@@ -119,12 +119,13 @@ RCCSD.__doc__ = ccsd.CCSD.__doc__
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
def UCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
122
|
-
from pyscf.
|
|
122
|
+
from pyscf.df.df_jk import _DFHF
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
mf = mf.remove_soscf()
|
|
125
|
+
if not mf.istype('UHF'):
|
|
126
|
+
mf = mf.to_uhf()
|
|
126
127
|
|
|
127
|
-
if
|
|
128
|
+
if isinstance(mf, _DFHF) and mf.with_df:
|
|
128
129
|
# TODO: DF-UCCSD with memory-efficient particle-particle ladder,
|
|
129
130
|
# similar to dfccsd.RCCSD
|
|
130
131
|
return uccsd.UCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
@@ -134,12 +135,13 @@ UCCSD.__doc__ = uccsd.UCCSD.__doc__
|
|
|
134
135
|
|
|
135
136
|
|
|
136
137
|
def GCCSD(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
137
|
-
from pyscf.
|
|
138
|
+
from pyscf.df.df_jk import _DFHF
|
|
138
139
|
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
mf = mf.remove_soscf()
|
|
141
|
+
if not mf.istype('GHF'):
|
|
142
|
+
mf = mf.to_ghf()
|
|
141
143
|
|
|
142
|
-
if
|
|
144
|
+
if isinstance(mf, _DFHF) and mf.with_df:
|
|
143
145
|
raise NotImplementedError('DF-GCCSD')
|
|
144
146
|
else:
|
|
145
147
|
return gccsd.GCCSD(mf, frozen, mo_coeff, mo_occ)
|
|
@@ -147,9 +149,9 @@ GCCSD.__doc__ = gccsd.GCCSD.__doc__
|
|
|
147
149
|
|
|
148
150
|
|
|
149
151
|
def QCISD(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
150
|
-
if
|
|
152
|
+
if mf.istype('UHF'):
|
|
151
153
|
raise NotImplementedError
|
|
152
|
-
elif
|
|
154
|
+
elif mf.istype('GHF'):
|
|
153
155
|
raise NotImplementedError
|
|
154
156
|
else:
|
|
155
157
|
return RQCISD(mf, frozen, mo_coeff, mo_occ)
|
|
@@ -160,18 +162,17 @@ scf.hf.SCF.QCISD = QCISD
|
|
|
160
162
|
def RQCISD(mf, frozen=None, mo_coeff=None, mo_occ=None):
|
|
161
163
|
import numpy
|
|
162
164
|
from pyscf import lib
|
|
163
|
-
from pyscf.soscf import newton_ah
|
|
164
165
|
|
|
165
|
-
if
|
|
166
|
+
if mf.istype('UHF'):
|
|
166
167
|
raise RuntimeError('RQCISD cannot be used with UHF method.')
|
|
167
|
-
elif
|
|
168
|
+
elif mf.istype('ROHF'):
|
|
168
169
|
lib.logger.warn(mf, 'RQCISD method does not support ROHF method. ROHF object '
|
|
169
170
|
'is converted to UHF object and UQCISD method is called.')
|
|
170
|
-
mf = scf.addons.convert_to_uhf(mf)
|
|
171
171
|
raise NotImplementedError
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
mf = mf.remove_soscf()
|
|
174
|
+
if not mf.istype('RHF'):
|
|
175
|
+
mf = mf.to_rhf()
|
|
175
176
|
|
|
176
177
|
elif numpy.iscomplexobj(mo_coeff) or numpy.iscomplexobj(mf.mo_coeff):
|
|
177
178
|
raise NotImplementedError
|
|
@@ -193,15 +194,9 @@ def FNOCCSD(mf, thresh=1e-6, pct_occ=None, nvir_act=None, frozen=None):
|
|
|
193
194
|
Number of virtual NOs to keep. Default is None. If present, overrides `thresh` and `pct_occ`.
|
|
194
195
|
"""
|
|
195
196
|
import numpy
|
|
196
|
-
if frozen is None:
|
|
197
|
-
frozenocc = 0
|
|
198
|
-
else:
|
|
199
|
-
assert(isinstance(frozen, (int,numpy.int64)))
|
|
200
|
-
frozenocc = frozen
|
|
201
197
|
from pyscf import mp
|
|
202
|
-
pt = mp.MP2(mf).set(verbose=0).run()
|
|
198
|
+
pt = mp.MP2(mf, frozen=frozen).set(verbose=0).run()
|
|
203
199
|
frozen, no_coeff = pt.make_fno(thresh=thresh, pct_occ=pct_occ, nvir_act=nvir_act)
|
|
204
|
-
frozen = numpy.hstack([numpy.arange(frozenocc),frozen])
|
|
205
200
|
if len(frozen) == 0: frozen = None
|
|
206
201
|
pt_no = mp.MP2(mf, frozen=frozen, mo_coeff=no_coeff).set(verbose=0).run()
|
|
207
202
|
mycc = CCSD(mf, frozen=frozen, mo_coeff=no_coeff)
|
|
@@ -221,5 +216,3 @@ def FNOCCSD(mf, thresh=1e-6, pct_occ=None, nvir_act=None, frozen=None):
|
|
|
221
216
|
return self
|
|
222
217
|
mycc._finalize = _finalize.__get__(mycc, mycc.__class__)
|
|
223
218
|
return mycc
|
|
224
|
-
|
|
225
|
-
MomGFCCSD = momgfccsd.MomGFCCSD
|
pyscf/cc/addons.py
CHANGED
|
@@ -122,14 +122,13 @@ def spin2spatial(tx, orbspin):
|
|
|
122
122
|
return t2aa,t2ab,t2bb
|
|
123
123
|
|
|
124
124
|
def convert_to_uccsd(mycc):
|
|
125
|
-
from pyscf import scf
|
|
126
125
|
from pyscf.cc import uccsd, gccsd
|
|
127
126
|
if isinstance(mycc, uccsd.UCCSD):
|
|
128
127
|
return mycc
|
|
129
128
|
elif isinstance(mycc, gccsd.GCCSD):
|
|
130
129
|
raise NotImplementedError
|
|
131
130
|
|
|
132
|
-
mf =
|
|
131
|
+
mf = mycc._scf.to_uhf()
|
|
133
132
|
ucc = uccsd.UCCSD(mf)
|
|
134
133
|
assert (mycc._nocc is None)
|
|
135
134
|
assert (mycc._nmo is None)
|
|
@@ -143,12 +142,11 @@ def convert_to_uccsd(mycc):
|
|
|
143
142
|
return ucc
|
|
144
143
|
|
|
145
144
|
def convert_to_gccsd(mycc):
|
|
146
|
-
from pyscf import scf
|
|
147
145
|
from pyscf.cc import gccsd
|
|
148
146
|
if isinstance(mycc, gccsd.GCCSD):
|
|
149
147
|
return mycc
|
|
150
148
|
|
|
151
|
-
mf =
|
|
149
|
+
mf = mycc._scf.to_ghf()
|
|
152
150
|
gcc = gccsd.GCCSD(mf)
|
|
153
151
|
assert (mycc._nocc is None)
|
|
154
152
|
assert (mycc._nmo is None)
|