Skip to content

Commit d06643c

Browse files
committed
Move explanation in examples
1 parent c2931b6 commit d06643c

File tree

9 files changed

+108
-105
lines changed

9 files changed

+108
-105
lines changed

README.md

Lines changed: 1 addition & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -18,111 +18,7 @@ pip install git+https://github.com/yuzie007/[email protected]
1818

1919
## Usage and Tutorial
2020

21-
Here we consider the hypothetical case when Cu<sub>3</sub>Au with the L1<sub>2</sub> structure is regarded as a random configuration of the A1 (fcc) structure. You can find the input files in the `examples` directory.
22-
23-
1. Create `FORCE_SETS` file for the structure (maybe including disordered chemical configuration)
24-
you want to investigate using ``phonopy`` in a usual way.
25-
Be careful that the number of the structures with atomic displacements to get `FORCE_SETS` can be huge (>100)
26-
for a disordered configuration.
27-
28-
2. Create `FORCE_CONSTANTS` file from `FORCE_SETS` file using `phonopy` as
29-
```
30-
phonopy writefc.conf
31-
```
32-
where `writefc.conf` is a text file like
33-
```
34-
FORCE_CONSTANTS = WRITE
35-
DIM = 2 2 2
36-
```
37-
``DIM`` must be the same as that what you used to get `FORCE_SETS`.
38-
39-
3. Prepare two VASP-POSCAR-type files, `POSCAR` and `POSCAR_ideal`.
40-
POSCAR includes the original chemical configuration, which may be disordered.
41-
```
42-
Cu Au
43-
1.00000000000000
44-
3.7530000000000001 0.0000000000000000 0.0000000000000000
45-
0.0000000000000000 3.7530000000000001 0.0000000000000000
46-
0.0000000000000000 0.0000000000000000 3.7530000000000001
47-
Cu Au
48-
3 1
49-
Direct
50-
0.0000000000000000 0.5000000000000000 0.5000000000000000
51-
0.5000000000000000 0.0000000000000000 0.5000000000000000
52-
0.5000000000000000 0.5000000000000000 0.0000000000000000
53-
0.0000000000000000 0.0000000000000000 0.0000000000000000
54-
```
55-
Note that although `FORCE_CONSTANTS` may be obtained using relaxed atomic positions,
56-
here the positions must be the ideal ones.
57-
58-
`POSCAR_ideal` is the ideal configuration, from which the crystallographic symmetry is extracted.
59-
```
60-
X
61-
1.00000000000000
62-
3.7530000000000001 0.0000000000000000 0.0000000000000000
63-
0.0000000000000000 3.7530000000000001 0.0000000000000000
64-
0.0000000000000000 0.0000000000000000 3.7530000000000001
65-
X
66-
4
67-
Direct
68-
0.0000000000000000 0.5000000000000000 0.5000000000000000
69-
0.5000000000000000 0.0000000000000000 0.5000000000000000
70-
0.5000000000000000 0.5000000000000000 0.0000000000000000
71-
0.0000000000000000 0.0000000000000000 0.0000000000000000
72-
```
73-
In this file I recommend to use dummy symbols like 'X' to avoid confusion.
74-
75-
4. Prepare ``band.conf`` file including something like
76-
```
77-
DIM = 2 2 2
78-
PRIMITIVE_AXIS = 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0
79-
BAND = 0 0 0 0 1/2 1/2, 1 1/2 1/2 0 0 0 1/2 1/2 1/2
80-
BAND_POINTS = 101
81-
BAND_LABELS = \Gamma X \Gamma L
82-
FORCE_CONSTANTS = READ
83-
```
84-
The style is very similar to that of phonopy conf files, but be careful about the following tags.
85-
86-
- `DIM` describes the expansion from the original POSCAR to the POSCARs with atomic displacements used to get `FORCE_SETS`.
87-
Therefore, this should be the same as the phonopy option when creating the structures with atomic displacements (1).
88-
89-
- `PRIMITIVE_AXIS` is the conversion matrix from `POSCAR_ideal` to the primitive cell you expect.
90-
91-
**Since v0.6.2:** We can also use `BAND = AUTO` like
92-
```
93-
DIM = 2 2 2
94-
PRIMITIVE_AXIS = 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0
95-
BAND = AUTO
96-
BAND_POINTS = 101
97-
FORCE_CONSTANTS = READ
98-
```
99-
Internally, this uses [SeeK-path](https://seekpath.readthedocs.io/en/latest/) via phonopy.
100-
101-
4. Run
102-
```
103-
upho_weights band.conf
104-
```
105-
You hopefully get `band.hdf5` file. Note that this file can be in the order of GB.
106-
107-
5. Run
108-
```
109-
upho_sf --fpitch 0.01 -s 0.05 --function lorentzian --format text
110-
```
111-
You hopefully get `sf_E1.dat`, `sf_E2.dat`, and `sf_SR.dat` files.
112-
In these files:
113-
- `1st column`: distance in the reciprocal space
114-
- `2nd column`: frequencies
115-
- `3rd column`: values of spectral functions
116-
117-
Further
118-
119-
- `sf_E1.dat` has the element-pair-resolved spectral functions.
120-
- `sf_E2.dat` has the element-resolved spectral functions.
121-
- `sf_SR.dat` has the spectral functions decomposed by the small representations.
122-
123-
6. Plot the spectral functions. You can refer to `plot.py` in the example directory. Hopefully you get the figure like below:
124-
125-
![](examples/L12_Cu3Au/sf.orig.svg)
21+
See the `examples` directory.
12622

12723
## Options (`upho_weights`)
12824

examples/00.L12_Cu3Au/README.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Example for an ordered alloy
2+
3+
Here we consider the hypothetical case when Cu<sub>3</sub>Au with the L1<sub>2</sub> structure is regarded as a random configuration of the A1 (fcc) structure. You can find the input files in the `examples` directory.
4+
5+
1. Create `FORCE_SETS` file for the structure (maybe including disordered chemical configuration)
6+
you want to investigate using ``phonopy`` in a usual way.
7+
Be careful that the number of the structures with atomic displacements to get `FORCE_SETS` can be huge (>100)
8+
for a disordered configuration.
9+
10+
2. Create `FORCE_CONSTANTS` file from `FORCE_SETS` file using `phonopy` as
11+
```
12+
phonopy writefc.conf
13+
```
14+
where `writefc.conf` is a text file like
15+
```
16+
FORCE_CONSTANTS = WRITE
17+
DIM = 2 2 2
18+
```
19+
``DIM`` must be the same as that what you used to get `FORCE_SETS`.
20+
21+
3. Prepare two VASP-POSCAR-type files, `POSCAR` and `POSCAR_ideal`.
22+
POSCAR includes the original chemical configuration, which may be disordered.
23+
```
24+
Cu Au
25+
1.00000000000000
26+
3.7530000000000001 0.0000000000000000 0.0000000000000000
27+
0.0000000000000000 3.7530000000000001 0.0000000000000000
28+
0.0000000000000000 0.0000000000000000 3.7530000000000001
29+
Cu Au
30+
3 1
31+
Direct
32+
0.0000000000000000 0.5000000000000000 0.5000000000000000
33+
0.5000000000000000 0.0000000000000000 0.5000000000000000
34+
0.5000000000000000 0.5000000000000000 0.0000000000000000
35+
0.0000000000000000 0.0000000000000000 0.0000000000000000
36+
```
37+
Note that although `FORCE_CONSTANTS` may be obtained using relaxed atomic positions,
38+
here the positions must be the ideal ones.
39+
40+
`POSCAR_ideal` is the ideal configuration, from which the crystallographic symmetry is extracted.
41+
```
42+
X
43+
1.00000000000000
44+
3.7530000000000001 0.0000000000000000 0.0000000000000000
45+
0.0000000000000000 3.7530000000000001 0.0000000000000000
46+
0.0000000000000000 0.0000000000000000 3.7530000000000001
47+
X
48+
4
49+
Direct
50+
0.0000000000000000 0.5000000000000000 0.5000000000000000
51+
0.5000000000000000 0.0000000000000000 0.5000000000000000
52+
0.5000000000000000 0.5000000000000000 0.0000000000000000
53+
0.0000000000000000 0.0000000000000000 0.0000000000000000
54+
```
55+
In this file I recommend to use dummy symbols like 'X' to avoid confusion.
56+
57+
4. Prepare ``band.conf`` file including something like
58+
```
59+
DIM = 2 2 2
60+
PRIMITIVE_AXIS = 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0
61+
BAND = 0 0 0 0 1/2 1/2, 1 1/2 1/2 0 0 0 1/2 1/2 1/2
62+
BAND_POINTS = 101
63+
BAND_LABELS = \Gamma X \Gamma L
64+
FORCE_CONSTANTS = READ
65+
```
66+
The style is very similar to that of phonopy conf files, but be careful about the following tags.
67+
68+
- `DIM` describes the expansion from the original POSCAR to the POSCARs with atomic displacements used to get `FORCE_SETS`.
69+
Therefore, this should be the same as the phonopy option when creating the structures with atomic displacements (1).
70+
71+
- `PRIMITIVE_AXIS` is the conversion matrix from `POSCAR_ideal` to the primitive cell you expect.
72+
73+
**Since v0.6.2:** We can also use `BAND = AUTO` like
74+
```
75+
DIM = 2 2 2
76+
PRIMITIVE_AXIS = 0 1/2 1/2 1/2 0 1/2 1/2 1/2 0
77+
BAND = AUTO
78+
BAND_POINTS = 101
79+
FORCE_CONSTANTS = READ
80+
```
81+
Internally, this uses [SeeK-path](https://seekpath.readthedocs.io/en/latest/) via phonopy.
82+
83+
4. Run
84+
```
85+
upho_weights band.conf
86+
```
87+
You hopefully get `band.hdf5` file. Note that this file can be in the order of GB.
88+
89+
5. Run
90+
```
91+
upho_sf --fpitch 0.01 -s 0.05 --function lorentzian --format text
92+
```
93+
You hopefully get `sf_E1.dat`, `sf_E2.dat`, and `sf_SR.dat` files.
94+
In these files:
95+
- `1st column`: distance in the reciprocal space
96+
- `2nd column`: frequencies
97+
- `3rd column`: values of spectral functions
98+
99+
Further
100+
101+
- `sf_E1.dat` has the element-pair-resolved spectral functions.
102+
- `sf_E2.dat` has the element-resolved spectral functions.
103+
- `sf_SR.dat` has the spectral functions decomposed by the small representations.
104+
105+
6. Plot the spectral functions. You can refer to `plot.py` in the example directory. Hopefully you get the figure like below:
106+
107+
![](sf.orig.svg)

0 commit comments

Comments
 (0)