visualtool module
- visualtool.Dielectric(trans_df_cut, Enmin, Enmax, kpoint_number, Volume=200.0, sigma=0.1, GRID=10000, scissor=0.0, SOC='FALSE')[source]
This function modifies the trans_df according to user inputted range on bands, kpoints and energies. It calculates imaginary dielectric spectrum and energy in this range and in a grid determined by user input values.
- Parameters:
trans_df_cut – Dataframe with transmatrix values
Enmin – Minimum energy value of the calculated dielectric spectrum
Enmax – Maximum energy value of the calculated dielectric spectrum
kpoint_number – Number of k-points
Volume – Volume in reciprocal space
sigma – Width of smearing
GRID – Number of grid points in calculated dielectric spectrum
scissor – Scissor correction for the bandgap
SOC – Option for enabling spin-orbit coupling
- Return Energy:
List with energy values
- Return tot_curve_ave:
List with dielectric spectrum
- visualtool.Initialize(outcarfile, trans_df, Enmin, Enmax, cbandmin, cbandmax, vbandmin, vbandmax, klist)[source]
This function needs to be run once to initialize data, which modifies the input transmatrix dataframe to include coordinates and kpoints
- Parameters:
outcarfile – Path of outcar file
trans_df – Dataframe with transmatrix values
cbandmin – Minimum conduction band value to cut the transmatrix by
cbandmax – Maximum conduction band value to cut the transmatrix by
vbandmin – Minimum valence band value to cut the transmatrix by
vbandmax – Maximum valence band value to cut the transmatrix by
klist – A list of k-points to cut the transmatrix by
- Return trans_df_cut:
Modified dataframe with transmatrix values
- Return k_df:
Dataframe with positions of k-points
- Return VBM:
Band number of the valence band maximum
- Return kpoint_number:
Number of k-points
- Return band_number:
Number of bands
- visualtool.Interactiveplot(trans_df, tr_emin, tr_emax, tr_deltaE, deltaE, option, kpt_number, k_df)[source]
This function creates an interactive plot for transition energies selected.
- Parameters:
trans_df – Dataframe with transmatrix values
tr_emin – Minimum transition energy value to cut the transmatrix by
tr_emax – Maximum transition energy value to cut the transmatrix by
tr_deltaE – Energy step size (in units eV) of the interactive slider.
deltaE – Determines the range of transition energies(E-deltaE, E+deltaE) to be considered
option – When set to ‘yes’, sums all of the transition probabilities for a given k-point
cbandmin – Minimum conduction band value to cut the transmatrix by
cbandmax – Maximum conduction band value to cut the transmatrix by
vbandmin – Minimum valence band value to cut the transmatrix by
vbandmax – Maximum valence band value to cut the transmatrix by
kmin – Minimum k-point value to cut the transmatrix by
kmax – Maximum k-point value to cut the transmatrix by
kpt_number – Number of k-points
k_df – Dataframe with positions of k-points
- visualtool.Plot(trans_df_plot, max_prob)[source]
This function plots the modified dataframe from RunTransition.
- Parameters:
trans_df_plot – modified transmatrix dataframe for plotting
max_prob – Maximum oscillator strength
- Returns:
figure output for plotting
- visualtool.PlotDielectric(Energy, tot_curve_ave)[source]
This function plots the dielectric spectrum vs. energy
- Parameters:
Energy – List with energy values
tot_curve_ave – List with dielectric spectrum
- visualtool.RunTransition(trans_df, ev, deltaE, option, kpt_number, k_df)[source]
This function transforms the trans_df such that only transitions within an energy range of (E-deltaE, E+deltaE) are considered. Transition probabilities are calculated for each transition and added to trans_df.
- Parameters:
trans_df – Dataframe with transmatrix values
ev – Transition energy value to cut the transmatrix by
deltaE – Determines the range of transition energies(E-deltaE, E+deltaE) to be considered
option – When set to ‘yes’, sums all of the transition probabilities for a given k-point
kpt_number – Number of k-points
k_df – Dataframe with positions of k-points
- Return trans_df_plot:
Modified transmatrix dataframe for plotting
- Return max_prob:
Maximum oscillator strength for plotting