from __future__ import print_function, division, unicode_literals
#import seaborn
%matplotlib inline
import warnings
warnings.filterwarnings("ignore")
from IPython.display import HTML
HTML('''
<style>
body {
background-image: url('http://www.pseudo-dojo.org/img/pw_maze_white.png');
}
</style>
<script>
code_show=true;
function code_toggle() {
if (code_show) {
$('div.input').hide();
} else {
$('div.input').show();
}
code_show = !code_show;
}
//$(document).ready(code_toggle);
document.addEventListener("DOMContentLoaded", function(event) {
code_toggle();
});
</script>
The raw code for this IPython notebook is by default hidden for easier reading.
To toggle on/off the raw code, click <a href="javascript:code_toggle()">here</a>.''')
from pseudo_dojo.core.pseudos import dojopseudo_from_file
pseudo = dojopseudo_from_file('/Users/gmatteo/git_repos/pseudodojo_experiments/Tl/Tl-d.psp8')
report = pseudo.dojo_report
input_file = pseudo.filepath.replace(".psp8", ".in")
%cat $input_file
# atsym z nc nv iexc psfile Tl 81 12 3 4 both # n l f 1 0 2.0 2 0 2.0 2 1 6.0 3 0 2.0 3 1 6.0 3 2 10.0 4 0 2.0 4 1 6.0 4 2 10.0 5 0 2.0 5 1 6.0 4 3 14.0 5 2 10.0 6 0 2.0 6 1 1.0 # lmax 3 # l rc ep ncon nbas qcut 0 2.15 0.0 4 7 2.9 1 2.65 0.0 4 7 2.6 2 2.0 0.0 4 8 7.4 3 2.1 0.05 4 7 6.0 # lloc lpopt rc5 dvloc0 4 5 1.8 0.0 # l nproj debl #0 2 5.6 0 3 2.6 1 2 3.1 2 2 1.0 3 1 1.0 # icmod fcfact 3 7.0 1.3 # epsh1 epsh2 depsh -12.0 12.0 0.02 # rlmax drl 6.0 0.01 0
# Get data from the oncvpsp output file
from pseudo_dojo.ppcodes.oncvpsp import OncvOutputParser, PseudoGenDataPlotter
onc_parser = OncvOutputParser(pseudo.filepath.replace(".psp8", ".out"))
# Parse the file and build the plotter
onc_parser.scan()
plotter = onc_parser.make_plotter()
line: # lloc, lpopt, rc(5), dvloc0 rc line: 4 5 1.80000 0.00000 iprj= 2, l= 0, all-electron wave function, pseudo w-f iprj= 3, l= 0, all-electron wave function, pseudo w-f iprj= 2, l= 1, all-electron wave function, pseudo w-f iprj= 2, l= 2, all-electron wave function, pseudo w-f iprj= 1, l= 3, all-electron wave function, pseudo w-f
fig = plotter.plot_radial_wfs()
The plots show
$$ \phi(E) = \\arctan(R * d \psi(r)/dr |_R) $$
for some $R$ greater than the core radius, where $\psi$ is the solution of the non-local radial equation regular at the origin (i.e., the outward-integrated solution).
For a well-designed pseudopotential, $\phi(E)$ will closely track that of the all-electron potential over a wide range of energies from well-below to well-above the valence semi-core states of interest. The steps of $\pi$ indicate localized pseudo wave functions. Spurious steps of $\pi$ indicate ghost states, which are localized states than on investigation turn out to have more nodes than appropriate for their energies.
For $GW$ pseudos, no significant deviation should be present up to 8 Hartree.
fig = plotter.plot_atan_logders()
These results are obtained in the atomic configuration and should give a reasonable estimate
of the convergence behaviour wrt to ecut
in crystalline systems.
fig = plotter.plot_ene_vs_ecut()
fig = plotter.plot_projectors()
fig = plotter.plot_densities()
fig = plotter.plot_potentials()
Self-consistent band structure calculation performed on a regular mesh. The algorithm to detect ghosts is just an indication usually on the side of false positives.
fig = report.plot_ebands(with_soc=False)
dojo report does not contain trial: ghosts
The energies are obtained from the deltafactor calculations performed at the Wien2K equilibrium volume
fig = report.plot_etotal_vs_ecut()
dojo report does not contain trial: deltafactor
fig = report.plot_etotal_vs_ecut(inv_ecut=True)
dojo report does not contain trial: deltafactor
The Delta-gauge compares the Equation Of State (EOS) of the elemental solid of the element calculated using the pseudo potential to reference curves calculated using an all electron method. The Delta-gauge was introduced by K. Lejaeghere, V. Van Speybroeck, G. Van Oost, and&S. Cottenier in Critical Reviews in Solid State and Materials Sciences 39, 1
A comparison using the Delta-gauge between many codes and many pseudo tables can be found at the center for molecular modeling and in Science 351, 1394-1395
fig = report.plot_deltafactor_convergence(xc=pseudo.xc, what=("dfact_meV", "dfactprime_meV"))
dojo report does not contain trial: deltafactor
# Absolute difference with respect to Wien2k results.
fig = report.plot_deltafactor_convergence(xc=pseudo.xc, what=("-dfact_meV", "-dfactprime_meV"))
dojo report does not contain trial: deltafactor
fig = report.plot_deltafactor_eos()
dojo report does not contain trial: deltafactor
The GBRV tests compare the lattice parameter of a FCC and BCC lattice of the element to all electron reference data. The test was introduced by Kevin F. Garrity, Joseph W. Bennett, Karin M. Rabe, and David Vanderbilt in developing th GBRV pseudo potential table. More information can be found in Computational Materials Science 81, 446-452.
fig = report.plot_gbrv_convergence()
dojo report does not contain trial: gbrv_fcc
The calculation is performed with the Wien2k relaxed parameters obtained from the deltafactor CIF files.
fig = report.plot_phonon_convergence()
dojo report does not contain trial: phgamma
fig = report.plot_raren_convergence(pseudo.xc)
dojo report does not contain trial: raren_relax
fig = report.plot_raren_convergence(pseudo.xc, plot_diffs=True)
dojo report does not contain trial: raren_relax