https://github.com/romerogroup/pyprocar
Raw File
Tip revision: 892697b4c15da5cbbd09fb13726f82d246ae2b6f authored by Uthpala Herath on 14 April 2020, 20:41:07 UTC
Added feature to filter spin up and spin down bands in colinear spin calculations
Tip revision: 892697b
index.html


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>PyProcar documentation &mdash; PyProcar 3.6 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/language_data.js"></script>
        <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Installation" href="installation.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="#" class="icon icon-home"> PyProcar
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributors.html">Contributors</a></li>
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to cite</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="#">PyProcar</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="#">Docs</a> &raquo;</li>
        
      <li>PyProcar documentation</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/index.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="pyprocar-documentation">
<h1>PyProcar documentation<a class="headerlink" href="#pyprocar-documentation" title="Permalink to this headline">¶</a></h1>
<p>PyProcar is a robust, open-source Python library used for pre- and post-processing of the electronic structure data coming from DFT calculations. PyProcar provides a set of functions that manage data from the PROCAR format obtained from Vasp, Elk and Abinit. Basically, the PROCAR file is a projection of the Kohn-Sham states over atomic orbitals. That projection is performed to every <span class="math notranslate nohighlight">\(k\)</span>-point in the considered mesh, every energy band and every atom. PyProcar is capable of performing a multitude of tasks including plotting plain and spin/atom/orbital projected band structures and Fermi surfaces- both in 2D and 3D, Fermi velocity plots, unfolding bands of a super  cell, comparing band structures from multiple DFT calculations and generating a <span class="math notranslate nohighlight">\(k\)</span>-path for a given crystal structure.</p>
<p>In the VASP code, this information is written into the PROCAR file when <code class="docutils literal notranslate"><span class="pre">LORBIT=11</span></code> or <code class="docutils literal notranslate"><span class="pre">LORBIT=12</span></code> (to include phase projections of the wave functions) in the INCAR file. Partial support for Elk (tasks 21, 22 for non spin calculations) and Abinit (set <cite>prtprocar</cite>) is also available. While VASP and Abinit outputs a PROCAR file, parsers exist in PyProcar that allow the parsing of data from other formats (e.g. Elk) and store them within PyProcar for further processing.  To switch between codes, set the <code class="docutils literal notranslate"><span class="pre">code</span></code> variable to the desired code. E.g. <code class="docutils literal notranslate"><span class="pre">code='vasp'</span></code>, <code class="docutils literal notranslate"><span class="pre">code='elk'</span></code> etc. Full support for Elk and Abinit along with other DFT codes will be implemented in the future.</p>
<p>The format of the PROCAR is as follows:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mf">1.</span>   <span class="n">PROCAR</span> <span class="n">lm</span> <span class="n">decomposed</span>
<span class="mf">2.</span>    <span class="n">of</span> <span class="n">k</span><span class="o">-</span><span class="n">points</span><span class="p">:</span>    <span class="mi">4</span>         <span class="c1"># of bands: 224         # of ions:  4</span>
<span class="mf">3.</span>
<span class="mf">4.</span>    <span class="n">k</span><span class="o">-</span><span class="n">point</span>    <span class="mi">1</span> <span class="p">:</span>    <span class="mf">0.12500000</span> <span class="mf">0.12500000</span> <span class="mf">0.12500000</span>     <span class="n">weight</span> <span class="o">=</span> <span class="mf">0.12500000</span>
<span class="mf">5.</span>
<span class="mf">6.</span>   <span class="n">band</span>   <span class="mi">1</span> <span class="c1"># energy  -52.65660295 # occ.  1.00000000</span>
<span class="mf">7.</span>
<span class="mf">8.</span>   <span class="n">ion</span>      <span class="n">s</span>     <span class="n">py</span>     <span class="n">pz</span>     <span class="n">px</span>    <span class="n">dxy</span>    <span class="n">dyz</span>    <span class="n">dz2</span>    <span class="n">dxz</span>    <span class="n">dx2</span>    <span class="n">tot</span>
<span class="mf">9.</span>     <span class="mi">1</span>  <span class="mf">0.052</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.052</span>
<span class="mf">10.</span>    <span class="mi">2</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>
<span class="mf">11.</span>    <span class="mi">3</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>
<span class="mf">12.</span>    <span class="mi">4</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>
<span class="mf">13.</span>    <span class="mi">4</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>
<span class="mf">14.</span>   <span class="n">tot</span> <span class="mf">0.052</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.000</span>  <span class="mf">0.052</span>
</pre></div>
</div>
<ul class="simple">
<li><p>Line 1 is a comment</p></li>
<li><p>Line 2 gives the number of K points calculated (kpoint), number of bands (nband) and number of ions (nion)</p></li>
<li><p>Line 4 gives the k-point and the weight</p></li>
<li><p>Line 6 gives the energy for kpoints</p></li>
<li><p>Line 8 Labels of calculated projections, column 11 is the total projection</p></li>
<li><p>Line 9 Calculated projections for atom 1</p></li>
<li><p>Line 10 Calculated projections for atom 2 and so on</p></li>
<li><p>Line 14 after projections over all atoms, the total over every atomic projection is reported</p></li>
</ul>
<p>This block is repeated for the other spin channel if the calculation was polarized.
For spin polarized or non-collinear spin calculations there are additional blocks for each spin component.</p>
<p>The site projected wave function in the PROCAR file is calculated by projecting  the  Kohn-Sham  wave  functions  onto  spherical  harmonics  that  are non-zero  within  spheres  of  a  Wigner-Seitz  radius  around  each  ion  by:</p>
<div class="math notranslate nohighlight">
\[|&lt;Y^{\alpha}_{lm}|\phi_{nk}&gt;|^2\]</div>
<p>where,
<span class="math notranslate nohighlight">\(Y^{\alpha}_{lm}\)</span> are the  spherical harmonics centered at ion index <span class="math notranslate nohighlight">\(\alpha\)</span> with angular moment <span class="math notranslate nohighlight">\(l\)</span> and magnetic quantum number <span class="math notranslate nohighlight">\(m\)</span>, and <span class="math notranslate nohighlight">\(\phi_{nk}\)</span> are the Kohn-Sham wave functions.  In general, for a non-collinear electronic structure calculation the same equation is generalized to:</p>
<div class="math notranslate nohighlight">
\[\frac{1}{2} \sum_{\mu, \nu=1}^{2} \sigma_{\mu, \nu}^{i}&lt;\psi_{n, k}^{\mu}\left|Y_{l m}^{\alpha}&gt;&lt;Y_{l m}^{\alpha}\right| \psi_{n, k}^{\nu}&gt;\]</div>
<p>where <span class="math notranslate nohighlight">\(\sigma^i\)</span> are the Pauli matrices with <span class="math notranslate nohighlight">\(i = x, y , z\)</span> and the spinor wavefunction <span class="math notranslate nohighlight">\(\phi_{nk}\)</span> is now defined as</p>
<div class="math notranslate nohighlight">
\[\begin{split}\phi_{nk} &amp; = \begin{bmatrix}
\psi_{nk}^{\uparrow} \\
\psi_{nk}^{\downarrow}
\end{bmatrix}\end{split}\]</div>
<p>An OUTCAR file or an equivalent Abinit output file is required to extract the Fermi-energy and reciprocal lattice vectors.</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributors.html">Contributors</a></li>
<li class="toctree-l1"><a class="reference internal" href="cite.html">How to cite</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials.html">Tutorials</a><ul>
<li class="toctree-l2"><a class="reference internal" href="kpath.html">Generating a k-path</a></li>
<li class="toctree-l2"><a class="reference internal" href="repair.html">Repair</a></li>
<li class="toctree-l2"><a class="reference internal" href="kmesh.html">k-mesh generator</a></li>
<li class="toctree-l2"><a class="reference internal" href="bands.html">Band structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="2Dspin.html">2D spin-texture</a></li>
<li class="toctree-l2"><a class="reference internal" href="3Dspin.html">3D Fermi surface</a></li>
<li class="toctree-l2"><a class="reference internal" href="filter.html">Filtering data</a></li>
<li class="toctree-l2"><a class="reference internal" href="comparebands.html">Compare bands</a></li>
<li class="toctree-l2"><a class="reference internal" href="cat.html">Concatenating multiple calculations</a></li>
<li class="toctree-l2"><a class="reference internal" href="unfold.html">Band unfolding</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="indices-and-tables">
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
</ul>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2019, Uthpala Herath

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>
back to top