-
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.
Add preliminary version of plot examples and tests for vqp and orgmag
- Loading branch information
Showing
12 changed files
with
390 additions
and
216 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
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
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,29 @@ | ||
#!/usr/bin/env python | ||
r""" | ||
Orbital magnetism | ||
================= | ||
This example shows how to plot ... | ||
See ... | ||
""" | ||
from abipy.electrons.orbmag import OrbmagAnalyzer | ||
#import abipy.data as abidata | ||
|
||
#%% | ||
# We start by defining a list with the paths to the PHDOS.nc files | ||
# In this case, for simplicity, we use the same file but we must | ||
# use different labels when adding them to the plotter with the add_phdos method. | ||
|
||
import os | ||
root = "/Users/giantomassi/git_repos/ABIPY_WORKS/JOE_ORBMAG" | ||
filepaths = [os.path.join(root, s) for s in ["gso_DS12_ORBMAG.nc", "gso_DS22_ORBMAG.nc", "gso_DS32_ORBMAG.nc"]] | ||
|
||
orban = OrbmagAnalyzer(filepaths) | ||
print(orban) | ||
|
||
choices = ['S','T','B','TB'] | ||
orban.report_eigvals(report_type="S") | ||
|
||
#%% | ||
# Plot the phonon frequencies. Note that the labels for the q-points | ||
orban.plot_fatbands(os.path.join(root, "bandso_DS1_GSR.nc")) |
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,36 @@ | ||
#!/usr/bin/env python | ||
r""" | ||
e-ph matrix along a path in the BZ | ||
================================== | ||
This example shows how to use the VPQ.nc file produced by ABINIT | ||
to plot e-ph matrix elements along a path in the BZ. | ||
""" | ||
import os | ||
import abipy.data as abidata | ||
|
||
from abipy.eph.vpq import VpqFile | ||
|
||
filepath = "/Users/giantomassi/git_repos/abinit/_build/tests/POLARON/varpeq6/out_VPQ.nc" | ||
|
||
#%% | ||
# Here we use one of the GPATH files shipped with abipy | ||
# with the e-ph matrix g(k,q) with q along a path and k fixed. | ||
# Replace the call to abidata.ref_file("") with the path to your GPATH.nc | ||
|
||
varpeq = VpqFile(abidata.ref_file(filepath)) | ||
print(varpeq) | ||
|
||
#%% | ||
# To plot the e-ph matrix elements as a function of q. | ||
for polaron in varpeq.polaron_spin: | ||
df = polaron.get_final_results_df(with_params=True) | ||
polaron.plot_scf_cycle() | ||
#polaron.plot_ank_with_ebands(ebands_kpath, ebands_kmesh=None) | ||
#polaron.plot_bqnu_with_ddb("in_DDB", with_phdos=True) | ||
#polaron.plot_bqnu_with_phbands(phbands_qpath) | ||
|
||
|
||
#%% | ||
# For the meaning of the different arguments, see the docstring | ||
#print(varpeq.plot_g_qpath.__doc__) |
Oops, something went wrong.