https://github.com/romerogroup/pyprocar
Raw File
Tip revision: 5d6c847dd7c7f146208b4dff51586a872ba7b523 authored by uthpalah on 03 June 2019, 19:42:39 UTC
Bug fixes for Fermi surface
Tip revision: 5d6c847
filter.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>Filtering data &mdash; PyProcar 3.5 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 type="text/javascript" src="_static/jquery.js"></script>
        <script type="text/javascript" src="_static/underscore.js"></script>
        <script type="text/javascript" src="_static/doctools.js"></script>
        <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.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="Compare bands" href="comparebands.html" />
    <link rel="prev" title="3D Fermi surface" href="3Dspin.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="index.html" 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 class="current">
<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 current"><a class="reference internal" href="tutorials.html">Tutorials</a><ul class="current">
<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">Bulk 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 current"><a class="current reference internal" href="#">Filtering data</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#to-filter-selected-orbitals">To filter selected orbitals</a></li>
<li class="toctree-l3"><a class="reference internal" href="#to-filter-selected-atoms">To filter selected atoms</a></li>
</ul>
</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>
    </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="index.html">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="index.html">Docs</a> &raquo;</li>
        
          <li><a href="tutorials.html">Tutorials</a> &raquo;</li>
        
      <li>Filtering data</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/filter.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="filtering-data">
<h1>Filtering data<a class="headerlink" href="#filtering-data" title="Permalink to this headline">¶</a></h1>
<p>A simpler version of PROCAR file containing only a subset of information from the original dataset can be generated with this utility.  This feature is very useful when there are many bands in the PROCAR file (e.g. in heterostructures or supercells calculations) making the file size enormously large for post-processing while only bands near the Fermi-level are needed for analysis. In this case, one can filter data of selected bands near the Fermi-level. This considerably reduces the file size and makes the post-processing of data faster. In the same way, one could use the <code class="docutils literal notranslate"><span class="pre">filter</span></code> utility to filter the <strong>PROCAR</strong> file to extract information regarding particular spins, atoms, or orbitals in a relatively smaller <strong>PROCAR-new</strong> file.</p>
<p>The following example extracts information of bands ranging from index 50 to 70 from a <strong>PROCAR</strong> file (Fermi-level is near band #60) while ignoring all other bands located far from the Fermi-level, and stores resulting dataset in a new file named <strong>PROCAR-band50-70</strong>. Now the new <strong>PROCAR-band50-70</strong> file can be used for further post-processing of data at relatively low memory requirements:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pyprocar</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="s1">&#39;PROCAR&#39;</span><span class="p">,</span><span class="s1">&#39;PROCAR-band50-70&#39;</span><span class="p">,</span><span class="n">bands</span><span class="o">=</span><span class="p">[</span><span class="mi">50</span><span class="p">,</span><span class="mi">70</span><span class="p">])</span>
</pre></div>
</div>
<div class="section" id="to-filter-selected-orbitals">
<h2>To filter selected orbitals<a class="headerlink" href="#to-filter-selected-orbitals" title="Permalink to this headline">¶</a></h2>
<p>To make a new PROCAR file containing only three columns, one for <span class="math notranslate nohighlight">\(s\)</span> orbitals, one for <span class="math notranslate nohighlight">\(p\)</span>, and one for total (real total, not total of <span class="math notranslate nohighlight">\(s+p\)</span>):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>pyprocar.filter(&#39;PROCAR’,&#39;PROCAR-filtered_sp’, orbitals=[[0],[1,2,3]])
</pre></div>
</div>
<p>If you want to select only <span class="math notranslate nohighlight">\(p_x\)</span> orbitals, just use <code class="docutils literal notranslate"><span class="pre">orbitals=[[3]]</span></code>.</p>
<p>In the same way to plot the projection of total <span class="math notranslate nohighlight">\(p\)</span>-orbitals use <code class="docutils literal notranslate"><span class="pre">orbitals=[[1,2,3]]</span></code>  (i.e. <span class="math notranslate nohighlight">\(px+py+pz\)</span>). Same goes for other orbitals.</p>
</div>
<div class="section" id="to-filter-selected-atoms">
<h2>To filter selected atoms<a class="headerlink" href="#to-filter-selected-atoms" title="Permalink to this headline">¶</a></h2>
<p>Usage:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>pyprocar.filter(‘PROCAR’,’PROCAR-filter_ATOMS’, atoms=[[0]])
</pre></div>
</div>
<p>PyProcar counts each row of ions in PROCAR file starting from 0. Keep in mind: <code class="docutils literal notranslate"><span class="pre">atoms=0</span></code> does not define the atom_type, rather it defines only the first ion in the POSCAR. So if you have more than one ion of the same element, use <code class="docutils literal notranslate"><span class="pre">atoms</span> <span class="pre">=</span> <span class="pre">[[0,1,2,3,...]]</span></code>.</p>
</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="comparebands.html" class="btn btn-neutral float-right" title="Compare bands" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="3Dspin.html" class="btn btn-neutral float-left" title="3D Fermi surface" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</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