You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/plot-tools/README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,14 @@ python setup.py install
20
20
21
21
## Usage
22
22
There are two ways to use this tool:
23
-
1. Specify parameters in `band.py` or `dos.py` directly, and then `python band.py` or `python dos.py`. And you can also import module in your own script e.g. `from abacus_plot.band import BandPlot`
23
+
1. Specify parameters in `band.py` or `dos.py` directly, and then `python band.py` or `python dos.py`. And you can also import module in your own script e.g. `from abacus_plot.band import Band`
24
24
2. Command-line tools are also supported in this tool. In this way, you need prepare an input file and execute some commands as follows
25
25
26
26
### Band Structure
27
27
First, prepare a json file e.g. band-input.json:
28
28
```json
29
29
{
30
-
"filename" : "BANDS_1.dat",
30
+
"bandfile" : "BANDS_1.dat",
31
31
"efermi" : 10.39537843955395,
32
32
"energy_range" : [-1.5, 6],
33
33
"kptfile" : "KPT"
@@ -39,11 +39,14 @@ First, prepare a json file e.g. band-input.json:
39
39
|*efermi*|`float` or `List[float]`| Fermi level in eV |
40
40
|*energy_range*|`list`| Range of energy in eV |
41
41
|*shift*|`bool`| If set `'true'`, it will evaluate band gap. Default: `'false'`|
42
+
|*index*|`List[int]` or `Dict[int, List[int]]` or `Dict[int, Dict[int, List[int]]]]`| Extract PDOS of each atom e.g. [0, 1], {0:[0, 1], 1:[0]}, [0:{0:[0]}, 1:{1:[0, 1]}]|
43
+
|*atom_index*|`List[int]` or `Dict[int, List[int]]` or `Dict[int, Dict[int, List[int]]]]`| Extract PDOS of each atom with same atom_index e.g. [0, 1], {0:[0, 1], 1:[0]}, [0:{0:[0]}, 1:{1:[0, 1]}]|
44
+
|*species*|`List[str]` or `Dict[str, List[int]]` or `Dict[str, Dict[int, List[int]]]]`| Extract PDOS of each atom with same species e.g. ["C", "Si"], {"C":[0, 1], "Si":[0]}, ["C":{0:[0]}, "Si":{1:[0, 1]}]|
42
45
|*kptfile*|`str`| K-points file in ABACUS format |
43
46
|*label*|`str` or `List[str]`| Label of band structure |
44
47
|*color*|`str` or `List[str]`| Color of band structure |
45
48
46
-
If you want to plot band structure of `nspin=2` or compare two band structure on same k-path, you can set *filename*, *efermi*, *label*, *color* in `list` type.
49
+
If you want to plot band structure of `nspin=2` or compare two band structure on same k-path, you can set *bandfile*, *efermi*, *label*, *color* in `list` type.
47
50
48
51
The *kptfile* should be as follows, and notes after `#` will be set as k-points label automatically.
49
52
```shell
@@ -60,7 +63,7 @@ Line
60
63
```
61
64
Then, use the following command to plot band structure:
ax (Union[axes.Axes, Sequence[axes.Axes]]): object of matplotlib.axes.Axes or a list of this objects
691
-
index (Union[Sequence[int], Dict[int, List[int]], Dict[int, Dict[int, List[int]]]], optional): extract PDOS of each atom. Defaults to [].
692
-
atom_index (Union[Sequence[int], Dict[int, List[int]], Dict[int, Dict[int, List[int]]]], optional): extract PDOS of each atom with same atom_index. Defaults to [].
693
-
species (Union[Sequence[str], Dict[str, List[int]], Dict[str, Dict[int, List[int]]]], optional): extract PDOS of each atom with same species. Defaults to [].
691
+
index (Union[Sequence[int], Dict[int, List[int]], Dict[int, Dict[int, List[int]]]], optional): extract PBAND of each atom. Defaults to [].
692
+
atom_index (Union[Sequence[int], Dict[int, List[int]], Dict[int, Dict[int, List[int]]]], optional): extract PBAND of each atom with same atom_index. Defaults to [].
693
+
species (Union[Sequence[str], Dict[str, List[int]], Dict[str, Dict[int, List[int]]]], optional): extract PBAND of each atom with same species. Defaults to [].
694
694
efermi (float, optional): fermi level in unit eV. Defaults to 0.
695
695
energy_range (Sequence[float], optional): energy range in unit eV for plotting. Defaults to [].
696
696
shift (bool, optional): if shift energy by fermi level and set the VBM to zero, or not. Defaults to False.
697
+
outdir (PathLike): Default: './'
698
+
cmapname (str): Default: 'jet'
697
699
698
700
Returns:
699
701
BandPlot object: for manually plotting picture with bandplot.ax
0 commit comments