Multiwfn forum

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

You are not logged in.

#12018-02-09 06:43:10

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

Electron Density Difference Plot with Multiwfn

Below is a question asked by a Multiwfn user via E-mail, considering other users may also encounter this problem, I copy the question and my reply in this post

I am computing electron density difference for intermolecular complex involving three species A---B---C so for this what procedure I follow? In the Multwfn manual you people mentioned the method for two species A---B. I followed this method i) A---B minus C and created A---B wfn file then I deleted B and created A C wfn file and then deleted A and created B---C wfn file but when I performed EDS in Multiwfn following this method wfn of A----B---C complex minus A---B wfn , minus A C wfn, minus B---C wfn but it give me wrong results. Please help me.

My reply

If you simply want to calculate rho(ABC)-rho(A)-rho(B)-rho(C), this can be easily done via Multiwfn. Below I use a tetramer of water as an example, we will draw isosurface map of electron density difference corresponding to rho(complex)-rho(1)-rho(2)-rho(3)-rho(4). All used files are attached

Boot up Multiwfn and input
complex.wfn
5
0 //Custom operation
4 //Four wavefunction files will be operated on complex.wfn
-, 1.wfn
-, 2.wfn
-, 3.wfn
-, 4.wfn
1 //electron density
3
-1 //Visualize isosurface directly

Change isovalue to 0.003, then you will see the attached map.

water_tetramer.rar

diff.png

Offline

#22018-02-09 17:03:57

nikolay
Member
Registered: 2018-02-09
Posts: 5

Re: Electron Density Difference Plot with Multiwfn

Dear Tian,

thank you for sharing this nice tip, I wanted to do almost the same.

I have another question related to density and density differences plots.
How to produce a plot of normalized density difference (and density too)?

The output.txt file produced via 5 - 1 - 3 - 3 contains non-normalized density.
I check this by simply summing all values in the file, which turns out to be very large and not equal to the total number of electrons.
In the output there is statement " Summing up all value and multiply differential element:" with sum close to total number of electrons.
Is there a way to get all the values multiplied by corresponding differential elements or all the differential elements printed to a file?

I guess in the case of density differences it is important to have normailzed densities, as those will not have large contribution close to nuclei.

Last edited by nikolay (2018-02-09 17:04:19)

Offline

#32018-02-09 20:13:05

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

Re: Electron Density Difference Plot with Multiwfn

Dear nikolay,

Simply summing up all values from output.txt or density.cub does not have physical meaning, the sum should be multiplied by differential element (i.e. dx*dy*dz, where dx/dy/dz are grid spacing in X/Y/Z direction), so that the result directly correpsonds to number of electrons. The dx,dy,dz are always printed on screen when calculating grid data, e.g.

Grid spacing in X,Y,Z is 0.220163 0.220163 0.220163 Bohr

So, you can manually multiply the data in the output.txt by 0.220163^3.

Tian

nikolay wrote:

Dear Tian,

thank you for sharing this nice tip, I wanted to do almost the same.

I have another question related to density and density differences plots.
How to produce a plot of normalized density difference (and density too)?

The output.txt file produced via 5 - 1 - 3 - 3 contains non-normalized density.
I check this by simply summing all values in the file, which turns out to be very large and not equal to the total number of electrons.
In the output there is statement " Summing up all value and multiply differential element:" with sum close to total number of electrons.
Is there a way to get all the values multiplied by corresponding differential elements or all the differential elements printed to a file?

I guess in the case of density differences it is important to have normailzed densities, as those will not have large contribution close to nuclei.

Offline

#42018-02-10 08:20:45

nikolay
Member
Registered: 2018-02-09
Posts: 5

Re: Electron Density Difference Plot with Multiwfn

Thank you for the explanation, it make sense in the case of simple cubic grid.
Is it the case for Multiwfn?
What is the reason not to have it multiplied by default?

Is there a similar trick for plane and line?

Offline

#52018-02-10 12:50:22

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

Re: Electron Density Difference Plot with Multiwfn

nikolay wrote:

Thank you for the explanation, it make sense in the case of simple cubic grid.
Is it the case for Multiwfn?
What is the reason not to have it multiplied by default?

Is there a similar trick for plane and line?

Multiwfn also supports rectangle grid, the program is never limited to cubic grid.

According to common convention, grid data stores electron density at each grid point (i.e. the unit is 1/Bohr^3), rather than number of electron contained in the space of each grid.

For plane map of electron density, the data at each point is also "density" of electron.

Offline

#62018-02-10 16:49:54

nikolay
Member
Registered: 2018-02-09
Posts: 5

Re: Electron Density Difference Plot with Multiwfn

Thanks again for explanations!
Indeed there is no much difference between density and electrons per grid point for uniform cubic and rectangular grids.

I was a bit confused, because for more "complicated" radial+angular grid the weight for each point is not just dx*dy*dz.
One gets large density contribution close to nuclei, which vanishes once it is multiplied by weights.

Offline

#72020-09-05 07:08:20

prasanta13
Member
Registered: 2018-12-30
Posts: 39

Re: Electron Density Difference Plot with Multiwfn

Dear Prof Tian,

I have encountered a problem in EDD. I have optimized a NCI complex using m062x/def2tzvpp in ORCA. The .wfn files are formed.
1. In the 4.5.5 section, you have mentioned to use NOSYMM keyword for gaussian, does the similar happens with ORCA?
2. One of my monomer is open-shell, so I used UM062X, other one is closed-shell and the complex is thus treated in UKS. The EDD using UKS shows abrupt results, should I treat the system as ROKS or UKS?

Thank you

Offline

#82020-09-05 12:57:47

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

Re: Electron Density Difference Plot with Multiwfn

Dear prasanta13,

1 Unlike Gaussian, ORCA doesn't automatically translate or reorientate the system, therefore you do not need to add any additional keyword

2 I don't know what the "abrupt results" refers to. In principle you can UKS to calculate open-shell system and then calculate EDD. ROKS is highly deprecated, because it is much slower than UKS, and sometimes SCF doesn't easily get converged. In addition, the ROKS density is not as realistic as UKS.

Offline

#92020-09-05 14:18:33

prasanta13
Member
Registered: 2018-12-30
Posts: 39

Re: Electron Density Difference Plot with Multiwfn

Thank you Tian, I will try and get back to you.

Offline

#102022-04-13 01:24:33

kastner
Member
From: MIT, Boston
Registered: 2022-04-13
Posts: 1
Website

Re: Electron Density Difference Plot with Multiwfn

Hi Tian,
This explanation has been very helpful! Is there a way to export the electron density gain and electron density loss as Gaussian cube files so that they can be visualized and rendered in VMD? When I export the results of my electron density difference calculation as a cube file and visualize it in VMD, I get a single surface rather than the two-colored surfaces in the tutorials. For reference, I am using a no-GUI version on a remote supercomputer. I attached my full workflow for how I generate the cube files. Any help or advice would be greatly appreciated!

Sincerely,
David

Last edited by kastner (2022-04-13 13:51:22)

Offline

#112022-04-13 05:29:00

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

Re: Electron Density Difference Plot with Multiwfn

Dear David,

In VMD you need to create two representations in "Graphics" - "Representation" panel to respectively display positive and negative parts. For example, if you hope to visualize isosurface of electron density difference of ±0.001 a.u., you should set isovalue of the first representation as 0.001, while the isovalue of the second representation should be set to -0.001.

In addition, I strongly suggest following section "4.A.14 Very easily rendering cube files as state-of-the-art isosurface map via VMD script" of Multiwfn manual, in this section I provide a VMD script, by which you can very easily plot very nice isosurface map (containing both positive and negative parts) based on a .cub file.

Best,

Tian

Offline

Board footer

Baidu
map