Closed ppinski-hqs closed 1 year ago
Hi,
Thanks for reporting the problem and providing the script. I can reproduce the result you observed. I think the behavior is normal considering the following facts:
dmrgscf
. And it is reasonable that the default parameters is only good for some medium-sized systems, but not for tiny systems.In the block2 documentation, you can find a concrete set of recommended parameters for small systems:
# set very tight thresholds for small system
mc.fcisolver.scheduleSweeps = [0, 4, 8, 12, 16]
mc.fcisolver.scheduleMaxMs = [250, 500, 500, 500, 500]
mc.fcisolver.scheduleTols = [1e-08, 1e-10, 1e-12, 1e-12, 1e-12]
mc.fcisolver.scheduleNoises = [0.0001, 0.0001, 5e-05, 5e-05, 0.0]
mc.fcisolver.maxIter = 30
mc.fcisolver.twodot_to_onedot = 20
mc.fcisolver.block_extra_keyword = ['singlet_embedding', 'full_fci_space', 'fp_cps_cutoff 0', 'cutoff 0']
mc.fcisolver.conv_tol = 1e-14
mc.conv_tol = 1e-11
With this set of parameters, the discrepancy between FCI and DMRG is below 1E-14 for all three states. For larger system I do not know the best parameters and you have to do the test for your own case. But for medium-to-large systems it is less likely to get trapped in high energy local minima. You can also read the following paper to get a better understanding of the DMRG parameters:
Olivares-Amaya, R.; Hu, W.; Nakatani, N.; Sharma, S.; Yang, J.; Chan, G. K.-L. The ab-initio density matrix renormalization group in practice. The Journal of Chemical Physics 2015, 142, 034102. doi: 10.1063/1.4905329
Thank you for the quick reply and for the advice.
Indeed, we typically use the default parameters, with the exception of very few settings such as the bond dimension. The goal is to calculate entropies to help with active space selection, so the results only need to be "good enough" without requiring quantitative accuracy. Most of the time it works fine, except for those cases when the calculation gets trapped in solutions as described above. Possibly this thinking was too simplistic, and we may need to invest a bit more effort into suitable DMRG settings, after all.
Thank you also for providing block2 as a pip package - that has made installing and using it quite convenient.
When performing calculations with Block (as with other FCI solvers), there is some risk of getting trapped in too high electronic states. One rather notorious case I encountered was for the toy example of a carbon atom in STO-3G basis.
My questions upfront:
I'm looking forward to to any helpful advice.
The minimal example code accessing Block via its PySCF interface below demonstrates the problem:
I ran the calculations using PySCF 2.4.0 and block2 0.5.2 from pypi.org for python 3.11. dmrgscf was in its latest version (4ff57bf). The results:
(1) CASCI: triply degenerate energy, as expected.
(2) DMRG-CASCI with three roots: one of the energies corresponds to the excited state.
(3) DMRG-CASCI with ten roots (four to nine did not solve the problem): first three states are degenerate.