Multiwfn forum

Multiwfn official website: http://sobereva.com/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn

You are not logged in.

#1 2025-05-14 16:12:58

Ainosya
Member
Registered: 2024-12-06
Posts: 7

Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

Hello,

I am trying to obtain the electronic spatial extent using different software. To do so, I modified the settings.ini file in Multiwfn by setting iuserfunc = 3.

Multiwfn returns a value of 21092.4988259881, whereas my g16.log output gives 18436.6750. Is there a specific reason that could explain such a discrepancy?

I am unable to upload my files to the forum due to their large size, but could you please confirm whether my procedure for obtaining ⟨R²⟩ using Multiwfn is correct, or if I might be doing something wrong?

Thank you

Offline

#2 2025-05-14 22:56:54

sobereva
Tian Lu (Multiwfn developer)
From: Beijing
Registered: 2017-09-11
Posts: 1,995
Website

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

I think you ran Multiwfn in a wrong way. Taking H2O as an example:

%chk=C:\gtest\H2O.chk
#p hf/6-31G*

test

0 1
      O       -0.00000000   -0.00000000    0.11930800
      H        0.00000000    0.75895300   -0.47723200
      H       -0.00000000   -0.75895300   -0.47723200

The <r^2> outputted by Gaussian is
Electronic spatial extent (au):  <R**2>=             19.0512

If you set iuserfunc to 3, and boot up Multiwfn and load the .fch file produced by the above task, then run
100
4
100

You will obtain
Final result:       19.051245015
which is exactly the same as that outputted by Gaussian

Online

#3 2025-05-17 16:15:13

Ainosya
Member
Registered: 2024-12-06
Posts: 7

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

Okay, this is strange — I noticed that even though I set iuserfunc = 3, it still remains at 0.

So, I decided to use the development version instead of the binary one. However, I couldn't find where the value of iuserfunc is defined in the code. There is no settings.ini file when compiling the code directly.

Can you please tell me wehre the c80tmp (I guess) is defined so I can directly recompile the code. Thanks!

Offline

#4 2025-05-17 16:19:07

Ainosya
Member
Registered: 2024-12-06
Posts: 7

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

I just realized that there's no need to modify the settings.ini file (which I could not find in the source code btw).
Launching Multiwfn → 300 → 5 returns the electronic spatial extent.
For some reason, this feature isn't mentioned in the manual — or did I miss it?

I discovered this while digging through the source code

Last edited by Ainosya (2025-05-17 16:23:24)

Offline

#5 2025-05-17 16:53:27

sobereva
Tian Lu (Multiwfn developer)
From: Beijing
Registered: 2017-09-11
Posts: 1,995
Website

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

settings.ini is in the binary package of Multiwfn, not in source code. You never need to modify or check source code.

After setting iuserfunc to 3, you need to reboot Multiwfn, and you need to make sure that there is no warning shown on screen indicating that Multiwfn didn't find settings.ini.

Please make clear how Multiwfn finds settings.ini.

3.8 Development version also has binary package. I strongly suggest using latest development version, and never using the out-of-dated version 3.7.

Online

#6 2025-05-17 17:10:50

Ainosya
Member
Registered: 2024-12-06
Posts: 7

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

I guess my previous messages were unclear. I have version 3.8 and decided to switch to the source code package.

In doing so, I realized that neither the source code nor the settings.ini file needs to be modified, since this feature is already available in the code—although it's not mentioned in the manual for some reason.

However, since there is no settings.ini file in the source code package, I would like to know how to configure the user-defined functions in case I need to adjust them later

Last edited by Ainosya (2025-05-17 17:12:39)

Offline

#7 2025-05-17 17:20:02

sobereva
Tian Lu (Multiwfn developer)
From: Beijing
Registered: 2017-09-11
Posts: 1,995
Website

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

After compiling source code, directly copying settings.ini from binary package to source code folder (or where you want to put Multiwfn).

Online

#8 2025-05-17 17:20:31

Ainosya
Member
Registered: 2024-12-06
Posts: 7

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

By the way, there is discrepancy between the output given by isuerfunc

Screenshot-from-2025-05-17-13-17-53.png

And the one returns by doing Multiwfn → 300 → 5
Screenshot-from-2025-05-17-13-18-40.png

The difference is not significant, but ideally, there should be no difference at all.

Offline

#9 2025-05-17 17:21:55

Ainosya
Member
Registered: 2024-12-06
Posts: 7

Re: Discrepancy in Electronic Spatial Extent Between Multiwfn and Gaussian

sobereva wrote:

After compiling source code, directly copying settings.ini from binary package to source code folder (or where you want to put Multiwfn).

Oh, okay.
I wouldn’t have expected to need to do that, since it means I have to download both somehow.

Thanks!

Offline

Board footer

Powered by FluxBB