-
Notifications
You must be signed in to change notification settings - Fork 34
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
DMRG solver gives random order of multiple roots calculation #69
Comments
Be in STO-3G has 4 orbitals, which is a rather small test case, better to just use FCI then and no DMRG. Once DMRG gets stuck in a local minimum, it's hard to get out. Normally, the test case is big. In that case:
In your case Be in STO-3G is so small (4 orbitals), that it is very likely to get stuck in the wrong state and no noise is added as the virtual dimension for representing the FCI solution would be (not taking SU(2) into consideration) 16. Given the above explanation, please test with a little bit larger system, for example O (oxygen) and 6-31G:
The results are given here:
As you can observe, it is now PySCF which gives varying and wrong solutions in different runs, while CheMPS2 is consistent over the consecutive runs. @sunqm: Any idea? Best regards, P.S.: The magic number "20.0" in the script above should be about 10 times the difference between the largest energy and the smallest energy you target. Better to make the number too large than too small. In chemistry, it makes sense to set it at fabs(energy_ground_state). |
The fix_spin_ function adds a penalty energy to the states of wrong spin. This Another possible issue is the race condition bug of FCI code in the old versions |
Thank you @SebWouters for the comprehensive explanation and your thesis.
@sunqm I am running the oxygen example with my local version (1.5.4) to see if the fluctuation still occur with FCI. One follow up question is the race condition bug of FCI significantly affects ground state and for multiples root calculations using the CASSCF solver? |
@hungpham2017 The bug affects all states |
It is maybe off topic a bit since it is more about FCI solver in PySCF, but maybe @SebWouters is also interested. fix_spin_ using the level shift of 0.5 gave fuctuated results.
|
When setting
on my machine, my original example runs fine. So I cannot tell with certainty. I guess it has something to do with the Davidson residual tolerance being too strict. You can use
instead. Note that the Davidson residual tolerance increases from 1e-3 to 1e-6. In the first sweep, the MPS is far off, and it makes no sense to put convergence criteria too strict. You can play with these entries, in order:
|
@SebWouters |
I don't think there's a problem with your installation per se. The only thing I can think of is a different floating point specification (due to OS or compiler), or numerical instability. How do the CheMPS2 binary tests perform? Test2 should also be prone to "hanging" I guess. The calculation takes only a couple of minutes for all excited states, i.e. less than a minute per state, on my computer. Regarding comparison of computational efforts: I think starting around 14 orbitals, DMRG becomes more efficient than FCI. For a smaller number of orbitals, it is always best to use FCI. I'll try to get you timing output a.s.a.p. Best regards, |
@wpoely86 just let me know that there might be a "hanging" problem in CheMPS2 with OpenMP, as he encountered a similar thing. Can you provide information relating to your system (os, compiler, omp library, ...)? |
I installed CheMPS2 on my anaconda environment. I do apologize for long response. I just want to show you all the packages I have installed. In the mean time, I am trying to reinstalled the CheMPS2 manually. Here are the configuration:
my anaconda env:
|
@hungpham2017, I spot some really old packages and mixed channels in that conda environment. conda has undergone a substantial upgrade of their underlying toolchain. In particular, the gcc & the iomp5 can be updated, the mkl can be got from a more consistent channel, and it's always a bad idea to have both openblas and mkl installed in the same env. Psi4 has seen some weird behaviour with that. I recommend a new conda env |
Thank you very much @loriab and @SebWouters , actually it worked after I installed it in a new environment. |
Hello Seb,
I am trying to compare the PySCF/FCI and CheMPS2/DMRG solver for excited state calculations.
When I executed the script over and over, the FCI is stable while the DMRG solver gave random orders of excited state energies, and even sometimes give an excited state energy for the ground state (one root calculation).
What would be the possible reason? Maybe there were anything wrong in the way I used it.
Thank you,
Hung
Here is the script:
The text was updated successfully, but these errors were encountered: