This file contains hidden or 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
import re | |
import matplotlib.patches as mpatches | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.collections import PatchCollection | |
from pymatgen.core.periodic_table import Element | |
class PeriodicTablePlotter(object): |
This file contains hidden or 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
#!/bin/bash | |
# | |
# USAGE: script to extract energy from each folder. This script output energy-vs-volume | |
# and energy-vs-strain output files. The units are converted from eV to Ha | |
# and A3 to Bohr3. | |
# | |
echo -e "************************************************************************* \e[92m" | |
echo "*************************************************************************" | |
echo -e "*************************************************************************\e[0m" |
This file contains hidden or 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() |
OlderNewer