Error getting 1rdm after KCCSD calculation
See original GitHub issueHello,
Can you please help me resolve the following issue: I am trying to obtain a 1rdm after performing a KCCSD calculation for a single k point that is not the gamma point, as shown below (PySCF v1.7.6) :
import numpy
from pyscf.pbc import gto,scf,cc,mp
cell = gto.M(a = numpy.eye(3)*3.5668,
atom = '''Mg 0 0 0''',
basis = 'gth-dzv',
pseudo = 'gth-pade',
verbose = 4)
kpts = numpy.ones((1,3))*0.1
mf = scf.KRHF(cell,kpts).density_fit()
mf.kernel()
c = mp.KMP2(mf)
c.kernel()
c.make_rdm1()
c = cc.KCCSD(mf)
c.kernel()
c.make_rdm1()
The above code was able to produce the KMP2 based 1 body RDM, but fails when called for KCCSD with the following error:
Traceback (most recent call last):
File "pyscf_1rdm_error.py", line 20, in <module>
c.make_rdm1()
File ".../lib/python3.8/site-packages/pyscf/cc/ccsd.py", line 1139, in make_rdm1
if l1 is None: l1, l2 = self.solve_lambda(t1, t2)
File ".../lib/python3.8/site-packages/pyscf/cc/ccsd.py", line 1079, in solve_lambda
ccsd_lambda.kernel(self, eris, t1, t2, l1, l2,
File ".../lib/python3.8/site-packages/pyscf/cc/ccsd_lambda.py", line 51, in kernel
imds = fintermediates(mycc, t1, t2, eris)
File ".../lib/python3.8/site-packages/pyscf/cc/ccsd_lambda.py", line 81, in make_intermediates
nocc, nvir = t1.shape
ValueError: too many values to unpack (expected 2)
Is there a way to resolve this error and obtain a 1RDM for a KCCSD calculation at a single k point which is not the gamma point, please?
Thank you very much for the help!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello,
We currently don’t have lambda solvers for pbc.cc and make_rdm1 is only implemented for kuccsd as Xiao mentioned. Please note that we just found a bug in kuccsd_rdm (l1, l2 should be approximated by (t1.conj(), t2.conj()) rather than (t1, t2), this will be fixed after PR: https://github.com/pyscf/pyscf/pull/1043).
I just found out that @yangcal has implemented 1-RDM for KUCCSD, which should work for your case (if you are not restricted to RCCSD). Here is a sample input:
Note that I didn’t provide lambdas (l1, l2). They will be approximated later by (t1, t2) amplitudes, which I think is a fair treatment in many cases. @yangcal can probably share more insights.