Number of electrons from Molden


Clicked A Few Times
Hi,

I'm trying to evaluate the density on a grid by reading the MOs from the .molden file. As a sanity check, I'm checking if the the density integrates to the number of electrons or not by using the MOs and "ao overlap" matrix printed in output file. \int{\rho}=\sum_{ij}D_{ij}S_{ij}
where D is the density matrix obtained using the MO coefficients in the .molden file and S is the overlap matrix read from the nwchem output. However, the above expression does not evaluate to the number of electrons. I'm getting 3.71 electrons against 4.

Am I missing anything?

Thanks,
Bikash

Clicked A Few Times
I got some clue towards what might be the issue. The ordering of the d,f and g functions in molden is quite different from that of nwchem. I wrote a small parser and performed the required mapping to ensure that the nwchem and molden basis match. This gave quite an improvement in integral of the density. But I'm still getting 1e-3 error in the integral of density when compared to the number of electrons. Are the MO coefficients written onto the molden file inaccurate or not properly normalized?

Any input will be of immense help.

Thanks,
Bikash

Forum Vet
Bikash
Please report
1) version of NWChem used (6.8 contains bugs in the Molden interface, see https://github.com/nwchemgit/nwchem/issues/7, the upcoming maintenance release 6.8.1 will contain the bug fixes)
2) full input file used

Clicked A Few Times
Hi Edoapra,

I'm using version 6.8.

Below is the input file I used. What I observed is that the molden interface is having problems when dealing with basis that has d or higher orbitals.

start CH2
title "CH2 in pc-3 basis set"

geometry units au
symmetry c1
C 0 0 0
H 0 0 2.0955171492021
H 2.05055774410624 0 -0.43174652346195
end

basis
* library pc-3 file /opt/nwchem/data/libraries/
end

task dft energy

property
#vectors heat.movecs
moldenfile
molden_norm janpa
end

dft
xc slater 1.0 perdew81 1.0
iterations 100
convergence density 1.0e-4
grid xfine
mult 1
decomp
print "basis labels" "ao overlap" "convergence"
end

task dft property
print "total time" "ma stats"


Thanks,
Bikash

Forum Vet
Bikash
As mentioned in
https://github.com/nwchemgit/nwchem/issues/7
nwchem 6.8 contains bugs in the molden feature of task property (bugs fixed in the upcoming 6.8.1 release)
As mentioned in the URL above, a workaround for 6.8 is to use "molden" keyword in dft section and perform just a dft energy task.
This means for your input
dft
 xc slater  perdew81  
 ...
 molden
end

set molden:do_norm_janpa t

task dft energy

Clicked A Few Times
Thanks Edoapra. I'll try the workaround and let you know.

Clicked A Few Times
Hi Edoapra.,

I tried to use "molden" in the dft section and used the resulting molden. However, it didn't improve my answer. I suspect that this might be due the inaccurate overlap matrix. The overlap matrix that I'm getting from nwchem prints only upto 5 decimal digits. I'm using "print ao overlap" in my dft section. Is there a way to increase the accuracy of the overlap matrix that's printed?

If you feel that the overlap matrix is not the issue, then I'm back to getting the correct molden file.

Thanks,
Bikash

Forum Vet
Sorry for not having read your initial posting.
Since you are using NWCHems overlap matrix, you should stick to NWChem's normalization by using

set molden:do_norm_nwchem t

Clicked A Few Times
Hi Edoapra,

I used "set molden:do_norm_nwchem t". But I still don't get normalized molecular orbitals (MOs) when I use the NWChem overlap matrix and Molden output. I have permuted the Molden molecular orbital data to match NWChem's ordering of d,f and g functions.

For the any MO, I'm evaluating \int|\psi|^2=\sum_{j}S_{ij}d_id_j where dj is the expansion coeffcient for ψ corresponding to the jth basis function. Ther error I'm incurring is of the order 1e-3.

Thanks,
Bikash


Forum >> NWChem's corner >> General Topics