SCF_COSX_GUESS: COSX->DirectJK/LinK JK build #3158
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
COSX
has always been a bit... troublesome since its introduction to Psi4. The primary issue with it, is that it is VERY tricky finding grid settings that provide a satisfactory balance of performance and accuracy. To help alleviate this issue,COSX
uses a two-grid scheme, converging the SCF on a small initial grid, then performingCOSX_MAXITER_FINAL
number of SCF iterations (generally 1) on a larger final grid. With the two-grid scheme, the performance is controlled mainly by the initial grid, while accuracy is controlled primarily by the final grid.But this brings up an idea... instead of using a larger
COSX
grid, why not just use a 4-center K construction method for the final iteration(s) instead?This PR introduces the
SCF_COSX_GUESS
keyword to Psi4.SCF_COSX_GUESS
can be used in conjunction with either theDIRECT
orDFDIRJ+LINK
options forSCF_TYPE
. When enabled, the calculation will first converge the SCF on a smallCOSX
grid, followed by executing SCF using the specifiedSCF_TYPE
. Another way of framing it, is thatSCF_COSX_GUESS
is similar toDF_SCF_GUESS
, but usesCOSX
instead ofDFJK
for the initial SCF convergence process.To support
SCF_COSX_GUESS
, some keyword functionality has been expanded.COSX_RADIAL_POINTS_INITIAL
andCOSX_SPHERICAL_POINTS_INITIAL
can be used to control theCOSX
grid size for theSCF_COSX_GUESS
, with the grid in this context defaulting to (20/50).COSX_MAXITER_FINAL
can be used to control the number ofDIRECT
/DFDIRJ+LINK
iterations to run after theCOSX
guess, defaulting to 2 in this context. Note that the grid forSCF_COSX_GUESS
uses different defaults compared to the usual initial grid forDFDIRJ+COSX
runs.This PR also adds a fair bit of cleanup/QoL changes, as follows:
early_screening
variable inscf_iterator.py
, and all related quantities, have been renamed for clarity.DFDIRJ+LINK
can now be used in conjunction withDF_SCF_GUESS
.User API & Changelog headlines
SCF_COSX_GUESS
input keyword to Psi4, usable withSCF_TYPE=DIRECT
andSCF_TYPE=DFDIRJ+LINK
. When enabled, the calculation will first converge the SCF on a smallCOSX
grid, and then executeCOSX_MAXITER_FINAL
number of SCF iterations using the specifiedSCF_TYPE
. The grid used by the COSX guess can be controlled by theCOSX_RADIAL_POINTS_INITIAL
andCOSX_SPHERICAL_POINTS_INITIAL
keywords.DF_SCF_GUESS
keyword to work withSCF_TYPE=DFDIRJ+LINK
.Dev notes & details
SCF_COSX_GUESS
input keyword to Psi4, usable withSCF_TYPE=DIRECT
andSCF_TYPE=DFDIRJ+LINK
. When enabled, the calculation will first converge the SCF on a smallCOSX
grid, and then executeCOSX_MAXITER_FINAL
number of SCF iterations using the specifiedSCF_TYPE
.DF_SCF_GUESS
keyword to work withSCF_TYPE=DFDIRJ+LINK
.COSX_RADIAL_POINTS_INITIAL
,COSX_SPHERICAL_POINTS_INITIAL
, andCOSX_MAXITER_FINAL
keywords.COSX_RADIAL_POINTS_INITIAL
andCOSX_SPHERICAL_POINTS_INITIAL
control the size of the grid used for theSCF_COSX_GUESS
guess ( default: (20/50) ).COSX_MAXITER_FINAL
controls how manyDIRECT
/DFDIRJ+LINK
iterations to run after the convergedCOSX
SCF (default: 2).-[X] Cleans up
scf_iterator.py
, renamingearly_screening
and all associated variables, and adding comments for cases where multi-stage SCF convergence procedures are used.SCF_COSX_GUESS
andCOSX_MAXITER_FINAL
.Questions
SCF_COSX_GUESS
andDF_SCF_GUESS
do very similar things, but have a different naming structure, i.e., SCF is located at a different point in the variable name. I intentionally pickedSCF_COSX_GUESS
because putting SCF at the front makes it clear that the option applies for the whole SCF rather than just COSX itself, which is exacerbated by the existence of otherCOSX_xxx
variables that exist specifically for COSX. I actually wouldn't mind switching the name ofDF_SCF_GUESS
, too, to maintain consistency. But ifCOSX_SCF_GUESS
is preferred by everyone else, I'll switch to that.Checklist
Status