Skip to content

Instantly share code, notes, and snippets.

@jwz-ecust
Last active November 5, 2019 07:17
Show Gist options
  • Save jwz-ecust/63f37d28d22573d7fe2e95f12ba527a2 to your computer and use it in GitHub Desktop.
Save jwz-ecust/63f37d28d22573d7fe2e95f12ba527a2 to your computer and use it in GitHub Desktop.
WorkFunctionPlot
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from pymatgen.analysis.surface_analysis import WorkFunctionAnalyzer
plt.figure(figsize=(20, 15))
kwargs = {
"poscar_filename": './CONTCAR',
"locpot_filename": './LOCPOT',
"outcar_filename": './OUTCAR',
}
wf_analyzer_shift = WorkFunctionAnalyzer.from_files(
shift=-0.25,
blength=3.7,
**kwargs)
wf_analyzer_shift.get_locpot_along_slab_plot(plt=plt, label_fontsize=30)
plt.savefig('tmp.png', dpi=400)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment