Not quite. The VV10 computer pulls from a single density.
D_AO_ 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.