-
Notifications
You must be signed in to change notification settings - Fork 0
/
pymatgen_notes.txt
59 lines (47 loc) · 2.01 KB
/
pymatgen_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Band structure calculations:
-Do encut convergence
-Do k point convergence
-do relax run
-do a new run with optimized structure, with uniform kpoint grid
-copy chrgcar file to the band structure run directory
-use pymatgen to generate high kpoint path (and copy that KPOINT file to the band run directory)
IF YOU GET AN ERROR: UserWarning: The input structure does not match the expected standard primitive! The path can be incorrect. Use at your own risk.
---> follow the below steps to get the standard primitive cell
https://github.com/materialsproject/pymatgen/issues/1448
Export the strucutre in POSCAR format, will give true.
1.
`
from pymatgen import Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
import numpy as np
structure = Structure.from_file('Si_mp-149_computed.cif')
spg_analy =SpacegroupAnalyzer(structure)
primitive_standard_structure=spg_analy.get_primitive_standard_structure(international_monoclinic=False)
primitive_standard_structure.to(fmt="poscar", filename="primitive_standard_structure_POSCAR")
`
2.
`
from pymatgen import Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
import numpy as np
structure = Structure.from_file('primitive_standard_structure_POSCAR')
spg_analy =SpacegroupAnalyzer(structure)
primitive_standard_structure=spg_analy.get_primitive_standard_structure(international_monoclinic=False)
print(np.allclose(structure.lattice.matrix,primitive_standard_structure.lattice.matrix))
print(structure.lattice.matrix)
print(primitive_standard_structure.lattice.matrix)
`
output:
True
[[0. 2.734364 2.734364]
[2.734364 0. 2.734364]
[2.734364 2.734364 0. ]]
[[4.39719268e-16 2.73436400e+00 2.73436400e+00]
[2.73436400e+00 0.00000000e+00 2.73436400e+00]
[2.73436400e+00 2.73436400e+00 3.34863012e-16]]
Thank you very much!
-(The pymatgen code needs to run in the directory-- needs access to the poscar and potcar files)
-need to change parameters in incar file:
ICHARG = 11
ISMEAR = 0
-After run, copy entire band run directory and run the pymatgen plot code