I made a small python script "wien2python.py" to visualize charge densities obtained by WIEN2k. It generates input data for VENUS and VESTA.
The WIEN2k includes the program "lapw5" which can generate charge
densities on two-dimensional planes. The script "wien2python.py"
executes "lapw5" automatically on different planes and collects output
data into an input file for
the VENUS program.
% chmod +x wien2venus.pyYou must put "wien2kvenus.py" in a directory included in PATH.
After you finish the SCF calculation by WIEN2k, you must execute following command in the directory with case.struct and case.clmsum.
% wien2venus.py 50 50 50
% python wien2venus.py 50 50 50Command line options "50 50 50" indicate the numbers of grid points along conventional primitive vectors. change these number appropriately.
For other options, please see output of "wien2venus.py -h"
ust mThe wien2venus.py generates "case.rho3d" which can be used as an input file for VESTA. (For VENUS, you must rename case.rho3d to case.rho)
It would be desirable to modify "lapw5" so that it can output three-dimensional charge densities. But it is beyond my ability. So, I make a python script "wien2venus.py". The script makes three-dimensional charge densities by executing "lapw5" sequentially.
The wien2venus.py generates input file "case.in5" and executes
lapw5 on different two-dimensional planes. The input files and charge
densities files are renamed to case.in5.0000, case.in5.0001,
case.in5.0002, ..., and case.rho.0000, case.rho.0001, case.rho.0002 ...
After the series of executions finish, the charge densities in
case.rho.* are collected into a file "case.rho" which can be used as a
input file of VENUS. The case.in5.* and case.rho.* is removed. If you
put "-p" option on command line, the intermediate files "case.rho.*"
will be preserved.