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.
- pyscf/__init__.py +2 -2
- pyscf/adc/__init__.py +3 -8
- pyscf/adc/dfadc.py +22 -6
- pyscf/adc/radc.py +106 -15
- pyscf/adc/radc_amplitudes.py +7 -1
- pyscf/adc/radc_ao2mo.py +4 -2
- pyscf/adc/radc_ea.py +524 -8
- pyscf/adc/radc_ip.py +492 -60
- pyscf/adc/radc_ip_cvs.py +4 -2
- pyscf/adc/uadc.py +116 -27
- pyscf/adc/uadc_amplitudes.py +215 -20
- pyscf/adc/uadc_ao2mo.py +30 -9
- pyscf/adc/uadc_ea.py +34 -44
- pyscf/adc/uadc_ip.py +9 -4
- pyscf/adc/uadc_ip_cvs.py +4 -1
- pyscf/agf2/__init__.py +2 -2
- pyscf/agf2/aux_space.py +1 -1
- pyscf/agf2/chkfile.py +1 -1
- pyscf/ao2mo/outcore.py +6 -4
- pyscf/cc/__init__.py +21 -3
- pyscf/cc/bccd.py +0 -46
- pyscf/cc/ccsd.py +16 -8
- pyscf/cc/uccsd.py +1 -1
- pyscf/data/elements.py +1 -1
- pyscf/df/__init__.py +2 -1
- pyscf/df/addons.py +79 -51
- pyscf/df/autoaux.py +191 -0
- pyscf/df/df.py +5 -1
- pyscf/df/grad/casscf.py +0 -41
- pyscf/df/hessian/rhf.py +2 -10
- pyscf/df/hessian/rks.py +1 -7
- pyscf/df/hessian/uhf.py +3 -13
- pyscf/df/hessian/uks.py +1 -8
- pyscf/df/incore.py +17 -5
- pyscf/dft/dks.py +1 -1
- pyscf/dft/libxc.py +65 -639
- pyscf/dft/numint.py +7 -3
- pyscf/dft/radi.py +39 -5
- pyscf/dft/rks.py +1 -1
- pyscf/dft/xc_deriv.py +1 -1
- pyscf/dft/xcfun.py +53 -2
- pyscf/eph/eph_fd.py +1 -1
- pyscf/eph/rhf.py +6 -36
- pyscf/eph/rks.py +0 -4
- pyscf/eph/uhf.py +1 -7
- pyscf/eph/uks.py +1 -7
- pyscf/fci/addons.py +117 -2
- pyscf/fci/cistring.py +1 -1
- pyscf/fci/direct_nosym.py +3 -3
- pyscf/fci/direct_spin0_symm.py +22 -43
- pyscf/fci/direct_spin1.py +65 -9
- pyscf/fci/direct_spin1_symm.py +49 -14
- pyscf/fci/direct_uhf.py +4 -4
- pyscf/fci/selected_ci_symm.py +1 -1
- pyscf/grad/lagrange.py +11 -3
- pyscf/grad/mp2.py +1 -1
- pyscf/grad/sacasscf.py +1 -1
- pyscf/grad/tdrks.py +1 -1
- pyscf/gto/basis/__init__.py +7 -0
- pyscf/gto/basis/bse.py +68 -15
- pyscf/gto/basis/parse_cp2k_pp.py +1 -1
- pyscf/gto/basis/parse_nwchem.py +1 -1
- pyscf/gto/basis/parse_nwchem_ecp.py +2 -1
- pyscf/gto/basis/sap_grasp_large.dat +2438 -0
- pyscf/gto/basis/sap_grasp_small.dat +1434 -0
- pyscf/gto/mole.py +99 -44
- pyscf/gw/gw_ac.py +2 -2
- pyscf/gw/gw_cd.py +2 -2
- pyscf/gw/rpa.py +2 -2
- pyscf/gw/ugw_ac.py +2 -2
- pyscf/gw/urpa.py +1 -1
- pyscf/hessian/rhf.py +30 -128
- pyscf/hessian/rks.py +1 -6
- pyscf/hessian/uhf.py +28 -138
- pyscf/hessian/uks.py +1 -8
- pyscf/lib/ao2mo/nr_ao2mo.c +1 -1
- pyscf/lib/ao2mo/nrr_ao2mo.c +1 -1
- pyscf/lib/ao2mo/r_ao2mo.c +1 -1
- pyscf/lib/cc/ccsd_pack.c +1 -1
- pyscf/lib/cc/ccsd_t.c +6 -6
- pyscf/lib/cc/uccsd_t.c +4 -4
- pyscf/lib/deps/include/XCFun/XCFunExport.h +1 -0
- pyscf/lib/dft/grid_common.c +1 -1
- pyscf/lib/dft/libxc_itrf.c +4 -1
- pyscf/lib/dft/xcfun_itrf.c +1 -1
- pyscf/lib/diis.py +1 -1
- pyscf/lib/exceptions.py +3 -0
- pyscf/lib/gto/fill_grids_int2c.c +11 -9
- pyscf/lib/gto/fill_int2e.c +7 -5
- pyscf/lib/gto/fill_r_4c.c +1 -1
- pyscf/lib/gto/ft_ao.c +1 -1
- pyscf/lib/gto/ft_ao.h +1 -1
- pyscf/lib/gto/gto.h +2 -2
- pyscf/lib/gto/nr_ecp.c +3 -2
- 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 +112 -192
- pyscf/lib/mcscf/fci_contract.c +2 -2
- pyscf/lib/misc.py +47 -14
- pyscf/lib/numpy_helper.py +1 -1
- pyscf/lib/pbc/nr_ecp.c +10 -3
- pyscf/lib/pbc/pbc.h +1 -1
- pyscf/lib/vhf/nr_sgx_direct.c +8 -6
- pyscf/lib/vhf/optimizer.c +2 -2
- pyscf/lo/iao.py +1 -1
- pyscf/lo/ibo.py +3 -3
- pyscf/lo/pipek_jacobi.py +1 -1
- pyscf/mcscf/__init__.py +2 -2
- pyscf/mcscf/addons.py +3 -3
- pyscf/mcscf/apc.py +2 -2
- pyscf/mcscf/casci.py +8 -6
- pyscf/mcscf/chkfile.py +70 -41
- pyscf/mcscf/dmet_cas.py +2 -2
- pyscf/mcscf/mc1step.py +62 -38
- pyscf/mcscf/newton_casscf.py +5 -5
- pyscf/mcscf/ucasci.py +1 -1
- pyscf/mcscf/umc1step.py +44 -25
- pyscf/md/integrators.py +3 -3
- pyscf/mp/mp2.py +6 -5
- pyscf/mp/ump2.py +7 -6
- pyscf/pbc/adc/kadc_rhf.py +1 -1
- pyscf/pbc/adc/kadc_rhf_amplitudes.py +2 -2
- pyscf/pbc/ao2mo/eris.py +1 -1
- pyscf/pbc/cc/kccsd_rhf.py +3 -3
- pyscf/pbc/cc/kccsd_t_rhf.py +2 -2
- pyscf/pbc/ci/kcis_rhf.py +2 -2
- pyscf/pbc/df/aft.py +2 -2
- pyscf/pbc/df/aft_ao2mo.py +1 -1
- pyscf/pbc/df/df.py +84 -11
- pyscf/pbc/df/df_jk.py +2 -1
- pyscf/pbc/df/fft.py +6 -2
- pyscf/pbc/df/fft_ao2mo.py +4 -0
- pyscf/pbc/df/fft_jk.py +11 -3
- pyscf/pbc/df/ft_ao.py +4 -3
- pyscf/pbc/df/gdf_builder.py +5 -4
- pyscf/pbc/df/incore.py +1 -1
- pyscf/pbc/df/mdf.py +6 -3
- pyscf/pbc/df/rsdf.py +2 -2
- pyscf/pbc/df/rsdf_builder.py +11 -6
- pyscf/pbc/df/rsdf_helper.py +1 -1
- pyscf/pbc/dft/cdft.py +5 -5
- pyscf/pbc/dft/multigrid/multigrid.py +19 -26
- pyscf/pbc/dft/multigrid/multigrid_pair.py +1 -1
- pyscf/pbc/dft/multigrid/pp.py +1 -1
- pyscf/pbc/dft/numint.py +30 -21
- pyscf/pbc/eph/eph_fd.py +1 -1
- pyscf/pbc/geomopt/geometric_solver.py +1 -1
- pyscf/pbc/gto/cell.py +37 -19
- pyscf/pbc/gto/ecp.py +12 -12
- pyscf/pbc/gto/eval_gto.py +2 -2
- pyscf/pbc/gto/pseudo/pp.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 +3 -3
- pyscf/pbc/lib/kpts_helper.py +4 -3
- pyscf/pbc/lib/linalg_helper.py +1 -1
- pyscf/pbc/mp/kmp2.py +1 -1
- pyscf/pbc/mpitools/mpi.py +1 -1
- pyscf/pbc/scf/addons.py +15 -11
- pyscf/pbc/scf/cphf.py +1 -1
- pyscf/pbc/scf/ghf.py +1 -1
- pyscf/pbc/scf/hf.py +21 -24
- pyscf/pbc/scf/kghf.py +33 -29
- pyscf/pbc/scf/khf.py +71 -26
- pyscf/pbc/scf/krohf.py +5 -7
- pyscf/pbc/scf/kuhf.py +53 -22
- pyscf/pbc/scf/rsjk.py +13 -9
- pyscf/pbc/scf/scfint.py +1 -1
- pyscf/pbc/scf/stability.py +1 -1
- pyscf/pbc/scf/uhf.py +3 -1
- pyscf/pbc/symm/symmetry.py +2 -2
- pyscf/pbc/tdscf/kproxy.py +1 -1
- pyscf/pbc/tdscf/kproxy_supercell.py +2 -2
- pyscf/pbc/tdscf/krhf.py +215 -133
- pyscf/pbc/tdscf/krhf_slow_supercell.py +1 -1
- pyscf/pbc/tdscf/krks.py +1 -45
- pyscf/pbc/tdscf/kuhf.py +58 -105
- pyscf/pbc/tdscf/kuks.py +0 -56
- pyscf/pbc/tdscf/proxy.py +1 -1
- pyscf/pbc/tdscf/rhf.py +111 -3
- pyscf/pbc/tdscf/rks.py +2 -1
- pyscf/pbc/tdscf/uhf.py +203 -1
- pyscf/pbc/tdscf/uks.py +2 -1
- pyscf/pbc/tools/k2gamma.py +7 -4
- pyscf/pbc/tools/pbc.py +63 -56
- pyscf/pbc/tools/pyscf_ase.py +0 -1
- pyscf/pbc/tools/pywannier90.py +1 -1
- pyscf/qmmm/mm_mole.py +1 -1
- pyscf/scf/_response_functions.py +2 -2
- pyscf/scf/_vhf.py +14 -10
- pyscf/scf/addons.py +29 -15
- pyscf/scf/cphf.py +14 -52
- pyscf/scf/dhf.py +39 -10
- pyscf/scf/dispersion.py +9 -8
- pyscf/scf/ghf.py +25 -13
- pyscf/scf/ghf_symm.py +2 -2
- pyscf/scf/hf.py +245 -29
- pyscf/scf/rohf.py +37 -5
- pyscf/scf/stability.py +142 -112
- pyscf/scf/ucphf.py +21 -16
- pyscf/scf/uhf.py +95 -58
- pyscf/sgx/sgx.py +1 -1
- pyscf/sgx/sgx_jk.py +4 -4
- pyscf/solvent/_ddcosmo_tdscf_grad.py +1 -1
- pyscf/solvent/ddcosmo.py +1 -1
- pyscf/solvent/pol_embed.py +1 -1
- pyscf/soscf/ciah.py +1 -1
- pyscf/soscf/newton_ah.py +1 -1
- pyscf/symm/__init__.py +1 -1
- pyscf/symm/addons.py +5 -5
- pyscf/tdscf/_lr_eig.py +505 -0
- pyscf/tdscf/common_slow.py +1 -1
- pyscf/tdscf/dhf.py +41 -37
- pyscf/tdscf/dks.py +0 -4
- pyscf/tdscf/ghf.py +91 -71
- pyscf/tdscf/gks.py +16 -16
- pyscf/tdscf/proxy.py +2 -2
- pyscf/tdscf/rhf.py +143 -96
- pyscf/tdscf/rks.py +15 -14
- pyscf/tdscf/uhf.py +117 -70
- pyscf/tdscf/uks.py +17 -18
- pyscf/tools/fcidump.py +3 -0
- pyscf/x2c/sfx2c1e.py +1 -1
- pyscf/x2c/tdscf.py +4 -4
- pyscf/x2c/x2c.py +15 -11
- {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/METADATA +24 -24
- {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/NOTICE +3 -1
- {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/RECORD +242 -240
- {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/WHEEL +1 -1
- pyscf/dft/gen_libxc_param.py +0 -35
- pyscf/dft/gen_xcfun_param.py +0 -209
- {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/LICENSE +0 -0
- {pyscf-2.6.2.dist-info → pyscf-2.7.0.dist-info}/top_level.txt +0 -0
pyscf/mcscf/mc1step.py
CHANGED
|
@@ -188,8 +188,8 @@ def gen_g_hop(casscf, mo, u, casdm1, casdm2, eris):
|
|
|
188
188
|
if ncore > 0:
|
|
189
189
|
# Due to x1_rs [4(pq|sr) + 4(pq|rs) - 2(pr|sq) - 2(ps|rq)] for r>s p>q,
|
|
190
190
|
# == -x1_sr [4(pq|sr) + 4(pq|rs) - 2(pr|sq) - 2(ps|rq)] for r>s p>q,
|
|
191
|
-
# x2[:,:ncore] += H * x1[:,:ncore] => (
|
|
192
|
-
# x2[:,:ncore] += -H' * x1[:ncore] => (
|
|
191
|
+
# x2[:,:ncore] += H * x1[:,:ncore] => (because x1=-x1.T) =>
|
|
192
|
+
# x2[:,:ncore] += -H' * x1[:ncore] => (because x2-x2.T) =>
|
|
193
193
|
# x2[:ncore] += H' * x1[:ncore]
|
|
194
194
|
va, vc = casscf.update_jk_in_ah(mo, x1, casdm1, eris)
|
|
195
195
|
x2[ncore:nocc] += va
|
|
@@ -282,7 +282,7 @@ def rotate_orb_cc(casscf, mo, fcivec, fcasdm1, fcasdm2, eris, x0_guess=None,
|
|
|
282
282
|
break
|
|
283
283
|
|
|
284
284
|
elif (ikf >= max(casscf.kf_interval, -numpy.log(norm_dr+1e-7)) or
|
|
285
|
-
# Insert keyframe if the keyframe and the
|
|
285
|
+
# Insert keyframe if the keyframe and the estimated grad
|
|
286
286
|
# are very different
|
|
287
287
|
norm_gorb < norm_gkf/casscf.kf_trust_region):
|
|
288
288
|
ikf = 0
|
|
@@ -341,6 +341,9 @@ def kernel(casscf, mo_coeff, tol=1e-7, conv_tol_grad=None,
|
|
|
341
341
|
if callback is None:
|
|
342
342
|
callback = casscf.callback
|
|
343
343
|
|
|
344
|
+
if ci0 is None:
|
|
345
|
+
ci0 = casscf.ci
|
|
346
|
+
|
|
344
347
|
mo = mo_coeff
|
|
345
348
|
nmo = mo_coeff.shape[1]
|
|
346
349
|
ncore = casscf.ncore
|
|
@@ -464,7 +467,7 @@ def kernel(casscf, mo_coeff, tol=1e-7, conv_tol_grad=None,
|
|
|
464
467
|
(max_offdiag_u < casscf.small_rot_tol or casscf.small_rot_tol == 0)):
|
|
465
468
|
conv = True
|
|
466
469
|
|
|
467
|
-
if dump_chk:
|
|
470
|
+
if dump_chk and casscf.chkfile:
|
|
468
471
|
casscf.dump_chk(locals())
|
|
469
472
|
|
|
470
473
|
if callable(callback):
|
|
@@ -496,7 +499,7 @@ def kernel(casscf, mo_coeff, tol=1e-7, conv_tol_grad=None,
|
|
|
496
499
|
'call to mc.cas_natorb_() is required')
|
|
497
500
|
mo_energy = None
|
|
498
501
|
|
|
499
|
-
if dump_chk:
|
|
502
|
+
if dump_chk and casscf.chkfile:
|
|
500
503
|
casscf.dump_chk(locals())
|
|
501
504
|
|
|
502
505
|
log.timer('1-step CASSCF', *cput0)
|
|
@@ -583,8 +586,8 @@ def max_stepsize_scheduler(casscf, envs):
|
|
|
583
586
|
# To extend CASSCF for certain CAS space solver, it can be done by assign an
|
|
584
587
|
# object or a module to CASSCF.fcisolver. The fcisolver object or module
|
|
585
588
|
# should at least have three member functions "kernel" (wfn for given
|
|
586
|
-
#
|
|
587
|
-
# 2e-
|
|
589
|
+
# hamiltonian), "make_rdm12" (1- and 2-pdm), "absorb_h1e" (effective
|
|
590
|
+
# 2e-hamiltonian) in 1-step CASSCF solver, and two member functions "kernel"
|
|
588
591
|
# and "make_rdm12" in 2-step CASSCF solver
|
|
589
592
|
class CASSCF(casci.CASBase):
|
|
590
593
|
__doc__ = casci.CASBase.__doc__ + '''
|
|
@@ -652,7 +655,7 @@ class CASSCF(casci.CASBase):
|
|
|
652
655
|
callback function takes one dict as the argument which is
|
|
653
656
|
generated by the builtin function :func:`locals`, so that the
|
|
654
657
|
callback function can access all local variables in the current
|
|
655
|
-
|
|
658
|
+
environment.
|
|
656
659
|
scale_restoration : float
|
|
657
660
|
When a step of orbital rotation moves out of trust region, the
|
|
658
661
|
orbital optimization will be restored to previous state and the
|
|
@@ -758,8 +761,6 @@ class CASSCF(casci.CASBase):
|
|
|
758
761
|
def __init__(self, mf_or_mol, ncas=0, nelecas=0, ncore=None, frozen=None):
|
|
759
762
|
casci.CASBase.__init__(self, mf_or_mol, ncas, nelecas, ncore)
|
|
760
763
|
self.frozen = frozen
|
|
761
|
-
|
|
762
|
-
self.callback = None
|
|
763
764
|
self.chkfile = self._scf.chkfile
|
|
764
765
|
|
|
765
766
|
self.fcisolver.max_cycle = getattr(__config__,
|
|
@@ -777,6 +778,9 @@ class CASSCF(casci.CASBase):
|
|
|
777
778
|
self.converged = False
|
|
778
779
|
self._max_stepsize = None
|
|
779
780
|
|
|
781
|
+
__getstate__, __setstate__ = lib.generate_pickle_methods(
|
|
782
|
+
excludes=('chkfile', 'callback'))
|
|
783
|
+
|
|
780
784
|
def dump_flags(self, verbose=None):
|
|
781
785
|
log = logger.new_logger(self, verbose)
|
|
782
786
|
log.info('')
|
|
@@ -853,6 +857,9 @@ To enable the solvent model for CASSCF, the following code needs to be called
|
|
|
853
857
|
self.mo_coeff = mo_coeff
|
|
854
858
|
if callback is None: callback = self.callback
|
|
855
859
|
|
|
860
|
+
if ci0 is None:
|
|
861
|
+
ci0 = self.ci
|
|
862
|
+
|
|
856
863
|
self.check_sanity()
|
|
857
864
|
self.dump_flags()
|
|
858
865
|
|
|
@@ -966,7 +973,7 @@ To enable the solvent model for CASSCF, the following code needs to be called
|
|
|
966
973
|
rotate_orb_cc = rotate_orb_cc
|
|
967
974
|
|
|
968
975
|
def update_ao2mo(self, mo):
|
|
969
|
-
raise DeprecationWarning('update_ao2mo was
|
|
976
|
+
raise DeprecationWarning('update_ao2mo was obsoleted since pyscf v1.0. '
|
|
970
977
|
'Use .ao2mo method instead')
|
|
971
978
|
|
|
972
979
|
def ao2mo(self, mo_coeff=None):
|
|
@@ -1171,38 +1178,55 @@ To enable the solvent model for CASSCF, the following code needs to be called
|
|
|
1171
1178
|
paaa = lib.transpose(buf.reshape(ncas*ncas,-1), out=out)
|
|
1172
1179
|
return paaa.reshape(nmo,ncas,ncas,ncas)
|
|
1173
1180
|
|
|
1174
|
-
def dump_chk(self,
|
|
1175
|
-
|
|
1176
|
-
return self
|
|
1181
|
+
def dump_chk(self, envs_or_file):
|
|
1182
|
+
'''Serialize the MCSCF object and save it to the specified chkfile.
|
|
1177
1183
|
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1184
|
+
Args:
|
|
1185
|
+
envs_or_file:
|
|
1186
|
+
If this argument is a file path, the serialized MCSCF object is
|
|
1187
|
+
saved to the file specified by this argument.
|
|
1188
|
+
If this attribute is a dict (created by locals()), the necessary
|
|
1189
|
+
variables are saved to the file specified by the attribute .chkfile.
|
|
1190
|
+
'''
|
|
1191
|
+
if isinstance(envs_or_file, str):
|
|
1192
|
+
envs = None
|
|
1193
|
+
chk_file = envs_or_file
|
|
1182
1194
|
else:
|
|
1183
|
-
|
|
1195
|
+
envs = envs_or_file
|
|
1196
|
+
chk_file = self.chkfile
|
|
1197
|
+
if not chk_file:
|
|
1198
|
+
return self
|
|
1199
|
+
|
|
1200
|
+
e_tot = mo_coeff = mo_occ = mo_energy = e_cas = civec = casdm1 = None
|
|
1184
1201
|
ncore = self.ncore
|
|
1185
1202
|
nocc = ncore + self.ncas
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
+
|
|
1204
|
+
if envs is not None:
|
|
1205
|
+
if self.chk_ci:
|
|
1206
|
+
civec = envs.get('fcivec', None)
|
|
1207
|
+
|
|
1208
|
+
e_tot = envs['e_tot']
|
|
1209
|
+
e_cas = envs['e_cas']
|
|
1210
|
+
casdm1 = envs['casdm1']
|
|
1211
|
+
if 'mo' in envs:
|
|
1212
|
+
mo_coeff = envs['mo']
|
|
1213
|
+
else:
|
|
1214
|
+
mo_coeff = envs['mo_coeff']
|
|
1215
|
+
mo_occ = numpy.zeros(mo_coeff.shape[1])
|
|
1216
|
+
mo_occ[:ncore] = 2
|
|
1217
|
+
if self.natorb:
|
|
1218
|
+
occ = self._eig(-casdm1, ncore, nocc)[0]
|
|
1219
|
+
mo_occ[ncore:nocc] = -occ
|
|
1220
|
+
else:
|
|
1221
|
+
mo_occ[ncore:nocc] = casdm1.diagonal()
|
|
1222
|
+
# Note: mo_energy in active space =/= F_{ii} (F is general Fock)
|
|
1223
|
+
if 'mo_energy' in envs:
|
|
1224
|
+
mo_energy = envs['mo_energy']
|
|
1225
|
+
|
|
1226
|
+
chkfile.dump_mcscf(self, chk_file, 'mcscf', e_tot,
|
|
1203
1227
|
mo_coeff, ncore, self.ncas, mo_occ,
|
|
1204
|
-
mo_energy,
|
|
1205
|
-
overwrite_mol=
|
|
1228
|
+
mo_energy, e_cas, civec, casdm1,
|
|
1229
|
+
overwrite_mol=(envs is None))
|
|
1206
1230
|
return self
|
|
1207
1231
|
|
|
1208
1232
|
def update_from_chk(self, chkfile=None):
|
pyscf/mcscf/newton_casscf.py
CHANGED
|
@@ -366,8 +366,8 @@ def gen_g_hop(casscf, mo, ci0, eris, verbose=None):
|
|
|
366
366
|
# part4, part5, part6
|
|
367
367
|
# Due to x1_rs [4(pq|sr) + 4(pq|rs) - 2(pr|sq) - 2(ps|rq)] for r>s p>q,
|
|
368
368
|
# == -x1_sr [4(pq|sr) + 4(pq|rs) - 2(pr|sq) - 2(ps|rq)] for r>s p>q,
|
|
369
|
-
# x2[:,:ncore] += H * x1[:,:ncore] => (
|
|
370
|
-
# x2[:,:ncore] += -H' * x1[:ncore] => (
|
|
369
|
+
# x2[:,:ncore] += H * x1[:,:ncore] => (because x1=-x1.T) =>
|
|
370
|
+
# x2[:,:ncore] += -H' * x1[:ncore] => (because x2-x2.T) =>
|
|
371
371
|
# x2[:ncore] += H' * x1[:ncore]
|
|
372
372
|
va, vc = casscf.update_jk_in_ah(mo, x1, casdm1, eris)
|
|
373
373
|
x2[ncore:nocc] += va
|
|
@@ -501,7 +501,7 @@ def update_orb_ci(casscf, mo, ci0, eris, x0_guess=None,
|
|
|
501
501
|
break
|
|
502
502
|
|
|
503
503
|
elif ((ikf >= max(casscf.kf_interval, casscf.kf_interval-numpy.log(norm_dr+1e-7)) or
|
|
504
|
-
# Insert keyframe if the keyframe and the
|
|
504
|
+
# Insert keyframe if the keyframe and the estimated grad are too different
|
|
505
505
|
norm_gall < norm_gkf/casscf.kf_trust_region)):
|
|
506
506
|
ikf = 0
|
|
507
507
|
u, ci_kf = extract_rotation(casscf, dr, u, ci_kf)
|
|
@@ -705,7 +705,7 @@ class CASSCF(mc1step.CASSCF):
|
|
|
705
705
|
callback function takes one dict as the argument which is
|
|
706
706
|
generated by the builtin function :func:`locals`, so that the
|
|
707
707
|
callback function can access all local variables in the current
|
|
708
|
-
|
|
708
|
+
environment.
|
|
709
709
|
|
|
710
710
|
Saved results
|
|
711
711
|
|
|
@@ -852,7 +852,7 @@ class CASSCF(mc1step.CASSCF):
|
|
|
852
852
|
return e_tot, e_cas, fcivec
|
|
853
853
|
|
|
854
854
|
def update_ao2mo(self, mo):
|
|
855
|
-
raise DeprecationWarning('update_ao2mo was
|
|
855
|
+
raise DeprecationWarning('update_ao2mo was obsoleted since pyscf v1.0. '
|
|
856
856
|
'Use .ao2mo method instead')
|
|
857
857
|
|
|
858
858
|
|
pyscf/mcscf/ucasci.py
CHANGED
|
@@ -54,7 +54,7 @@ def extract_orbs(mo_coeff, ncas, nelecas, ncore):
|
|
|
54
54
|
return mo_core, mo_cas, mo_vir
|
|
55
55
|
|
|
56
56
|
def h1e_for_cas(casci, mo_coeff=None, ncas=None, ncore=None):
|
|
57
|
-
'''CAS
|
|
57
|
+
'''CAS space one-electron hamiltonian for UHF-CASCI or UHF-CASSCF
|
|
58
58
|
|
|
59
59
|
Args:
|
|
60
60
|
casci : a U-CASSCF/U-CASCI object or UHF object
|
pyscf/mcscf/umc1step.py
CHANGED
|
@@ -27,6 +27,7 @@ from functools import reduce
|
|
|
27
27
|
import numpy
|
|
28
28
|
import pyscf.gto
|
|
29
29
|
import pyscf.scf
|
|
30
|
+
from pyscf import lib
|
|
30
31
|
from pyscf.lib import logger
|
|
31
32
|
from pyscf.mcscf import ucasci
|
|
32
33
|
from pyscf.mcscf.mc1step import expmat, rotate_orb_cc, max_stepsize_scheduler, as_scanner
|
|
@@ -399,6 +400,9 @@ class UCASSCF(ucasci.UCASBase):
|
|
|
399
400
|
self.converged = False
|
|
400
401
|
self._max_stepsize = None
|
|
401
402
|
|
|
403
|
+
__getstate__, __setstate__ = lib.generate_pickle_methods(
|
|
404
|
+
excludes=('chkfile', 'callback'))
|
|
405
|
+
|
|
402
406
|
def dump_flags(self, verbose=None):
|
|
403
407
|
log = logger.new_logger(self, verbose)
|
|
404
408
|
log.info('')
|
|
@@ -732,39 +736,54 @@ class UCASSCF(ucasci.UCASBase):
|
|
|
732
736
|
ci1 += xs[i] * v[i,0]
|
|
733
737
|
return ci1, g
|
|
734
738
|
|
|
735
|
-
def dump_chk(self,
|
|
736
|
-
|
|
737
|
-
return self
|
|
739
|
+
def dump_chk(self, envs_or_file):
|
|
740
|
+
'''Serialize the MCSCF object and save it to the specified chkfile.
|
|
738
741
|
|
|
739
|
-
|
|
740
|
-
|
|
742
|
+
Args:
|
|
743
|
+
envs_or_file:
|
|
744
|
+
If this argument is a file path, the serialized MCSCF object is
|
|
745
|
+
saved to the file specified by this argument.
|
|
746
|
+
If this attribute is a dict (created by locals()), the necessary
|
|
747
|
+
variables are saved to the file specified by the attribute .chkfile.
|
|
748
|
+
'''
|
|
749
|
+
if isinstance(envs_or_file, str):
|
|
750
|
+
envs = None
|
|
751
|
+
chk_file = envs_or_file
|
|
741
752
|
else:
|
|
742
|
-
|
|
753
|
+
envs = envs_or_file
|
|
754
|
+
chk_file = self.chkfile
|
|
755
|
+
if not chk_file:
|
|
756
|
+
return self
|
|
757
|
+
|
|
758
|
+
e_tot = mo_coeff = mo_occ = mo_energy = e_cas = civec = casdm1 = None
|
|
743
759
|
ncore = self.ncore
|
|
744
760
|
ncas = self.ncas
|
|
745
761
|
nocca = ncore[0] + ncas
|
|
746
762
|
noccb = ncore[1] + ncas
|
|
747
|
-
if 'mo' in envs:
|
|
748
|
-
mo_coeff = envs['mo']
|
|
749
|
-
else:
|
|
750
|
-
mo_coeff = envs['mo']
|
|
751
|
-
mo_occ = numpy.zeros((2,envs['mo'][0].shape[1]))
|
|
752
|
-
mo_occ[0,:ncore[0]] = 1
|
|
753
|
-
mo_occ[1,:ncore[1]] = 1
|
|
754
|
-
if self.natorb:
|
|
755
|
-
occa, ucas = self._eig(-envs['casdm1'][0], ncore[0], nocca)
|
|
756
|
-
occb, ucas = self._eig(-envs['casdm1'][1], ncore[1], noccb)
|
|
757
|
-
mo_occ[0,ncore[0]:nocca] = -occa
|
|
758
|
-
mo_occ[1,ncore[1]:noccb] = -occb
|
|
759
|
-
else:
|
|
760
|
-
mo_occ[0,ncore[0]:nocca] = envs['casdm1'][0].diagonal()
|
|
761
|
-
mo_occ[1,ncore[1]:noccb] = envs['casdm1'][1].diagonal()
|
|
762
|
-
mo_energy = 'None'
|
|
763
763
|
|
|
764
|
-
|
|
764
|
+
if envs is not None:
|
|
765
|
+
if self.chk_ci:
|
|
766
|
+
civec = envs['fcivec']
|
|
767
|
+
if 'mo' in envs:
|
|
768
|
+
mo_coeff = envs['mo']
|
|
769
|
+
else:
|
|
770
|
+
mo_coeff = envs['mo_coeff']
|
|
771
|
+
mo_occ = numpy.zeros((2,envs['mo'][0].shape[1]))
|
|
772
|
+
mo_occ[0,:ncore[0]] = 1
|
|
773
|
+
mo_occ[1,:ncore[1]] = 1
|
|
774
|
+
if self.natorb:
|
|
775
|
+
occa, ucas = self._eig(-casdm1[0], ncore[0], nocca)
|
|
776
|
+
occb, ucas = self._eig(-casdm1[1], ncore[1], noccb)
|
|
777
|
+
mo_occ[0,ncore[0]:nocca] = -occa
|
|
778
|
+
mo_occ[1,ncore[1]:noccb] = -occb
|
|
779
|
+
else:
|
|
780
|
+
mo_occ[0,ncore[0]:nocca] = casdm1[0].diagonal()
|
|
781
|
+
mo_occ[1,ncore[1]:noccb] = casdm1[1].diagonal()
|
|
782
|
+
|
|
783
|
+
chkfile.dump_mcscf(self, self.chkfile, 'mcscf', e_tot,
|
|
765
784
|
mo_coeff, ncore, ncas, mo_occ,
|
|
766
|
-
mo_energy,
|
|
767
|
-
overwrite_mol=
|
|
785
|
+
mo_energy, e_cas, civec, casdm1,
|
|
786
|
+
overwrite_mol=(envs is None))
|
|
768
787
|
return self
|
|
769
788
|
|
|
770
789
|
def rotate_mo(self, mo, u, log=None):
|
pyscf/md/integrators.py
CHANGED
|
@@ -128,7 +128,7 @@ class _Integrator(lib.StreamObject):
|
|
|
128
128
|
method : lib.GradScanner, rhf.GradientsBase instance, or
|
|
129
129
|
has nuc_grad_method method.
|
|
130
130
|
Method by which to compute the energy gradients and energies
|
|
131
|
-
in order to
|
|
131
|
+
in order to propagate the equations of motion. Realistically,
|
|
132
132
|
it can be any callable object such that it returns the energy
|
|
133
133
|
and potential energy gradient when given a mol.
|
|
134
134
|
|
|
@@ -179,8 +179,8 @@ class _Integrator(lib.StreamObject):
|
|
|
179
179
|
Time of the last step during the simulation.
|
|
180
180
|
|
|
181
181
|
callback : function(envs_dict) => None
|
|
182
|
-
Callback function takes one dict as the
|
|
183
|
-
|
|
182
|
+
Callback function takes one dict as the argument which is
|
|
183
|
+
generated by the builtin function :func:`locals`, so that the
|
|
184
184
|
callback function can access all local variables in the current
|
|
185
185
|
environment.
|
|
186
186
|
'''
|
pyscf/mp/mp2.py
CHANGED
|
@@ -54,7 +54,7 @@ def kernel(mp, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2, verbos
|
|
|
54
54
|
emp2_ss = emp2_os = 0
|
|
55
55
|
for i in range(nocc):
|
|
56
56
|
if isinstance(eris.ovov, numpy.ndarray) and eris.ovov.ndim == 4:
|
|
57
|
-
# When mf._eri is a custom integrals
|
|
57
|
+
# When mf._eri is a custom integrals with the shape (n,n,n,n), the
|
|
58
58
|
# ovov integrals might be in a 4-index tensor.
|
|
59
59
|
gi = eris.ovov[i]
|
|
60
60
|
else:
|
|
@@ -160,7 +160,7 @@ def make_rdm1(mp, t2=None, eris=None, ao_repr=False, with_frozen=True):
|
|
|
160
160
|
|
|
161
161
|
Kwargs:
|
|
162
162
|
ao_repr : boolean
|
|
163
|
-
Whether to
|
|
163
|
+
Whether to transform 1-particle density matrix to AO
|
|
164
164
|
representation.
|
|
165
165
|
'''
|
|
166
166
|
from pyscf.cc import ccsd_rdm
|
|
@@ -248,7 +248,8 @@ def make_fno(mp, thresh=1e-6, pct_occ=None, nvir_act=None, t2=None):
|
|
|
248
248
|
else:
|
|
249
249
|
cumsum = numpy.cumsum(n/numpy.sum(n))
|
|
250
250
|
logger.debug(mp, 'Sum(pct_occ): %s', cumsum)
|
|
251
|
-
nvir_keep = numpy.count_nonzero(
|
|
251
|
+
nvir_keep = numpy.count_nonzero(
|
|
252
|
+
[c <= pct_occ or numpy.isclose(c, pct_occ) for c in cumsum])
|
|
252
253
|
else:
|
|
253
254
|
nvir_keep = min(nvir, nvir_act)
|
|
254
255
|
|
|
@@ -383,7 +384,7 @@ def get_frozen_mask(mp):
|
|
|
383
384
|
'''Get boolean mask for the restricted reference orbitals.
|
|
384
385
|
|
|
385
386
|
In the returned boolean (mask) array of frozen orbital indices, the
|
|
386
|
-
element is False if it
|
|
387
|
+
element is False if it corresponds to the frozen orbital.
|
|
387
388
|
'''
|
|
388
389
|
moidx = numpy.ones(mp.mo_occ.size, dtype=bool)
|
|
389
390
|
if mp._nmo is not None:
|
|
@@ -478,7 +479,7 @@ class MP2(lib.StreamObject):
|
|
|
478
479
|
For non-canonical MP2, DIIS space size in MP2
|
|
479
480
|
iterations. Default is 6.
|
|
480
481
|
level_shift : float
|
|
481
|
-
A shift on virtual orbital energies to
|
|
482
|
+
A shift on virtual orbital energies to stabilize the MP2 iterations.
|
|
482
483
|
frozen : int or list
|
|
483
484
|
If integer is given, the inner-most orbitals are excluded from MP2
|
|
484
485
|
amplitudes. Given the orbital indices (0-based) in a list, both
|
pyscf/mp/ump2.py
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
'''
|
|
17
|
-
UMP2 with spatial
|
|
17
|
+
UMP2 with spatial integrals
|
|
18
18
|
'''
|
|
19
19
|
|
|
20
20
|
|
|
@@ -63,7 +63,7 @@ def kernel(mp, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2, verbos
|
|
|
63
63
|
emp2_ss = emp2_os = 0.0
|
|
64
64
|
for i in range(nocca):
|
|
65
65
|
if isinstance(eris.ovov, numpy.ndarray) and eris.ovov.ndim == 4:
|
|
66
|
-
# When mf._eri is a custom integrals
|
|
66
|
+
# When mf._eri is a custom integrals with the shape (n,n,n,n), the
|
|
67
67
|
# ovov integrals might be in a 4-index tensor.
|
|
68
68
|
eris_ovov = eris.ovov[i]
|
|
69
69
|
else:
|
|
@@ -77,7 +77,7 @@ def kernel(mp, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2, verbos
|
|
|
77
77
|
t2aa[i] = t2i - t2i.transpose(0,2,1)
|
|
78
78
|
|
|
79
79
|
if isinstance(eris.ovOV, numpy.ndarray) and eris.ovOV.ndim == 4:
|
|
80
|
-
# When mf._eri is a custom integrals
|
|
80
|
+
# When mf._eri is a custom integrals with the shape (n,n,n,n), the
|
|
81
81
|
# ovov integrals might be in a 4-index tensor.
|
|
82
82
|
eris_ovov = eris.ovOV[i]
|
|
83
83
|
else:
|
|
@@ -90,7 +90,7 @@ def kernel(mp, mo_energy=None, mo_coeff=None, eris=None, with_t2=WITH_T2, verbos
|
|
|
90
90
|
|
|
91
91
|
for i in range(noccb):
|
|
92
92
|
if isinstance(eris.OVOV, numpy.ndarray) and eris.OVOV.ndim == 4:
|
|
93
|
-
# When mf._eri is a custom integrals
|
|
93
|
+
# When mf._eri is a custom integrals with the shape (n,n,n,n), the
|
|
94
94
|
# ovov integrals might be in a 4-index tensor.
|
|
95
95
|
eris_ovov = eris.OVOV[i]
|
|
96
96
|
else:
|
|
@@ -217,7 +217,7 @@ def get_frozen_mask(mp):
|
|
|
217
217
|
'''Get boolean mask for the unrestricted reference orbitals.
|
|
218
218
|
|
|
219
219
|
In the returned boolean (mask) array of frozen orbital indices, the
|
|
220
|
-
element is False if it
|
|
220
|
+
element is False if it corresponds to the frozen orbital.
|
|
221
221
|
'''
|
|
222
222
|
moidxa = numpy.ones(mp.mo_occ[0].size, dtype=bool)
|
|
223
223
|
moidxb = numpy.ones(mp.mo_occ[1].size, dtype=bool)
|
|
@@ -323,7 +323,8 @@ def make_fno(mp, thresh=1e-6, pct_occ=None, nvir_act=None, t2=None, eris=None):
|
|
|
323
323
|
else:
|
|
324
324
|
cumsum = numpy.cumsum(n/numpy.sum(n))
|
|
325
325
|
logger.debug(mp, 'Sum(pct_occ): %s', cumsum)
|
|
326
|
-
nvir_keep = numpy.count_nonzero(
|
|
326
|
+
nvir_keep = numpy.count_nonzero(
|
|
327
|
+
[c <= pct_occ or numpy.isclose(c, pct_occ) for c in cumsum])
|
|
327
328
|
else:
|
|
328
329
|
nvir_keep = min(nvir, nvir_act[s])
|
|
329
330
|
|
pyscf/pbc/adc/kadc_rhf.py
CHANGED
|
@@ -44,7 +44,7 @@ from pyscf.lib.parameters import LOOSE_ZERO_TOL, LARGE_DENOM # noqa
|
|
|
44
44
|
import h5py
|
|
45
45
|
import tempfile
|
|
46
46
|
|
|
47
|
-
# Note : All
|
|
47
|
+
# Note : All integrals are in Chemist's notation except for vvvv
|
|
48
48
|
# Eg.of momentum conservation :
|
|
49
49
|
# Chemist's oovv(ijab) : ki - kj + ka - kb
|
|
50
50
|
# Amplitudes t2(ijab) : ki + kj - ka - kba
|
|
@@ -45,7 +45,7 @@ import h5py
|
|
|
45
45
|
import tempfile
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
# Note : All
|
|
48
|
+
# Note : All integrals are in Chemist's notation except for vvvv
|
|
49
49
|
# Eg.of momentum conservation :
|
|
50
50
|
# Chemist's oovv(ijab) : ki - kj + ka - kb
|
|
51
51
|
# Amplitudes t2(ijab) : ki + kj - ka - kba
|
|
@@ -281,7 +281,7 @@ def compute_amplitudes(myadc, eris):
|
|
|
281
281
|
cput0 = log.timer_debug1("Completed t2_2 amplitude calculation", *cput0)
|
|
282
282
|
|
|
283
283
|
if (myadc.method == "adc(3)" and myadc.approx_trans_moments is False):
|
|
284
|
-
raise NotImplementedError('3rd order singles
|
|
284
|
+
raise NotImplementedError('3rd order singles amplitudes not implemented')
|
|
285
285
|
|
|
286
286
|
t1 = (t1_2, t1_3)
|
|
287
287
|
t2 = (t2_1, t2_2)
|
pyscf/pbc/ao2mo/eris.py
CHANGED
pyscf/pbc/cc/kccsd_rhf.py
CHANGED
|
@@ -242,10 +242,10 @@ def _get_epq(pindices,qindices,fac=[1.0,1.0],large_num=LARGE_DENOM):
|
|
|
242
242
|
|
|
243
243
|
Args:
|
|
244
244
|
pindices (5-list of object):
|
|
245
|
-
A list of p0, p1, kp, orbital values, and non-zero
|
|
245
|
+
A list of p0, p1, kp, orbital values, and non-zero indices for the first
|
|
246
246
|
denominator indices.
|
|
247
247
|
qindices (5-list of object):
|
|
248
|
-
A list of q0, q1, kq, orbital values, and non-zero
|
|
248
|
+
A list of q0, q1, kq, orbital values, and non-zero indices for the second
|
|
249
249
|
denominator element.
|
|
250
250
|
fac (3-list of float):
|
|
251
251
|
Factors to multiply the first and second denominator elements.
|
|
@@ -255,7 +255,7 @@ def _get_epq(pindices,qindices,fac=[1.0,1.0],large_num=LARGE_DENOM):
|
|
|
255
255
|
def get_idx(x0,x1,kx,n0_p):
|
|
256
256
|
return np.logical_and(n0_p[kx] >= x0, n0_p[kx] < x1)
|
|
257
257
|
|
|
258
|
-
assert (all(
|
|
258
|
+
assert (all(len(x) == 5 for x in [pindices,qindices]))
|
|
259
259
|
p0,p1,kp,mo_e_p,nonzero_p = pindices
|
|
260
260
|
q0,q1,kq,mo_e_q,nonzero_q = qindices
|
|
261
261
|
fac_p, fac_q = fac
|
pyscf/pbc/cc/kccsd_t_rhf.py
CHANGED
|
@@ -117,7 +117,7 @@ def kernel(mycc, eris, t1=None, t2=None, max_memory=2000, verbose=logger.INFO):
|
|
|
117
117
|
def get_w(ki, kj, kk, ka, kb, kc, a0, a1, b0, b1, c0, c1):
|
|
118
118
|
'''Wijkabc intermediate as described in Scuseria paper before Pijkabc acts
|
|
119
119
|
|
|
120
|
-
Uses
|
|
120
|
+
Uses transposed eris for fast data access.'''
|
|
121
121
|
km = kconserv[kc, kk, kb]
|
|
122
122
|
kf = kconserv[kk, kc, kj]
|
|
123
123
|
out = einsum('cfjk,abif->abcijk', t2T[kc,kf,kj,c0:c1,:,:,:], eris_vvop[ka,kb,ki,a0:a1,b0:b1,:,nocc:])
|
|
@@ -579,7 +579,7 @@ def _get_epqr(pindices,qindices,rindices,fac=[1.0,1.0,1.0],large_num=LARGE_DENOM
|
|
|
579
579
|
def get_idx(x0,x1,kx,n0_p):
|
|
580
580
|
return np.logical_and(n0_p[kx] >= x0, n0_p[kx] < x1)
|
|
581
581
|
|
|
582
|
-
assert (all(
|
|
582
|
+
assert (all(len(x) == 5 for x in [pindices,qindices]))
|
|
583
583
|
p0,p1,kp,mo_e_p,nonzero_p = pindices
|
|
584
584
|
q0,q1,kq,mo_e_q,nonzero_q = qindices
|
|
585
585
|
r0,r1,kr,mo_e_r,nonzero_r = rindices
|
pyscf/pbc/ci/kcis_rhf.py
CHANGED
|
@@ -126,7 +126,7 @@ def kernel(cis, nroots=1, eris=None, kptlist=None, **kargs):
|
|
|
126
126
|
return evals, evecs
|
|
127
127
|
|
|
128
128
|
def cis_matvec_singlet(cis, vector, kshift, eris=None):
|
|
129
|
-
"""Compute matrix-vector product of the
|
|
129
|
+
"""Compute matrix-vector product of the Hamiltonian matrix and a CIS c
|
|
130
130
|
oefficient vector, in the space of single excitation.
|
|
131
131
|
|
|
132
132
|
Arguments:
|
|
@@ -143,7 +143,7 @@ def cis_matvec_singlet(cis, vector, kshift, eris=None):
|
|
|
143
143
|
electron repulsion integrals (default: {None})
|
|
144
144
|
|
|
145
145
|
Returns:
|
|
146
|
-
1D array -- matrix-vector product of the
|
|
146
|
+
1D array -- matrix-vector product of the Hamiltonian matrix and the
|
|
147
147
|
input vector.
|
|
148
148
|
"""
|
|
149
149
|
if eris is None:
|
pyscf/pbc/df/aft.py
CHANGED
|
@@ -180,7 +180,7 @@ def _int_nuc_vloc(mydf, nuccell, kpts, intor='int3c2e', aosym='s2', comp=1):
|
|
|
180
180
|
raise DeprecationWarning
|
|
181
181
|
|
|
182
182
|
def get_pp(mydf, kpts=None):
|
|
183
|
-
'''Get the periodic
|
|
183
|
+
'''Get the periodic pseudopotential nuc-el AO matrix, with G=0 removed.
|
|
184
184
|
|
|
185
185
|
Kwargs:
|
|
186
186
|
mesh: custom mesh grids. By default mesh is determined by the
|
|
@@ -703,7 +703,7 @@ class AFTDF(lib.StreamObject, AFTDFMixin):
|
|
|
703
703
|
cell = self.cell
|
|
704
704
|
if cell.dimension == 2 and cell.low_dim_ft_type != 'inf_vacuum':
|
|
705
705
|
raise RuntimeError('ERIs of PBC-2D systems are not positive '
|
|
706
|
-
'definite. Current API only supports
|
|
706
|
+
'definite. Current API only supports positive '
|
|
707
707
|
'definite ERIs.')
|
|
708
708
|
|
|
709
709
|
if blksize is None:
|
pyscf/pbc/df/aft_ao2mo.py
CHANGED
|
@@ -222,7 +222,7 @@ def general(mydf, mo_coeffs, kpts=None,
|
|
|
222
222
|
|
|
223
223
|
def get_ao_pairs_G(mydf, kpts=numpy.zeros((2,3)), q=None, shls_slice=None,
|
|
224
224
|
compact=getattr(__config__, 'pbc_df_ao_pairs_compact', False)):
|
|
225
|
-
'''Calculate forward Fourier
|
|
225
|
+
'''Calculate forward Fourier transform (G|ij) of all AO pairs.
|
|
226
226
|
|
|
227
227
|
Returns:
|
|
228
228
|
ao_pairs_G : 2D complex array
|