from hecss.monitor import monitor_phonons, plot_bands_file
from matplotlib import pyplot as plt
Phonon convergence monitoring
Phonon monitoring is a more complicated issue and requires additional external tools. Here we include only few examples to guide you how it could be done using tools provided in
dxutils
and alamode
and to show the kind of physical results which could be obtained with the help of HECSS. For more examples see the SciPost Phys. 10, 129 (2021) paper and the works citing it (list avaliable on the SciPost page).
Note: The phonon monitoring functions are not complete and are at the alpha level. Thus, they may not work as described or at all.
= plt.subplots(1,2,figsize=(14,4))
fig, axs for sc, ax in zip(('1x1x1', '2x2x2'), axs):
plt.sca(ax)for T in 300, 600, 1200, 3000:
f'example/VASP_3C-SiC_calculated/{sc}/T_{T}K/phon/cryst.bands', lbl=f'T={T}K')
plot_bands_file(
plt.legend()f'Supercell: {sc}'); plt.title(
= 3000
T = '2x2x2'
supercell =f'example/VASP_3C-SiC_calculated/{supercell}/phon/',
monitor_phonons(directory=f'../T_3000K/DFSET.dat',
dfset='3C_SiC', charge='3C_SiC', sc=f'../sc/CONTCAR',
kpath=1, # Change to 2 if you want to monitor cubic potential
order=10, # Interaction range in Bohr. Do not increase too much.
cutoff=2, # Change to None to deactivate
born# Born effective charges calculation
=None, # Change to string with points (e.g. 'KX')
k_list# to plot selected points
=True, # Show the plot and exit
once )