[salmon-user:00323] Plot of electron density 2D distribution

48 views
Skip to first unread message

Elena Kachan

unread,
Jan 24, 2025, 2:17:35 AMJan 24
to salmo...@salmon-tddft.jp

Dear Salmon users and developers,

On the main page of SALMON website, there is a nice 2D plot of electron density change, where it says "Electron dynamics in solids". 

top2

How is it possible to plot something like this? Right now I can only output 3D density with a keyword yn_out_dns_rt but the resolution does not seem very high.

Thank you,

Elena

--


Elena Kachan
Laboratoire Hubert Curien
Télécom Saint-Étienne
18 rue Pr Benoît Lauras
42000 Saint-Étienne
France


Yamada Shunsuke

unread,
Jan 29, 2025, 2:39:30 AMJan 29
to salmo...@salmon-tddft.jp

Dear Elena-san,

 

Thank you for the question. That 2D plot is generated from 3D density with yn_out_dns_rt but visualized by the Fourier interpolation for smoothing r-grid. The attached code is an example of the Fourier interpolation. It can generate 2D map data with fine r-grid from 3D density data with coarse r-grid. Pls modify and use the code for your purpose.

 

Example input for visualizing a cube file “dns.cube” on a parallelogram specified by the two vectors vec_a and vec_b:

 

-8.503770d0, -5.669180d0, 0.d0 ! origin(1:3): origin of the coordinate space (atomic unit)

108, 17.007541d0, 0.d0, 0.d0 ! Na, vec_a(1:3): # of grid points for interpolation, vector vec_a (atomic unit)

108, 0.d0, 11.338361d0, 0.d0 ! Nb, vec_b(1:3)

"dns"                ! drawing_target: "dns", "dnsdiff", or "dnslog"

0                      ! istep_interval

0                      ! NT

"dns.cube"       ! cube_file_name: input cube file

 

Sincerely,

Shunsuke

 

差出人: Elena Kachan <elena....@univ-st-etienne.fr>
日付: 金曜日, 2025124 0:34
宛先: salmo...@salmon-tddft.jp <salmo...@salmon-tddft.jp>
件名: [salmon-user:00323] Plot of electron density 2D distribution

dns_gnuplot.f90
Reply all
Reply to author
Forward
0 new messages