Dplot question

From NWChem

Viewed 291 times, With a total of 3 Posts
Jump to: navigation, search

Just Got Here
Threads 1
Posts 2
I would like to plot the difference between the optimized electron density and the densities of the (non-interacting) atoms. Is there a simple means to get dplot to accomplish this?

  • Niri Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Forum Regular
Threads 4
Posts 190
Hi, If you have the one particle reduced density matrices you can do the following in the dplot block.
This will automatically calculate the difference and you can represent this as a cube.


dplot
densmat <file1> [<file2>]
...
end

Best,
-Niri

Just Got Here
Threads 1
Posts 2
Quote:Niri Jan 20th 1:58 pm
Hi, If you have the one particle reduced density matrices you can do the following in the dplot block.
This will automatically calculate the difference and you can represent this as a cube.


dplot
densmat <file1> [<file2>]
...
end

Best,
-Niri



Forgive my being obtuse, but how can I produce <file2>? I found ao_1prdm_write in the properties directory but
it only seems to be invoked by the TDDFT module.

  • Niri Forum:Admin, Forum:Mod, NWChemDeveloper, bureaucrat, sysop
    Profile
    Send PM
Forum Regular
Threads 4
Posts 190
Apologies for the quick response. That functionality is not fully documented at the moment. We will add this in the next release. If you are using NWChem 6.6 you can add a few lines of code to generate the initial and final DMs.

In nwdft/scf_dft/dft_scf.F add the following lines as follows

character*255 dmat_file   ! declaration

after line 797 add the following for the initial up and down densities. Two files will be created for a spin-polarized calculation

       call util_file_name('dmat_ini1',.false.,.false.,dmat_file) ! get filename
call ao_1prdm_write(nbf_ao,g_dens(1), dmat_file)
if (ipol.eq.2) then
call util_file_name('dmat_ini2',.false.,.false.,dmat_file) ! get filename
call ao_1prdm_write(nbf_ao,g_dens(2),dmat_file)
end if

after 2000 continue add the following for the final DMs

call ga_dadd(1.d0,g_dens(1),-1.d0,g_dens(2),g_dens(1))  ! separates the components
call util_file_name('dmat_fin1',.false.,.false.,dmat_file) ! get filename
call ao_1prdm_write(nbf_ao,g_dens(1), dmat_file)
if (ipol.eq.2) then
                  call util_file_name('dmat_fin2',.false.,.false.,dmat_file) ! get filename
call ao_1prdm_write(nbf_ao,g_dens(2),dmat_file)
end if

Send me a note if you need any additional help.

Best,
-Niri

niri.govind@pnnl.gov


Forum >> NWChem's corner >> NWChem functionality



Who's here now Members 0 Guests 1 Bots/Crawler 0


AWC's: 2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC