UKS cannot compute VV10 or GRAC corrections?

When trying to run calculations with wB97x-V with UHF reference I get the error message in the title (I am running UHF since it’s a triplet state). It seems like the issue is computing VV10 for UKS is a feature that hasn’t yet been put into psi4? Is it something that is being added?

Thank you

Ah, yes. I wasn’t quite sure if there was anything special to UKS VV10 at the time. Fortunately there isn’t and it will be a fairly minor change to add in.

For GRAC, im not entirely sure how to integrate the various components correctly. Is the switching function per spin density or the spin summed density? If it’s per density how do you integrate cross components, etc. The code is there and can be reactivated if someone know how to do it correctly (or likely just make a choice with a good reason of why it was picked).

Thanks for your reply! My brief inspection shows that in psi4-master/psi4/src/psi4/libfock/v.cc there are 3 if statements at lines 1480, 1743, and 2205 that seem to be preventing the calculation from moving forward. Since VV10 doesn’t require anything different, is fixing this as simple as commenting out these if statements?

Not quite. The VV10 computer pulls from a single density. D_AO_[0] which is the first element of the held internal density. For RHF this is only of length 1, but for UHF we have two densities. You will need to edit the vv10_nlc function to accept a density in addition to an out put array and update line v.cc:239 to accept this density instead in the RKSFunctions class which projects the AO density onto the grid.

You will then need to build a scaled input UHF density (Da + Db) * 0.5 and pass this into the vv10 function. The factor of 0.5 scaling comes from the fact that we are rightly using the RKSFunctions class which will scale the density back by 2 when projecting onto a grid. The resulting matrix from the vv10 function will then need to be applied to both Va and Vb. I believe the energy should be right after scaling the input density, but you will need to check both that and that no further scaling needs to happen when applying the vv10 derivate matrix to Va/Vb.

I might have a chance to take a crack at this soon, or I am happy to help you through the process.

I have some time coming up to tackle this. Please let me know if you would like to do it or not.

Oh yes, if you would be willing to add that in that would be very helpful!

Thanks,
Brian

Hello,

I looked on the psi4 github and it looks like you worked this… but there is a comment left “UKS needs more checks.” I was wondering what this means… is it not yet usable? Is there anything I could be of help with?

Thanks,
Brian

Yes, I made a PR that covered the majority of the code issues. However, it looks like UKS VV10 energies do not match up as well as one would hope to other codes. What I find interesting is that the VV10 correlation energy is nearly perfect, but the XC energy is quite different. I find it likely that this is caused by an issue in the energy derivative (Fock matrix) rather than the expression itself. I will be away at conferences for a few more weeks and will not have the time to look into this. Feel free to check it out and see what I did wrong :blush: