BoothGroup / Vayesta

A Python package for wave function-based quantum embedding
Apache License 2.0
33 stars 8 forks source link

Enforce incore ERIs when cluster has no excitations in one spin channel. #84

Closed cjcscott closed 1 year ago

cjcscott commented 1 year ago

This fixes the test failures in #69 , as discussed in #83. The underlying issues with pyscf and numpy are a bit gnarly, and in the interest of not holding up the original branch I've just removed the calculation of the CISD initial guess which is actually causing the errors and isn't what this actually wants to test. Catching all errors like this is going to be simplified if we have a more standardised approach to calculate our embedded integrals, such as in #66. An alternative tack could be forcing incore_anyway in these systems, which might be an OK halfway point.

cjcscott commented 1 year ago

I've now (hopefully) implemented a fix to detect this exception, and instead generate the ERIs with incore_anyway=True (debugging without being able to reproduce locally is a pain).

In the process of this I've discovered some possible unintentional behaviour in our FCI solver that thwarted my initial approach. It's not a major problem but I've implemented a quick fix which I'll put in a separate PR to avoid more confusion.

cjcscott commented 1 year ago

Getting this functionality to not throw an error in this case is proving more involved than expected, so for now I've updated the test to instead run using explicit ERIs in #88. As such I'm going to close this PR, but leave up an issue highlighting the unresolved issue.