-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LASSISrq can't get q CI vectors in some cases due to "QR decomposition removed..." #86
Comments
Please provide the full input and output as well as the traceback. |
Inputimport numpy as np basis={'C': 'def2SVP','H': 'def2SVP','O': 'def2SVP','N': 'def2SVP','Cr': 'def2TZVP'} mol = gto.Mole() mf=scf.ROHF(mol).density_fit() assert (mf.converged) ncas_avas, nelecas_avas, mo_coeff = avas.kernel(mf, ['Cr 3s', 'Cr 3p', 'Cr 3d', 'Cr 4d'], minao=mol.basis) las = asyn.LASSCF(mf, (11, 11),((9,6),(6, 9)),spin_sub=(4,4)) molden.from_mo(mol, 'guess.molden', guess_mo_coeff) las = lassi.states.spin_shuffle(las) from mrh.my_pyscf.tools import molden from mrh.my_pyscf.mcscf.lasscf_o0 import LASSCF lsi = lassi.LASSIrq(las1, r=3, q=5) from mrh.my_pyscf import mcpdft ### Output #INFO: **** input file is /project/lgagliardi/jangidbhavnesh/LASSIS_NIL/Kramersdoublet/KramerDimerGeometry/30_22/Trash/LASSIrqT/kradoub.py **** basis={'C': 'def2SVP','H': 'def2SVP','O': 'def2SVP','N': 'def2SVP','Cr': 'def2TZVP'} mol = gto.Mole() mf=scf.ROHF(mol).density_fit() assert (mf.converged) ncas_avas, nelecas_avas, mo_coeff = avas.kernel(mf, ['Cr 3s', 'Cr 3p', 'Cr 3d', 'Cr 4d'], minao=mol.basis) las = asyn.LASSCF(mf, (11, 11),((9,6),(6, 9)),spin_sub=(4,4)) molden.from_mo(mol, 'guess.molden', guess_mo_coeff) las = lassi.states.spin_shuffle(las) from mrh.my_pyscf.tools import molden from mrh.my_pyscf.mcscf.lasscf_o0 import LASSCF lsi = lassi.LASSIrq(las1, r=3, q=5) from mrh.my_pyscf import mcpdft #INFO: ******************** input file end ******************** System: uname_result(system='Linux', node='midway3-0512.rcc.local', release='4.18.0-305.3.1.el8.x86_64', version='#1 SMP Tue Jun 1 16:14:33 UTC 2021', machine='x86_64') Threads 32 [ENV] PYSCF_EXT_PATH /home/jangidbhavnesh/bin/pyscf:/home/jangidbhavnesh/bin/pyscf-forge:/home/jangidbhavnesh/bin:/home/jangidbhavnesh/bin/pyscf:/home/jangidbhavnesh/bin/pyscf-forge:/home/jangidbhavnesh/bin: nuclear repulsion = 5005.83704137001 ******** <class 'pyscf.df.df_jk.DFROHF'> ******** ******** AVAS flags ******** ** AVAS ** of alpha electrons 18of beta electrons 12Entering product-state fixed-point CI iteration WARN: QR decomposition removed 1 vectors. WARN: QR decomposition removed 1 vectors. Cycle 1: max grad = 2.588362e-03 ; sigma = 1.278745e-01 ; 1/2 fragment CI solvers converged WARN: QR decomposition removed 1 vectors. WARN: QR decomposition removed 1 vectors. Cycle 1: max grad = 3.995156e-02 ; sigma = 1.416874e-01 ; 1/2 fragment CI solvers converged WARN: State 5 LASCI not converged! Entering product-state fixed-point CI iteration WARN: QR decomposition removed 1 vectors. Cycle 1: max grad = 4.588748e-03 ; sigma = 3.647501e-02 ; 1/2 fragment CI solvers converged WARN: State 6 LASCI not converged! Entering product-state fixed-point CI iteration WARN: QR decomposition removed 1 vectors. Cycle 1: max grad = 1.462817e-03 ; sigma = 2.014364e-02 ; 2/2 fragment CI solvers converged WARN: State 7 LASCI not converged! Entering product-state fixed-point CI iteration WARN: QR decomposition removed 1 vectors. WARN: QR decomposition removed 1 vectors. frag= 1 nroots= 5 no= 11 ne= (5, 9) c.shape= (4, 462, 55) ###Error### |
This is due to bad linear dependencies in the iterative FCI diagonalizer. If you increase the |
Thanks for replying. I have tried with pspace_size = 800, but I am still getting the same error. |
Do you still have all the same
warnings with |
In mcscf.productstate kernel function, guarantee on every cycle of the fixed-point iteration that the correct number of CI vectors are present by calling get_init_guess before attempting to build 1-RDMs
Try branch issue_86_errhandle. If it resolves this particular crash then I'll merge with dev. |
Yes, they didn't converge. Actually, all of them didn't converged. |
I will try this. |
If, once the crash is resolved, all of the following statements are true:
then you should start a new issue about the failure to converge, because in LASSIrq that's pathological: only the ground state of each fragment in each rootspace should affect other fragments. |
It is failing with new branch as well. /home/jangidbhavnesh/bin/pyscf/pyscf/dft/libxc.py:772: UserWarning: Since PySCF-2.3, B3LYP (and B3P86) are changed to the VWN-RPA variant, corresponding to the original definition by Stephens et al. (issue 1480) and the same as the B3LYP functional in Gaussian. To restore the VWN5 definition, you can put the setting "B3LYP_WITH_VWN5 = True" in pyscf_conf.py |
In mcscf.productstate kernel function, guarantee correct number of CI vectors if calculation ends without convergence by calling get_init_guess.
The above problem is being solved now. But after state preparation, it has shown this error. Idk when that should be normal, since all the states were not converged.
File "/project/lgagliardi/jangidbhavnesh/LASSIS_NIL/Kramersdoublet/KramerDimerGeometry/30_22/Trash/LASSIrqT/mrh/my_pyscf/lassi/lassirq.py", line 97, in kernel |
The above error was with r=3, and q=5. Then I tried r=1, and q=5 I got the same error. It seems the latest branch has cause some isssues |
QR decomposition doesn't work if the basis has linear dependencies!
Nevermind, I guess QR decomp just doesn't work at all!
OK try now |
Its solved now. There are convergence issues for which I will raise another issue. |
File "/project/lgagliardi/jangidbhavnesh/LASSIS_NIL/Kramersdoublet/KramerDimerGeometry/30_22/Trash/LASSIrqT/kradoub.py", line 55, in
lsi.kernel()
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/lassi/lassirq.py", line 40, in kernel
self.converged, las = self.prepare_states ()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/lassi/lassirq.py", line 25, in prepare_states
las.lasci_(lroots=lroots)
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/lasci.py", line 1815, in lasci_
return self.lasci (mo_coeff=mo_coeff, ci0=ci0, lroots=lroots, lweights=lweights,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/lasci.py", line 1797, in lasci
converged, e_tot, e_states, e_cas, e_lexc, ci = run_lasci (
^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/lasci.py", line 846, in run_lasci
conv, e_i, ci_i = solver.kernel (h1eff, eri_cas, ncas_sub, nelecas_sub,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/productstate.py", line 37, in kernel
h1eff, h0eff, ci0 = self.project_hfrag (h1, h2, ci0, norb_f, nelec_f,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/productstate.py", line 209, in project_hfrag
if dm1s is None: dm1s = np.stack (self.make_rdm1s (ci, norb_f, nelec_f), axis=0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/productstate.py", line 263, in make_rdm1s
raise (e)
File "/home/jangidbhavnesh/bin/mrh/my_pyscf/mcscf/productstate.py", line 255, in make_rdm1s
a, b = s.make_rdm1s (c, no, nelec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jangidbhavnesh/bin/pyscf/pyscf/mcscf/addons.py", line 979, in make_rdm1s
dm1s = numpy.einsum ('r,srpq->spq', self.weights, dm1s)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/software/python-anaconda-2023.09-el8-x86_64/lib/python3.11/site-packages/numpy/core/einsumfunc.py", line 1371, in einsum
return c_einsum(*operands, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (5,)->(5) (2,4,11,11)->(2,11,11,4)
The text was updated successfully, but these errors were encountered: