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
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,10 @@ python setup.py install
19
19
```
20
20
21
21
## Usage
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`
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
+
22
26
### Band Structure
23
27
First, prepare a json file e.g. band-input.json:
24
28
```json
@@ -39,7 +43,7 @@ First, prepare a json file e.g. band-input.json:
39
43
|*label*|`str` or `List[str]`| Label of band structure |
40
44
|*color*|`str` or `List[str]`| Color of band structure |
41
45
42
-
If you want to plot band structure of `nspin=2` or compare to band structure on same k-path, you can set *filename*, *efermi*, *label*, *color* in `list` type.
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.
43
47
44
48
The *kptfile* should be as follows, and notes after `#` will be set as k-points label automatically.
45
49
```shell
@@ -75,10 +79,10 @@ First, prepare a json file e.g. dos-input.json:
75
79
],
76
80
"species": {
77
81
"C": {
78
-
"0": [
82
+
0: [
79
83
0
80
84
],
81
-
"1": [
85
+
1: [
82
86
0,
83
87
1
84
88
]
@@ -88,7 +92,7 @@ First, prepare a json file e.g. dos-input.json:
88
92
1
89
93
]
90
94
},
91
-
"pdosfig": "pdos.png",
95
+
"pdosfig": "pdos.png"
92
96
}
93
97
```
94
98
If you only want to plot total DOS, you can modify `pdosfile` to `tdosfile` and do not set `species` and `pdosfig`.
@@ -99,7 +103,9 @@ If you only want to plot total DOS, you can modify `pdosfile` to `tdosfile` and
99
103
|*efermi*|`float`| Fermi level in eV |
100
104
|*energy_range*|`list`| Range of energy in eV |
101
105
|*shift*|`bool`| If set `'true'`, it will evaluate band gap. Default: `'false'`|
102
-
|*species*|`List[str]` or `Dict[str, List[int]]` or `Dict[str, Dict[str, List[int]]]]`| Three ways to plot partial DOS e.g. ["C", "Si"], {"C":[0, 1], "Si":[0]}, ["C":{"0":[0]}, "Si":{"1":[0, 1]}]|
106
+
|*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]}]|
107
+
|*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]}]|
108
+
|*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]}]|
0 commit comments