-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
r""" | ||
Visualization of GWR results | ||
============================ | ||
This example shows how to visualize the results produced by the GWR code. | ||
""" | ||
from abipy import abilab | ||
import abipy.data as abidata | ||
|
||
#%% | ||
# Open the GWR.nc file | ||
# Here we use one of the GSR files shipped with abipy. | ||
# Replace filename with the path to your GSR file or your WFK file. | ||
|
||
from abipy.electrons.gwr import GwrFile | ||
gwr = GwrFile(abidata.ref_file("t01o_DS3_GWR.nc")) | ||
print(gwr) | ||
|
||
kpoint = 0 | ||
include_bands = "gap" | ||
|
||
#%% | ||
# Plot Sigma_nk(iw) along the imaginary axis for given k-point. | ||
gwr.plot_sigma_imag_axis(kpoint=kpoint, include_bands=include_bands) | ||
|
||
#%% | ||
# Plot Sigma_nk(iw) along the real axis for given k-point. | ||
gwr.plot_sigma_real_axis(kpoint=kpoint) | ||
|
||
#%% | ||
# Plot the spectral function A(w) along the real axis. | ||
gwr.plot_spectral_functions() | ||
|
||
#%% | ||
# Plot qp-data versus KS energy | ||
gwr.plot_qps_vs_e0() |
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