This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#read structure from file | |
from pymatgen.core import Structure | |
struct = Structure.from_file("POSCAR") | |
#get symmetrized primitive and conventional cell | |
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer | |
sga = SpacegroupAnalyzer(struct,symprec=1e-5) | |
struct_symm_conv = sga.get_refined_structure() | |
struct_symm_prim = sga.find_primitive() |