Vtotav.py: Difference between revisions
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
1 install ASE environment[https://wiki.fysik.dtu.dk/ase/install.html#installation-using-pip]: | 1 install ASE environment[https://wiki.fysik.dtu.dk/ase/install.html#installation-using-pip]: | ||
pip install --upgrade --user ase | pip install --upgrade --user ase | ||
| Line 22: | Line 23: | ||
sed -i '1d' LOCPOT_Z && sed -i 's/ */\t/g' LOCPOT_Z && sed -i 's/^[ \t]*//' LOCPOT_Z | sed -i '1d' LOCPOT_Z && sed -i 's/ */\t/g' LOCPOT_Z && sed -i 's/^[ \t]*//' LOCPOT_Z | ||
For convenience, just copy the commands and run it in terminal, | For convenience, just copy the commands above and run it in terminal, | ||
7 Copy the numbers from modified LOCPOT_Z to excel or Origin, and draw the figures | 7 Copy the numbers from modified LOCPOT_Z to excel or Origin, and draw the figures | ||
8 You can also use the script to plot workfunction [[Image:Workplot.tgz]], it looks like a little bit larger (Sooooory) : [[Image: Workfunction.png]] | 8 You can also use the script to plot workfunction [[Image:Workplot.tgz]], it looks like a little bit larger (Sooooory) : [[Image: Workfunction.png]] | ||
Revision as of 18:44, 8 July 2016
There is a script written by Python to convert LOCPOT for visualization.
The source of this script is from Github [1]
You can download it by clicking the link or from our Wiki:
1 install ASE environment[2]:
pip install --upgrade --user ase
2 Uncompress and copy it to your bin folder
3 chmod u+x ~/bin/vtotav.py
4 In terminal, go to the folder containing work function calculation and run it with command: vtotav.py LOCPOT z (z is the direction)
5 You will get output file named LOCPOT_Z
6 Because there are many spaces in the output file, I wrote a script (commands below) to convert those spaces into the excel format data (already in File:Vtotav.tgz):
sed -i '1d' LOCPOT_Z && sed -i 's/ */\t/g' LOCPOT_Z && sed -i 's/^[ \t]*//' LOCPOT_Z
For convenience, just copy the commands above and run it in terminal,
7 Copy the numbers from modified LOCPOT_Z to excel or Origin, and draw the figures
8 You can also use the script to plot workfunction File:Workplot.tgz, it looks like a little bit larger (Sooooory) :