shuaigroup / Renormalizer

Quantum dynamics package based on tensor network states
https://shuaigroup.github.io/Renormalizer/
Apache License 2.0
52 stars 16 forks source link

Symmetry in reading FCIDUMP #165

Closed jiangtong1000 closed 9 months ago

jiangtong1000 commented 9 months ago

Somehow, this did not appear during the past tests. The symmetry of interchanging (pq|rs) = (rs|pq) was not considered here. https://github.com/shuaigroup/Renormalizer/blob/2044db8c0c13034a8e1f6d584961a48b5620db3c/renormalizer/model/h_qc.py#L32-L35 When I am running a case, https://github.com/zhendongli2008/Active-space-model-for-Iron-Sulfur-Clusters/blob/main/Fe2S2_and_Fe4S4/Fe2S2/fe2s2 The lack of the aforementioned feature leads to the wrong result (>100 Ha error).

I think it should be revised as

pair1 = [[p,q],[q,p]]
pair2 = [[r,s],[s,r]]
for pairi, pairj in itertools.product(pair1, pair2):
    eri[pairi[0]-1,pairi[1]-1,pairj[0]-1,pairj[1]-1] = integral
    eri[pairj[0]-1,pairj[1]-1,pairi[0]-1,pairi[1]-1] = integral

what do you guys think? @jjren @liwt31

liwt31 commented 9 months ago

This part of the code is highly experimental. I suggest using PySCF to read FCIDUMP (https://pyscf.org/_modules/pyscf/tools/fcidump.html).

jjren commented 9 months ago

It depends on how the fcidump file is. In the h2o_fcidump.txt the [p,q],[r,s] pair are iterated independently. However, in the fcidump file of your link, [p,q] > [r,s]. This is the reason you got the wrong number.

jiangtong1000 commented 9 months ago

thanks!