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/tdscf/uhf.py
CHANGED
|
@@ -23,9 +23,9 @@ from pyscf import scf
|
|
|
23
23
|
from pyscf import symm
|
|
24
24
|
from pyscf import ao2mo
|
|
25
25
|
from pyscf.lib import logger
|
|
26
|
-
from pyscf.tdscf import rhf
|
|
27
26
|
from pyscf.scf import uhf_symm
|
|
28
|
-
from pyscf.
|
|
27
|
+
from pyscf.tdscf import rhf
|
|
28
|
+
from pyscf.tdscf._lr_eig import eigh as lr_eigh, eig as lr_eig
|
|
29
29
|
from pyscf.data import nist
|
|
30
30
|
from pyscf import __config__
|
|
31
31
|
|
|
@@ -63,13 +63,9 @@ def gen_tda_operation(mf, fock_ao=None, wfnsym=None):
|
|
|
63
63
|
if wfnsym is not None and mol.symmetry:
|
|
64
64
|
if isinstance(wfnsym, str):
|
|
65
65
|
wfnsym = symm.irrep_name2id(mol.groupname, wfnsym)
|
|
66
|
-
orbsyma, orbsymb = uhf_symm.get_orbsym(mol, mo_coeff)
|
|
67
66
|
wfnsym = wfnsym % 10 # convert to D2h subgroup
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
sym_forbida = (orbsyma_in_d2h[occidxa,None] ^ orbsyma_in_d2h[viridxa]) != wfnsym
|
|
71
|
-
sym_forbidb = (orbsymb_in_d2h[occidxb,None] ^ orbsymb_in_d2h[viridxb]) != wfnsym
|
|
72
|
-
sym_forbid = numpy.hstack((sym_forbida.ravel(), sym_forbidb.ravel()))
|
|
67
|
+
x_sym_a, x_sym_b = _get_x_sym_table(mf)
|
|
68
|
+
sym_forbid = numpy.append(x_sym_a.ravel(), x_sym_b.ravel()) != wfnsym
|
|
73
69
|
|
|
74
70
|
e_ia_a = mo_energy[0][viridxa] - mo_energy[0][occidxa,None]
|
|
75
71
|
e_ia_b = mo_energy[1][viridxb] - mo_energy[1][occidxb,None]
|
|
@@ -83,13 +79,14 @@ def gen_tda_operation(mf, fock_ao=None, wfnsym=None):
|
|
|
83
79
|
vresp = mf.gen_response(hermi=0, max_memory=max_memory)
|
|
84
80
|
|
|
85
81
|
def vind(zs):
|
|
82
|
+
nz = len(zs)
|
|
86
83
|
zs = numpy.asarray(zs)
|
|
87
84
|
if wfnsym is not None and mol.symmetry:
|
|
88
85
|
zs = numpy.copy(zs)
|
|
89
86
|
zs[:,sym_forbid] = 0
|
|
90
87
|
|
|
91
|
-
za = zs[:,:nocca*nvira].reshape(
|
|
92
|
-
zb = zs[:,nocca*nvira:].reshape(
|
|
88
|
+
za = zs[:,:nocca*nvira].reshape(nz,nocca,nvira)
|
|
89
|
+
zb = zs[:,nocca*nvira:].reshape(nz,noccb,nvirb)
|
|
93
90
|
dmova = lib.einsum('xov,qv,po->xpq', za, orbva.conj(), orboa)
|
|
94
91
|
dmovb = lib.einsum('xov,qv,po->xpq', zb, orbvb.conj(), orbob)
|
|
95
92
|
|
|
@@ -100,7 +97,6 @@ def gen_tda_operation(mf, fock_ao=None, wfnsym=None):
|
|
|
100
97
|
v1a += numpy.einsum('xia,ia->xia', za, e_ia_a)
|
|
101
98
|
v1b += numpy.einsum('xia,ia->xia', zb, e_ia_b)
|
|
102
99
|
|
|
103
|
-
nz = zs.shape[0]
|
|
104
100
|
hx = numpy.hstack((v1a.reshape(nz,-1), v1b.reshape(nz,-1)))
|
|
105
101
|
if wfnsym is not None and mol.symmetry:
|
|
106
102
|
hx[:,sym_forbid] = 0
|
|
@@ -109,6 +105,17 @@ def gen_tda_operation(mf, fock_ao=None, wfnsym=None):
|
|
|
109
105
|
return vind, hdiag
|
|
110
106
|
gen_tda_hop = gen_tda_operation
|
|
111
107
|
|
|
108
|
+
def _get_x_sym_table(mf):
|
|
109
|
+
'''Irrep (up to D2h symmetry) of each coefficient in X amplitude'''
|
|
110
|
+
mol = mf.mol
|
|
111
|
+
mo_occa, mo_occb = mf.mo_occ
|
|
112
|
+
orbsyma, orbsymb = uhf_symm.get_orbsym(mol, mf.mo_coeff)
|
|
113
|
+
orbsyma = orbsyma % 10
|
|
114
|
+
orbsymb = orbsymb % 10
|
|
115
|
+
x_sym_a = orbsyma[mo_occa>0,None] ^ orbsyma[mo_occa==0]
|
|
116
|
+
x_sym_b = orbsymb[mo_occb>0,None] ^ orbsymb[mo_occb==0]
|
|
117
|
+
return x_sym_a, x_sym_b
|
|
118
|
+
|
|
112
119
|
def get_ab(mf, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
113
120
|
r'''A and B matrices for TDDFT response function.
|
|
114
121
|
|
|
@@ -183,11 +190,24 @@ def get_ab(mf, mo_energy=None, mo_coeff=None, mo_occ=None):
|
|
|
183
190
|
ni.libxc.test_deriv_order(mf.xc, 2, raise_error=True)
|
|
184
191
|
if mf.do_nlc():
|
|
185
192
|
logger.warn(mf, 'NLC functional found in DFT object. Its second '
|
|
186
|
-
'
|
|
193
|
+
'derivative is not available. Its contribution is '
|
|
187
194
|
'not included in the response function.')
|
|
188
195
|
omega, alpha, hyb = ni.rsh_and_hybrid_coeff(mf.xc, mol.spin)
|
|
189
196
|
|
|
190
197
|
add_hf_(a, b, hyb)
|
|
198
|
+
if omega != 0: # For RSH
|
|
199
|
+
with mol.with_range_coulomb(omega):
|
|
200
|
+
eri_aa = ao2mo.general(mol, [orbo_a,mo_a,mo_a,mo_a], compact=False)
|
|
201
|
+
eri_bb = ao2mo.general(mol, [orbo_b,mo_b,mo_b,mo_b], compact=False)
|
|
202
|
+
eri_aa = eri_aa.reshape(nocc_a,nmo_a,nmo_a,nmo_a)
|
|
203
|
+
eri_bb = eri_bb.reshape(nocc_b,nmo_b,nmo_b,nmo_b)
|
|
204
|
+
a_aa, a_ab, a_bb = a
|
|
205
|
+
b_aa, b_ab, b_bb = b
|
|
206
|
+
k_fac = alpha - hyb
|
|
207
|
+
a_aa -= numpy.einsum('ijba->iajb', eri_aa[:nocc_a,:nocc_a,nocc_a:,nocc_a:]) * k_fac
|
|
208
|
+
b_aa -= numpy.einsum('jaib->iajb', eri_aa[:nocc_a,nocc_a:,:nocc_a,nocc_a:]) * k_fac
|
|
209
|
+
a_bb -= numpy.einsum('ijba->iajb', eri_bb[:nocc_b,:nocc_b,nocc_b:,nocc_b:]) * k_fac
|
|
210
|
+
b_bb -= numpy.einsum('jaib->iajb', eri_bb[:nocc_b,nocc_b:,:nocc_b,nocc_b:]) * k_fac
|
|
191
211
|
|
|
192
212
|
xctype = ni._xc_type(mf.xc)
|
|
193
213
|
dm0 = mf.make_rdm1(mo_coeff, mo_occ)
|
|
@@ -508,8 +528,8 @@ def analyze(tdobj, verbose=None):
|
|
|
508
528
|
log.note('Excited State %3d: %12.5f eV %9.2f nm f=%.4f',
|
|
509
529
|
i+1, e_ev[i], wave_length[i], f_oscillator[i])
|
|
510
530
|
else:
|
|
511
|
-
wfnsyma = rhf.
|
|
512
|
-
wfnsymb = rhf.
|
|
531
|
+
wfnsyma = rhf._analyze_wfnsym(tdobj, x_syma, x[0])
|
|
532
|
+
wfnsymb = rhf._analyze_wfnsym(tdobj, x_symb, x[1])
|
|
513
533
|
if wfnsyma == wfnsymb:
|
|
514
534
|
wfnsym = wfnsyma
|
|
515
535
|
else:
|
|
@@ -606,7 +626,7 @@ class TDA(TDBase):
|
|
|
606
626
|
mf = self._scf
|
|
607
627
|
return gen_tda_hop(mf, wfnsym=self.wfnsym)
|
|
608
628
|
|
|
609
|
-
def init_guess(self, mf, nstates=None, wfnsym=None):
|
|
629
|
+
def init_guess(self, mf, nstates=None, wfnsym=None, return_symmetry=False):
|
|
610
630
|
if nstates is None: nstates = self.nstates
|
|
611
631
|
if wfnsym is None: wfnsym = self.wfnsym
|
|
612
632
|
|
|
@@ -617,30 +637,42 @@ class TDA(TDBase):
|
|
|
617
637
|
occidxb = numpy.where(mo_occ[1]>0)[0]
|
|
618
638
|
viridxa = numpy.where(mo_occ[0]==0)[0]
|
|
619
639
|
viridxb = numpy.where(mo_occ[1]==0)[0]
|
|
620
|
-
e_ia_a =
|
|
621
|
-
e_ia_b =
|
|
622
|
-
|
|
623
|
-
if wfnsym is not None and mol.symmetry:
|
|
624
|
-
if isinstance(wfnsym, str):
|
|
625
|
-
wfnsym = symm.irrep_name2id(mol.groupname, wfnsym)
|
|
626
|
-
orbsyma, orbsymb = uhf_symm.get_orbsym(mol, mf.mo_coeff)
|
|
627
|
-
wfnsym = wfnsym % 10 # convert to D2h subgroup
|
|
628
|
-
orbsyma_in_d2h = numpy.asarray(orbsyma) % 10
|
|
629
|
-
orbsymb_in_d2h = numpy.asarray(orbsymb) % 10
|
|
630
|
-
e_ia_a[(orbsyma_in_d2h[occidxa,None] ^ orbsyma_in_d2h[viridxa]) != wfnsym] = 1e99
|
|
631
|
-
e_ia_b[(orbsymb_in_d2h[occidxb,None] ^ orbsymb_in_d2h[viridxb]) != wfnsym] = 1e99
|
|
632
|
-
|
|
633
|
-
e_ia = numpy.hstack((e_ia_a.ravel(), e_ia_b.ravel()))
|
|
634
|
-
nov = e_ia.size
|
|
640
|
+
e_ia_a = mo_energy[0][viridxa] - mo_energy[0][occidxa,None]
|
|
641
|
+
e_ia_b = mo_energy[1][viridxb] - mo_energy[1][occidxb,None]
|
|
642
|
+
nov = e_ia_a.size + e_ia_b.size
|
|
635
643
|
nstates = min(nstates, nov)
|
|
636
|
-
|
|
644
|
+
|
|
645
|
+
if (wfnsym is not None or return_symmetry) and mf.mol.symmetry:
|
|
646
|
+
x_sym_a, x_sym_b = _get_x_sym_table(mf)
|
|
647
|
+
if wfnsym is not None:
|
|
648
|
+
if isinstance(wfnsym, str):
|
|
649
|
+
wfnsym = symm.irrep_name2id(mol.groupname, wfnsym)
|
|
650
|
+
wfnsym = wfnsym % 10 # convert to D2h subgroup
|
|
651
|
+
e_ia_a[x_sym_a != wfnsym] = 1e99
|
|
652
|
+
e_ia_b[x_sym_b != wfnsym] = 1e99
|
|
653
|
+
nov_allowed = (numpy.count_nonzero(x_sym_a == wfnsym) +
|
|
654
|
+
numpy.count_nonzero(x_sym_b == wfnsym))
|
|
655
|
+
nstates = min(nstates, nov_allowed)
|
|
656
|
+
|
|
657
|
+
e_ia = numpy.append(e_ia_a.ravel(), e_ia_b.ravel())
|
|
658
|
+
# Find the nstates-th lowest energy gap
|
|
659
|
+
e_threshold = numpy.partition(e_ia, nstates-1)[nstates-1]
|
|
637
660
|
e_threshold += self.deg_eia_thresh
|
|
638
661
|
|
|
639
662
|
idx = numpy.where(e_ia <= e_threshold)[0]
|
|
640
663
|
x0 = numpy.zeros((idx.size, nov))
|
|
641
664
|
for i, j in enumerate(idx):
|
|
642
665
|
x0[i, j] = 1 # Koopmans' excitations
|
|
643
|
-
|
|
666
|
+
|
|
667
|
+
if return_symmetry:
|
|
668
|
+
if mf.mol.symmetry:
|
|
669
|
+
x_sym = numpy.append(x_sym_a.ravel(), x_sym_b.ravel())
|
|
670
|
+
x0sym = x_sym[idx]
|
|
671
|
+
else:
|
|
672
|
+
x0sym = None
|
|
673
|
+
return x0, x0sym
|
|
674
|
+
else:
|
|
675
|
+
return x0
|
|
644
676
|
|
|
645
677
|
def kernel(self, x0=None, nstates=None):
|
|
646
678
|
'''TDA diagonalization solver
|
|
@@ -653,6 +685,7 @@ class TDA(TDBase):
|
|
|
653
685
|
else:
|
|
654
686
|
self.nstates = nstates
|
|
655
687
|
log = logger.Logger(self.stdout, self.verbose)
|
|
688
|
+
mol = self.mol
|
|
656
689
|
|
|
657
690
|
vind, hdiag = self.gen_vind(self._scf)
|
|
658
691
|
precond = self.get_precond(hdiag)
|
|
@@ -661,16 +694,19 @@ class TDA(TDBase):
|
|
|
661
694
|
idx = numpy.where(w > self.positive_eig_threshold)[0]
|
|
662
695
|
return w[idx], v[:,idx], idx
|
|
663
696
|
|
|
697
|
+
x0sym = None
|
|
664
698
|
if x0 is None:
|
|
665
|
-
x0 = self.init_guess(
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
699
|
+
x0, x0sym = self.init_guess(
|
|
700
|
+
self._scf, self.nstates, return_symmetry=True)
|
|
701
|
+
elif mol.symmetry:
|
|
702
|
+
x_sym_a, x_sym_b = _get_x_sym_table(self._scf)
|
|
703
|
+
x_sym = numpy.append(x_sym_a.ravel(), x_sym_b.ravel())
|
|
704
|
+
x0sym = [rhf._guess_wfnsym_id(self, x_sym, x) for x in x0]
|
|
705
|
+
|
|
706
|
+
self.converged, self.e, x1 = lr_eigh(
|
|
707
|
+
vind, x0, precond, tol_residual=self.conv_tol, lindep=self.lindep,
|
|
708
|
+
nroots=nstates, x0sym=x0sym, pick=pickeig, max_cycle=self.max_cycle,
|
|
709
|
+
max_memory=self.max_memory, verbose=log)
|
|
674
710
|
|
|
675
711
|
nmo = self._scf.mo_occ[0].size
|
|
676
712
|
nocca = (self._scf.mo_occ[0]>0).sum()
|
|
@@ -698,12 +734,11 @@ CIS = TDA
|
|
|
698
734
|
def gen_tdhf_operation(mf, fock_ao=None, singlet=True, wfnsym=None):
|
|
699
735
|
'''Generate function to compute
|
|
700
736
|
|
|
701
|
-
[ A
|
|
702
|
-
[-B -A][Y]
|
|
737
|
+
[ A B ][X]
|
|
738
|
+
[-B* -A*][Y]
|
|
703
739
|
'''
|
|
704
740
|
mol = mf.mol
|
|
705
741
|
mo_coeff = mf.mo_coeff
|
|
706
|
-
assert (mo_coeff[0].dtype == numpy.double)
|
|
707
742
|
mo_energy = mf.mo_energy
|
|
708
743
|
mo_occ = mf.mo_occ
|
|
709
744
|
nao, nmo = mo_coeff[0].shape
|
|
@@ -723,13 +758,9 @@ def gen_tdhf_operation(mf, fock_ao=None, singlet=True, wfnsym=None):
|
|
|
723
758
|
if wfnsym is not None and mol.symmetry:
|
|
724
759
|
if isinstance(wfnsym, str):
|
|
725
760
|
wfnsym = symm.irrep_name2id(mol.groupname, wfnsym)
|
|
726
|
-
orbsyma, orbsymb = uhf_symm.get_orbsym(mol, mo_coeff)
|
|
727
761
|
wfnsym = wfnsym % 10 # convert to D2h subgroup
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
sym_forbida = (orbsyma_in_d2h[occidxa,None] ^ orbsyma_in_d2h[viridxa]) != wfnsym
|
|
731
|
-
sym_forbidb = (orbsymb_in_d2h[occidxb,None] ^ orbsymb_in_d2h[viridxb]) != wfnsym
|
|
732
|
-
sym_forbid = numpy.hstack((sym_forbida.ravel(), sym_forbidb.ravel()))
|
|
762
|
+
x_sym_a, x_sym_b = _get_x_sym_table(mf)
|
|
763
|
+
sym_forbid = numpy.append(x_sym_a.ravel(), x_sym_b.ravel()) != wfnsym
|
|
733
764
|
|
|
734
765
|
e_ia_a = mo_energy[0][viridxa] - mo_energy[0][occidxa,None]
|
|
735
766
|
e_ia_b = mo_energy[1][viridxb] - mo_energy[1][occidxb,None]
|
|
@@ -755,17 +786,14 @@ def gen_tdhf_operation(mf, fock_ao=None, singlet=True, wfnsym=None):
|
|
|
755
786
|
xb = xs[:,nocca*nvira:].reshape(nz,noccb,nvirb)
|
|
756
787
|
ya = ys[:,:nocca*nvira].reshape(nz,nocca,nvira)
|
|
757
788
|
yb = ys[:,nocca*nvira:].reshape(nz,noccb,nvirb)
|
|
758
|
-
# dms = AX + BY
|
|
759
789
|
dmsa = lib.einsum('xov,qv,po->xpq', xa, orbva.conj(), orboa)
|
|
760
790
|
dmsb = lib.einsum('xov,qv,po->xpq', xb, orbvb.conj(), orbob)
|
|
761
791
|
dmsa += lib.einsum('xov,pv,qo->xpq', ya, orbva, orboa.conj())
|
|
762
792
|
dmsb += lib.einsum('xov,pv,qo->xpq', yb, orbvb, orbob.conj())
|
|
763
|
-
|
|
764
793
|
v1ao = vresp(numpy.asarray((dmsa,dmsb)))
|
|
765
|
-
|
|
766
794
|
v1aov = lib.einsum('xpq,po,qv->xov', v1ao[0], orboa.conj(), orbva)
|
|
767
|
-
v1avo = lib.einsum('xpq,qo,pv->xov', v1ao[0], orboa, orbva.conj())
|
|
768
795
|
v1bov = lib.einsum('xpq,po,qv->xov', v1ao[1], orbob.conj(), orbvb)
|
|
796
|
+
v1avo = lib.einsum('xpq,qo,pv->xov', v1ao[0], orboa, orbva.conj())
|
|
769
797
|
v1bvo = lib.einsum('xpq,qo,pv->xov', v1ao[1], orbob, orbvb.conj())
|
|
770
798
|
|
|
771
799
|
v1ov = xs * e_ia # AX
|
|
@@ -783,7 +811,7 @@ def gen_tdhf_operation(mf, fock_ao=None, singlet=True, wfnsym=None):
|
|
|
783
811
|
return vind, hdiag
|
|
784
812
|
|
|
785
813
|
|
|
786
|
-
class TDHF(
|
|
814
|
+
class TDHF(TDBase):
|
|
787
815
|
|
|
788
816
|
singlet = None
|
|
789
817
|
|
|
@@ -793,10 +821,17 @@ class TDHF(TDA):
|
|
|
793
821
|
mf = self._scf
|
|
794
822
|
return gen_tdhf_operation(mf, singlet=self.singlet, wfnsym=self.wfnsym)
|
|
795
823
|
|
|
796
|
-
def init_guess(self, mf, nstates=None, wfnsym=None):
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
824
|
+
def init_guess(self, mf, nstates=None, wfnsym=None, return_symmetry=False):
|
|
825
|
+
if return_symmetry:
|
|
826
|
+
x0, x0sym = TDA.init_guess(self, mf, nstates, wfnsym, return_symmetry)
|
|
827
|
+
y0 = numpy.zeros_like(x0)
|
|
828
|
+
return numpy.hstack([x0, y0]), x0sym
|
|
829
|
+
else:
|
|
830
|
+
x0 = TDA.init_guess(self, mf, nstates, wfnsym, return_symmetry)
|
|
831
|
+
y0 = numpy.zeros_like(x0)
|
|
832
|
+
return numpy.hstack([x0, y0])
|
|
833
|
+
|
|
834
|
+
get_precond = rhf.TDHF.get_precond
|
|
800
835
|
|
|
801
836
|
def kernel(self, x0=None, nstates=None):
|
|
802
837
|
'''TDHF diagonalization with non-Hermitian eigenvalue solver
|
|
@@ -808,29 +843,41 @@ class TDHF(TDA):
|
|
|
808
843
|
nstates = self.nstates
|
|
809
844
|
else:
|
|
810
845
|
self.nstates = nstates
|
|
846
|
+
mol = self.mol
|
|
811
847
|
|
|
812
848
|
log = logger.Logger(self.stdout, self.verbose)
|
|
813
849
|
|
|
814
850
|
vind, hdiag = self.gen_vind(self._scf)
|
|
815
851
|
precond = self.get_precond(hdiag)
|
|
816
852
|
|
|
853
|
+
# handle single kpt PBC SCF
|
|
854
|
+
if getattr(self._scf, 'kpt', None) is not None:
|
|
855
|
+
from pyscf.pbc.lib.kpts_helper import gamma_point
|
|
856
|
+
real_system = (gamma_point(self._scf.kpt) and
|
|
857
|
+
self._scf.mo_coeff[0].dtype == numpy.double)
|
|
858
|
+
else:
|
|
859
|
+
real_system = True
|
|
860
|
+
|
|
817
861
|
# We only need positive eigenvalues
|
|
818
862
|
def pickeig(w, v, nroots, envs):
|
|
819
863
|
realidx = numpy.where((abs(w.imag) < REAL_EIG_THRESHOLD) &
|
|
820
864
|
(w.real > self.positive_eig_threshold))[0]
|
|
821
|
-
return lib.linalg_helper._eigs_cmplx2real(w, v, realidx,
|
|
822
|
-
real_eigenvectors=True)
|
|
865
|
+
return lib.linalg_helper._eigs_cmplx2real(w, v, realidx, real_system)
|
|
823
866
|
|
|
867
|
+
x0sym = None
|
|
824
868
|
if x0 is None:
|
|
825
|
-
x0 = self.init_guess(
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
869
|
+
x0, x0sym = self.init_guess(
|
|
870
|
+
self._scf, self.nstates, return_symmetry=True)
|
|
871
|
+
elif mol.symmetry:
|
|
872
|
+
x_sym_a, x_sym_b = _get_x_sym_table(self._scf)
|
|
873
|
+
x_sym = y_sym = numpy.append(x_sym_a.ravel(), x_sym_b.ravel())
|
|
874
|
+
x_sym = numpy.append(x_sym, y_sym)
|
|
875
|
+
x0sym = [rhf._guess_wfnsym_id(self, x_sym, x) for x in x0]
|
|
876
|
+
|
|
877
|
+
self.converged, w, x1 = lr_eig(
|
|
878
|
+
vind, x0, precond, tol_residual=self.conv_tol, lindep=self.lindep,
|
|
879
|
+
nroots=nstates, x0sym=x0sym, pick=pickeig, max_cycle=self.max_cycle,
|
|
880
|
+
max_memory=self.max_memory, verbose=log)
|
|
834
881
|
|
|
835
882
|
nmo = self._scf.mo_occ[0].size
|
|
836
883
|
nocca = (self._scf.mo_occ[0]>0).sum()
|
pyscf/tdscf/uks.py
CHANGED
|
@@ -21,9 +21,8 @@ import numpy
|
|
|
21
21
|
from pyscf import symm
|
|
22
22
|
from pyscf import lib
|
|
23
23
|
from pyscf.lib import logger
|
|
24
|
-
from pyscf.tdscf import uhf
|
|
25
|
-
from pyscf.
|
|
26
|
-
from pyscf.data import nist
|
|
24
|
+
from pyscf.tdscf import uhf, rhf
|
|
25
|
+
from pyscf.tdscf._lr_eig import eigh as lr_eigh
|
|
27
26
|
from pyscf.dft.rks import KohnShamDFT
|
|
28
27
|
from pyscf import __config__
|
|
29
28
|
|
|
@@ -74,13 +73,9 @@ class CasidaTDDFT(TDDFT, TDA):
|
|
|
74
73
|
if wfnsym is not None and mol.symmetry:
|
|
75
74
|
if isinstance(wfnsym, str):
|
|
76
75
|
wfnsym = symm.irrep_name2id(mol.groupname, wfnsym)
|
|
77
|
-
orbsyma, orbsymb = uhf_symm.get_orbsym(mol, mo_coeff)
|
|
78
76
|
wfnsym = wfnsym % 10 # convert to D2h subgroup
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
sym_forbida = (orbsyma_in_d2h[occidxa,None] ^ orbsyma_in_d2h[viridxa]) != wfnsym
|
|
82
|
-
sym_forbidb = (orbsymb_in_d2h[occidxb,None] ^ orbsymb_in_d2h[viridxb]) != wfnsym
|
|
83
|
-
sym_forbid = numpy.hstack((sym_forbida.ravel(), sym_forbidb.ravel()))
|
|
77
|
+
x_sym_a, x_sym_b = uhf._get_x_sym_table(mf)
|
|
78
|
+
sym_forbid = numpy.append(x_sym_a.ravel(), x_sym_b.ravel()) != wfnsym
|
|
84
79
|
|
|
85
80
|
e_ia_a = (mo_energy[0][viridxa,None] - mo_energy[0][occidxa]).T
|
|
86
81
|
e_ia_b = (mo_energy[1][viridxb,None] - mo_energy[1][occidxb]).T
|
|
@@ -123,6 +118,7 @@ class CasidaTDDFT(TDDFT, TDA):
|
|
|
123
118
|
'''TDDFT diagonalization solver
|
|
124
119
|
'''
|
|
125
120
|
cpu0 = (logger.process_clock(), logger.perf_counter())
|
|
121
|
+
mol = self.mol
|
|
126
122
|
mf = self._scf
|
|
127
123
|
if mf._numint.libxc.is_hybrid_xc(mf.xc):
|
|
128
124
|
raise RuntimeError('%s cannot be used with hybrid functional'
|
|
@@ -142,16 +138,19 @@ class CasidaTDDFT(TDDFT, TDA):
|
|
|
142
138
|
idx = numpy.where(w > self.positive_eig_threshold)[0]
|
|
143
139
|
return w[idx], v[:,idx], idx
|
|
144
140
|
|
|
141
|
+
x0sym = None
|
|
145
142
|
if x0 is None:
|
|
146
|
-
x0 = self.init_guess(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
143
|
+
x0, x0sym = self.init_guess(
|
|
144
|
+
self._scf, self.nstates, return_symmetry=True)
|
|
145
|
+
elif mol.symmetry:
|
|
146
|
+
x_sym_a, x_sym_b = uhf._get_x_sym_table(self._scf)
|
|
147
|
+
x_sym = numpy.append(x_sym_a.ravel(), x_sym_b.ravel())
|
|
148
|
+
x0sym = [rhf._guess_wfnsym_id(self, x_sym, x) for x in x0]
|
|
149
|
+
|
|
150
|
+
self.converged, w2, x1 = lr_eigh(
|
|
151
|
+
vind, x0, precond, tol_residual=self.conv_tol, lindep=self.lindep,
|
|
152
|
+
nroots=nstates, x0sym=x0sym, pick=pickeig, max_cycle=self.max_cycle,
|
|
153
|
+
max_memory=self.max_memory, verbose=log)
|
|
155
154
|
|
|
156
155
|
mo_energy = self._scf.mo_energy
|
|
157
156
|
mo_occ = self._scf.mo_occ
|
pyscf/tools/fcidump.py
CHANGED
|
@@ -372,6 +372,9 @@ def to_scf(filename, molpro_orbsym=MOLPRO_ORBSYM, mf=None, **kwargs):
|
|
|
372
372
|
mf.get_hcore = lambda *args: h1
|
|
373
373
|
mf.get_ovlp = lambda *args: numpy.eye(norb)
|
|
374
374
|
mf._eri = ctx['H2']
|
|
375
|
+
intor_symmetric = mf.mol.intor_symmetric
|
|
376
|
+
mf.mol.intor_symmetric = lambda intor, **kwargs: numpy.eye(norb) \
|
|
377
|
+
if intor == 'int1e_ovlp' else intor_symmetric(intor, **kwargs)
|
|
375
378
|
|
|
376
379
|
return mf
|
|
377
380
|
|
pyscf/x2c/sfx2c1e.py
CHANGED
|
@@ -117,7 +117,7 @@ class SFX2C1E_SCF(x2c._X2C_SCF):
|
|
|
117
117
|
log = logger.new_logger(mol, verbose)
|
|
118
118
|
|
|
119
119
|
if not (isinstance(dm, numpy.ndarray) and dm.ndim == 2):
|
|
120
|
-
# UHF
|
|
120
|
+
# UHF density matrices
|
|
121
121
|
dm = dm[0] + dm[1]
|
|
122
122
|
|
|
123
123
|
if isinstance(self, ghf.GHF):
|
pyscf/x2c/tdscf.py
CHANGED
|
@@ -290,9 +290,9 @@ class TDA(TDBase, ghf.TDA):
|
|
|
290
290
|
mf = self._scf
|
|
291
291
|
return gen_tda_hop(mf)
|
|
292
292
|
|
|
293
|
-
def init_guess(self, mf, nstates=None, wfnsym=None):
|
|
293
|
+
def init_guess(self, mf, nstates=None, wfnsym=None, return_symmetry=False):
|
|
294
294
|
assert self.wfnsym is None
|
|
295
|
-
return ghf.TDA.init_guess(self, mf, nstates, None)
|
|
295
|
+
return ghf.TDA.init_guess(self, mf, nstates, None, return_symmetry)
|
|
296
296
|
|
|
297
297
|
kernel = ghf.TDA.kernel
|
|
298
298
|
|
|
@@ -313,9 +313,9 @@ class TDHF(TDBase, ghf.TDHF):
|
|
|
313
313
|
mf = self._scf
|
|
314
314
|
return gen_tdhf_operation(mf)
|
|
315
315
|
|
|
316
|
-
def init_guess(self, mf, nstates=None, wfnsym=None):
|
|
316
|
+
def init_guess(self, mf, nstates=None, wfnsym=None, return_symmetry=False):
|
|
317
317
|
assert self.wfnsym is None
|
|
318
|
-
return ghf.TDHF.init_guess(self, mf, nstates, None)
|
|
318
|
+
return ghf.TDHF.init_guess(self, mf, nstates, None, return_symmetry)
|
|
319
319
|
|
|
320
320
|
kernel = ghf.TDHF.kernel
|
|
321
321
|
|
pyscf/x2c/x2c.py
CHANGED
|
@@ -577,7 +577,7 @@ class SCF(hf.SCF):
|
|
|
577
577
|
log = logger.new_logger(mol, verbose)
|
|
578
578
|
|
|
579
579
|
if not (isinstance(dm, numpy.ndarray) and dm.ndim == 2):
|
|
580
|
-
# UHF
|
|
580
|
+
# UHF density matrices
|
|
581
581
|
dm = dm[0] + dm[1]
|
|
582
582
|
|
|
583
583
|
with mol.with_common_orig((0,0,0)):
|
|
@@ -774,17 +774,22 @@ class X2C1E_GSCF(_X2C_SCF):
|
|
|
774
774
|
charges = mol.atom_charges()
|
|
775
775
|
coords = mol.atom_coords()
|
|
776
776
|
nucl_dip = numpy.einsum('i,ix->x', charges, coords)
|
|
777
|
-
with mol.with_common_orig(
|
|
778
|
-
r = mol.intor_symmetric('int1e_r')
|
|
779
|
-
ao_dip = numpy.array([_block_diag(x) for x in r])
|
|
777
|
+
with mol.with_common_orig((0,0,0)):
|
|
780
778
|
if picture_change:
|
|
781
779
|
xmol = self.with_x2c.get_xmol()[0]
|
|
782
780
|
nao = xmol.nao
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
781
|
+
r = xmol.intor_symmetric('int1e_r')
|
|
782
|
+
r = numpy.array([_block_diag(x) for x in r])
|
|
783
|
+
c1 = 0.5/lib.param.LIGHT_SPEED
|
|
784
|
+
prp = xmol.intor_symmetric('int1e_sprsp').reshape(3,4,nao,nao)
|
|
785
|
+
prp = numpy.array([_sigma_dot(x*c1**2) for x in prp])
|
|
786
|
+
ao_dip = self.with_x2c.picture_change((r, prp))
|
|
787
|
+
else:
|
|
788
|
+
r = mol.intor_symmetric('int1e_r')
|
|
789
|
+
ao_dip = numpy.array([_block_diag(x) for x in r])
|
|
786
790
|
|
|
787
|
-
|
|
791
|
+
el_dip = numpy.einsum('xij,ji->x', ao_dip, dm).real
|
|
792
|
+
mol_dip = nucl_dip - el_dip
|
|
788
793
|
|
|
789
794
|
if unit.upper() == 'DEBYE':
|
|
790
795
|
mol_dip *= nist.AU2DEBYE
|
|
@@ -810,8 +815,7 @@ class X2C1E_GSCF(_X2C_SCF):
|
|
|
810
815
|
|
|
811
816
|
def _uncontract_mol(mol, xuncontract=None, exp_drop=0.2):
|
|
812
817
|
'''mol._basis + uncontracted steep functions'''
|
|
813
|
-
pmol, contr_coeff = mol.decontract_basis(atoms=xuncontract)
|
|
814
|
-
contr_coeff = scipy.linalg.block_diag(*contr_coeff)
|
|
818
|
+
pmol, contr_coeff = mol.decontract_basis(atoms=xuncontract, aggregate=True)
|
|
815
819
|
return pmol, contr_coeff
|
|
816
820
|
|
|
817
821
|
|
|
@@ -953,7 +957,7 @@ def _x2c1e_get_hcore(t, v, w, s, c):
|
|
|
953
957
|
|
|
954
958
|
w, u = numpy.linalg.eigh(reduce(numpy.dot, (cl.T.conj(), s, cl)))
|
|
955
959
|
idx = w > 1e-14
|
|
956
|
-
# Adopt (2) here
|
|
960
|
+
# Adopt (2) here because X is not appeared in Eq (2).
|
|
957
961
|
# R[A] = u w^{1/2} u^+, so R[A]^{-1} A^+ S in Eq (2) is
|
|
958
962
|
r = reduce(numpy.dot, (u[:,idx]/numpy.sqrt(w[idx]), u[:,idx].T.conj(),
|
|
959
963
|
cl.T.conj(), s))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyscf
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: PySCF: Python-based Simulations of Chemistry Framework
|
|
5
5
|
Author-email: Qiming Sun <osirpt.sun@gmail.com>
|
|
6
6
|
Maintainer-email: Qiming Sun <osirpt.sun@gmail.com>
|
|
@@ -28,44 +28,44 @@ Classifier: Operating System :: MacOS
|
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
29
|
License-File: LICENSE
|
|
30
30
|
License-File: NOTICE
|
|
31
|
-
Requires-Dist: numpy
|
|
32
|
-
Requires-Dist: scipy
|
|
33
|
-
Requires-Dist: h5py
|
|
31
|
+
Requires-Dist: numpy!=1.16,!=1.17,>=1.13
|
|
32
|
+
Requires-Dist: scipy>=1.6.0
|
|
33
|
+
Requires-Dist: h5py>=2.7
|
|
34
34
|
Requires-Dist: setuptools
|
|
35
35
|
Provides-Extra: all
|
|
36
|
-
Requires-Dist: pyscf[bse,cppe,dispersion,doci,forge,geomopt,properties,pyqmc,semiempirical]
|
|
36
|
+
Requires-Dist: pyscf[bse,cppe,dispersion,doci,forge,geomopt,properties,pyqmc,semiempirical]; extra == "all"
|
|
37
37
|
Provides-Extra: bse
|
|
38
|
-
Requires-Dist: basis-set-exchange
|
|
38
|
+
Requires-Dist: basis-set-exchange; extra == "bse"
|
|
39
39
|
Provides-Extra: cornell_shci
|
|
40
|
-
Requires-Dist: pyscf-cornell-shci
|
|
40
|
+
Requires-Dist: pyscf-cornell-shci; extra == "cornell-shci"
|
|
41
41
|
Provides-Extra: cppe
|
|
42
|
-
Requires-Dist: cppe
|
|
42
|
+
Requires-Dist: cppe; extra == "cppe"
|
|
43
43
|
Provides-Extra: dispersion
|
|
44
|
-
Requires-Dist: pyscf-dispersion
|
|
44
|
+
Requires-Dist: pyscf-dispersion; extra == "dispersion"
|
|
45
45
|
Provides-Extra: doci
|
|
46
|
-
Requires-Dist: pyscf-doci
|
|
46
|
+
Requires-Dist: pyscf-doci; extra == "doci"
|
|
47
47
|
Provides-Extra: fciqmcscf
|
|
48
|
-
Requires-Dist: pyscf-fciqmc
|
|
48
|
+
Requires-Dist: pyscf-fciqmc; extra == "fciqmcscf"
|
|
49
49
|
Provides-Extra: forge
|
|
50
|
-
Requires-Dist: pyscf-forge
|
|
50
|
+
Requires-Dist: pyscf-forge; extra == "forge"
|
|
51
51
|
Provides-Extra: geomopt
|
|
52
|
-
Requires-Dist: pyberny
|
|
53
|
-
Requires-Dist: geometric
|
|
54
|
-
Requires-Dist: pyscf-qsdopt
|
|
52
|
+
Requires-Dist: pyberny>=0.6.2; extra == "geomopt"
|
|
53
|
+
Requires-Dist: geometric>=0.9.7.2; extra == "geomopt"
|
|
54
|
+
Requires-Dist: pyscf-qsdopt; extra == "geomopt"
|
|
55
55
|
Provides-Extra: icmpspt
|
|
56
|
-
Requires-Dist: pyscf-icmpspt
|
|
56
|
+
Requires-Dist: pyscf-icmpspt; extra == "icmpspt"
|
|
57
57
|
Provides-Extra: nao
|
|
58
|
-
Requires-Dist: pyscf-nao
|
|
58
|
+
Requires-Dist: pyscf-nao; extra == "nao"
|
|
59
59
|
Provides-Extra: properties
|
|
60
|
-
Requires-Dist: pyscf-properties
|
|
60
|
+
Requires-Dist: pyscf-properties; extra == "properties"
|
|
61
61
|
Provides-Extra: pyqmc
|
|
62
|
-
Requires-Dist: pyqmc
|
|
62
|
+
Requires-Dist: pyqmc; extra == "pyqmc"
|
|
63
63
|
Provides-Extra: semiempirical
|
|
64
|
-
Requires-Dist: pyscf-semiempirical
|
|
64
|
+
Requires-Dist: pyscf-semiempirical; extra == "semiempirical"
|
|
65
65
|
Provides-Extra: shciscf
|
|
66
|
-
Requires-Dist: pyscf-shciscf
|
|
66
|
+
Requires-Dist: pyscf-shciscf; extra == "shciscf"
|
|
67
67
|
Provides-Extra: tblis
|
|
68
|
-
Requires-Dist: pyscf-tblis
|
|
68
|
+
Requires-Dist: pyscf-tblis; extra == "tblis"
|
|
69
69
|
|
|
70
70
|
<div align="left">
|
|
71
71
|
<img src="https://github.com/pyscf/pyscf-doc/blob/master/logo/pyscf-logo.png" height="80px"/>
|
|
@@ -76,9 +76,9 @@ Python-based Simulations of Chemistry Framework
|
|
|
76
76
|
[](https://github.com/pyscf/pyscf/actions?query=workflow%3ACI)
|
|
77
77
|
[](https://codecov.io/gh/pyscf/pyscf)
|
|
78
78
|
|
|
79
|
-
2024-
|
|
79
|
+
2024-09-23
|
|
80
80
|
|
|
81
|
-
* [Stable release 2.
|
|
81
|
+
* [Stable release 2.7.0](https://github.com/pyscf/pyscf/releases/tag/v2.7.0)
|
|
82
82
|
* [Changelog](../master/CHANGELOG)
|
|
83
83
|
* [Documentation](http://www.pyscf.org)
|
|
84
84
|
* [Installation](#installation)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright 2014-
|
|
1
|
+
Copyright 2014-2024 The PySCF Developers.
|
|
2
2
|
PySCF (www.pyscf.org) was developed by:
|
|
3
3
|
|
|
4
4
|
Qiming Sun
|
|
@@ -110,6 +110,8 @@ Christopher Hillenbrand
|
|
|
110
110
|
scohenjanes5
|
|
111
111
|
Michal Krompiec
|
|
112
112
|
Victor Yu
|
|
113
|
+
James Serna (The Ohio State University)
|
|
114
|
+
Brian Zhao
|
|
113
115
|
|
|
114
116
|
|
|
115
117
|
---
|