The influence of diffuse functions on electron density calculations I am not a quantum chemist, but I am (starting to be) a user of electronic structure software. In the picture (screenshot) is the electron density of the same molecule. On the left I calculated the density using B3LYP/6-311++G*, on the right I used B3LYP/6-311G*.



I have visualized the densities using Avogadro. In Avogadro, I can visualize a few of the HOMO/LUMO orbitals. The screenshot is of the first LUMO for both calculations.

In the images, red indicates electron rich areas, blue indicates electron poor areas. The molecule (caffeine) was in the presence of point charges which created an electric field, explicitly polarizing the electron density.

My Question: Why does the presence of diffuse function (the plus's in 6-31++G*), make the LUMO orbital opposite in electron density? I understand allowing diffusion would change the electron density, but it looks nearly exactly opposite now (however the total density looks pretty much the same - see last image).

Note that these are screenshots of just two orbitals, the overall density plots shown below, look very similar.



I am not a quantum chemist, so please use small words...
The colours you see in the first two pictures are not electron densities, but phases of the orbitals.
The colours of a single molecule could matter if you were calculating the interactions between different molecules (in which in-phase or out-of-phase interactions could matter) but they make no difference between the molecule(s) within the same calculation.
The electron density arises from the square power of a function which is, say, positive in the red lobe and negative in the blue one.
The square power means that there is no difference between blue and red, or + and - (See Born's law). They are just with inverse phase in respect to each other, but they have no other influence on the system otherwise.
You might find in some software packages a "switch phases" button, which inverts the colours.