|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html class="writer-html5" lang="en" data-content_root="./">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
|
<title>grogupy package — grogupy 1.0.0 documentation</title>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="_static/jquery.js?v=5d32c60e"></script>
|
|
|
|
|
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
|
|
|
|
<script src="_static/documentation_options.js?v=8d563738"></script>
|
|
|
|
|
<script src="_static/doctools.js?v=9a2dae69"></script>
|
|
|
|
|
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
|
|
|
|
<script src="_static/design-tabs.js?v=f930bc37"></script>
|
|
|
|
|
<script src="_static/js/theme.js"></script>
|
|
|
|
|
<link rel="index" title="Index" href="genindex.html" />
|
|
|
|
|
<link rel="search" title="Search" href="search.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">
|
|
|
|
|
grogupy
|
|
|
|
|
</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" aria-label="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="Navigation menu">
|
|
|
|
|
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="quickstart/index.html">Quickstart</a></li>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="cite.html">Citing grogupy</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorials/index.html">Tutorials</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p class="caption" role="heading"><span class="caption-text">Advanced usage</span></p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="implementation/index.html">Implementation</a></li>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="environment.html">Environment variables</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="dev/index.html">Contributing to grogupy</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p class="caption" role="heading"><span class="caption-text">Extras</span></p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="changelog/index.html">Changelog</a></li>
|
|
|
|
|
<li class="toctree-l1"><a class="reference internal" href="bibliography.html">Bibliography</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
|
|
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
|
|
|
<a href="index.html">grogupy</a>
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
|
|
|
<div class="rst-content">
|
|
|
|
|
<div role="navigation" aria-label="Page navigation">
|
|
|
|
|
<ul class="wy-breadcrumbs">
|
|
|
|
|
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
|
|
|
|
<li class="breadcrumb-item active">grogupy package</li>
|
|
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
<a href="_sources/grogupy.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">
|
|
|
|
|
|
|
|
|
|
<section id="grogupy-package">
|
|
|
|
|
<h1>grogupy package<a class="headerlink" href="#grogupy-package" title="Link to this heading"></a></h1>
|
|
|
|
|
<section id="submodules">
|
|
|
|
|
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
|
|
|
|
|
</section>
|
|
|
|
|
<section id="module-grogupy.core">
|
|
|
|
|
<span id="grogupy-core-module"></span><h2>grogupy.core module<a class="headerlink" href="#module-grogupy.core" title="Link to this heading"></a></h2>
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.build_hh_ss">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">build_hh_ss</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dh</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#build_hh_ss"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.build_hh_ss" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It builds the Hamiltonian and Overlap matrix from the sisl.dh class.</p>
|
|
|
|
|
<p>It restructures the data in the SPIN BOX representation, where NS is
|
|
|
|
|
the number of supercells and NO is the number of orbitals.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>dh</strong> – sisl.physics.Hamiltonian
|
|
|
|
|
Hamiltonian read in by sisl</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>(NS, NO, NO) np.array_like</dt><dd><p>Hamiltonian in SPIN BOX representation</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>ss<span class="classifier">(NS, NO, NO) np.array_like</span></dt><dd><p>Overlap matrix in SPIN BOX representation</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>hh</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.calc_Vu">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">calc_Vu</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">H</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Tu</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#calc_Vu"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.calc_Vu" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Calculates the local perturbation in case of a spin rotation.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>H</strong> – (NO, NO) np.array_like
|
|
|
|
|
Hamiltonian</p></li>
|
|
|
|
|
<li><p><strong>Tu</strong> – (NO, NO) array_like
|
|
|
|
|
Rotation around u</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>(NO, NO) np.array_like</dt><dd><p>First order perturbed matrix</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>Vu2<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>Second order perturbed matrix</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>Vu1</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.onsite_projection">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">onsite_projection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">matrix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">idx1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">idx2</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#onsite_projection"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.onsite_projection" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It produces the slices of a matrix for the on site projection.</p>
|
|
|
|
|
<p>The slicing is along the last two axes as these contains the orbital indexing.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>matrix</strong> – (…, :, :) np.array_like
|
|
|
|
|
Some matrix</p></li>
|
|
|
|
|
<li><p><strong>idx</strong> – np.array_like
|
|
|
|
|
The indexes of the orbitals</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>Reduced matrix based on the projection</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.parallel_Gk">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">parallel_Gk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">HK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eran</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#parallel_Gk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.parallel_Gk" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Calculates the Greens function by inversion.</p>
|
|
|
|
|
<p>It calculates the Greens function on all the energy levels at the same time.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>HK</strong> – (NO, NO), np.array_like
|
|
|
|
|
Hamiltonian at a given k point</p></li>
|
|
|
|
|
<li><p><strong>SK</strong> – (NO, NO), np.array_like
|
|
|
|
|
Overlap Matrix at a given k point</p></li>
|
|
|
|
|
<li><p><strong>eran</strong> – (eset) np.array_like
|
|
|
|
|
Energy sample along the contour</p></li>
|
|
|
|
|
<li><p><strong>eset</strong> – int
|
|
|
|
|
Number of energy samples along the contour</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>(eset, NO, NO), np.array_like</dt><dd><p>Green’s function at a given k point</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>Gk</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.remove_clutter_for_save">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">remove_clutter_for_save</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#remove_clutter_for_save"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.remove_clutter_for_save" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Removes unimportant data from the dictionaries.</p>
|
|
|
|
|
<p>It is used before saving to throw away data that
|
|
|
|
|
is not needed for post processing.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>pairs</strong> – dict
|
|
|
|
|
Contains all the pair information</p></li>
|
|
|
|
|
<li><p><strong>magnetic_entities</strong> – dict
|
|
|
|
|
Contains all the magnetic entity information</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>dict</dt><dd><p>Contains all the reduced pair information</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains all the reduced magnetic entity information</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>pairs</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.sequential_GK">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">sequential_GK</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">HK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eran</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#sequential_GK"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.sequential_GK" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Calculates the Greens function by inversion.</p>
|
|
|
|
|
<p>It calculates sequentially over the energy levels.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>HK</strong> – (NO, NO), np.array_like
|
|
|
|
|
Hamiltonian at a given k point</p></li>
|
|
|
|
|
<li><p><strong>SK</strong> – (NO, NO), np.array_like
|
|
|
|
|
Overlap Matrix at a given k point</p></li>
|
|
|
|
|
<li><p><strong>eran</strong> – (eset) np.array_like
|
|
|
|
|
Energy sample along the contour</p></li>
|
|
|
|
|
<li><p><strong>eset</strong> – int
|
|
|
|
|
Number of energy samples along the contour</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>(eset, NO, NO), np.array_like</dt><dd><p>Green’s function at a given k point</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>Gk</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.core.setup_pairs_and_magnetic_entities">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">setup_pairs_and_magnetic_entities</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dh</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/core.html#setup_pairs_and_magnetic_entities"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.setup_pairs_and_magnetic_entities" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It creates the complete structure of the dictionaries and fills some basic data.</p>
|
|
|
|
|
<p>It creates orbital indexes, spin box indexes, coordinates and tags for magnetic entities.
|
|
|
|
|
Furthermore it creates the structures for the energies, the perturbed potentials and
|
|
|
|
|
the Greens function calculation. It dose the same for the pairs.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>pairs</strong> – dict
|
|
|
|
|
Contains the initial pair information</p></li>
|
|
|
|
|
<li><p><strong>magnetic_entities</strong> – dict
|
|
|
|
|
Contains the initial magnetic entity information</p></li>
|
|
|
|
|
<li><p><strong>dh</strong> – sisl.physics.Hamiltonian
|
|
|
|
|
Hamiltonian read in by sisl</p></li>
|
|
|
|
|
<li><p><strong>simulation_parameters</strong> – dict
|
|
|
|
|
A set of parameters from the simulation</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>dict</dt><dd><p>Contains the initial information and the complete structure</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains the initial information and the complete structure</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>pairs</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
<section id="module-grogupy.grogu">
|
|
|
|
|
<span id="grogupy-grogu-module"></span><h2>grogupy.grogu module<a class="headerlink" href="#module-grogupy.grogu" title="Link to this heading"></a></h2>
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.grogu.main">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.grogu.</span></span><span class="sig-name descname"><span class="pre">main</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/grogu.html#main"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.grogu.main" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd></dd></dl>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
<section id="module-grogupy.io">
|
|
|
|
|
<span id="grogupy-io-module"></span><h2>grogupy.io module<a class="headerlink" href="#module-grogupy.io" title="Link to this heading"></a></h2>
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.io.load_pickle">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">load_pickle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">infile</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/io.html#load_pickle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.load_pickle" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Loads the data from the infile with pickle.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>infile</strong> – str
|
|
|
|
|
Path to infile</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>dict</dt><dd><p>A dictionary of data</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>data</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.io.print_atoms_and_pairs">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_atoms_and_pairs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/io.html#print_atoms_and_pairs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_atoms_and_pairs" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It prints the pair and magnetic entity information for the grogu out.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>magnetic_entities</strong> – dict
|
|
|
|
|
It contains the data on the magnetic entities</p></li>
|
|
|
|
|
<li><p><strong>pairs</strong> – dict
|
|
|
|
|
It contains the data on the pairs</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.io.print_job_description">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_job_description</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/io.html#print_job_description"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_job_description" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It prints the parameters and the description of the job.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>simulation_parameters</strong> – dict
|
|
|
|
|
It contains the simulations parameters</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.io.print_parameters">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_parameters</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/io.html#print_parameters"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_parameters" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It prints the simulation parameters for the grogu out.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>simulation_parameters</strong> – dict
|
|
|
|
|
It contains the simulations parameters</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.io.print_runtime_information">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_runtime_information</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">times</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/io.html#print_runtime_information"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_runtime_information" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It prints the runtime information for the grogu out.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>times</strong> – dict
|
|
|
|
|
It contains the runtime data</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.io.save_pickle">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">save_pickle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/io.html#save_pickle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.save_pickle" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Saves the data in the outfile with pickle.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>outfile</strong> – str
|
|
|
|
|
Path to outfile</p></li>
|
|
|
|
|
<li><p><strong>data</strong> – dict
|
|
|
|
|
Contains the data</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
<section id="module-grogupy.magnetism">
|
|
|
|
|
<span id="grogupy-magnetism-module"></span><h2>grogupy.magnetism module<a class="headerlink" href="#module-grogupy.magnetism" title="Link to this heading"></a></h2>
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.magnetism.blow_up_orbindx">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">blow_up_orbindx</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">orb_indices</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/magnetism.html#blow_up_orbindx"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.blow_up_orbindx" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Function to blow up orbital indices to make SPIN BOX indices.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>orb_indices</strong> – np.array_like
|
|
|
|
|
These are the indices in ORBITAL BOX</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>These are the indices in SPIN BOX</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>orb_indices</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.magnetism.calculate_anisotropy_tensor">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">calculate_anisotropy_tensor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mag_ent</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/magnetism.html#calculate_anisotropy_tensor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.calculate_anisotropy_tensor" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Calculates the renormalized anisotropy tensor from the energies.</p>
|
|
|
|
|
<p>It uses the grogu convention for output.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>mag_ent</strong> – dict
|
|
|
|
|
An element from the magnetic entities</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>elements of the anisotropy tensor</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>K</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.magnetism.calculate_exchange_tensor">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">calculate_exchange_tensor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pair</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/magnetism.html#calculate_exchange_tensor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.calculate_exchange_tensor" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Calculates the exchange tensor from the energies.</p>
|
|
|
|
|
<p>It produces the isotropic exchange, the relevant elements
|
|
|
|
|
from the Dzyaloshinskii-Morilla (Dm) tensor, the symmetric-anisotropy
|
|
|
|
|
and the complete exchange tensor.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>pair</strong> – dict
|
|
|
|
|
An element from the pairs</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>float</dt><dd><p>Isotropic exchange (Tr[J] / 3)</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>J_S<span class="classifier">np.array_like</span></dt><dd><p>Symmetric-anisotropy (J_S = J - J_iso * I ––> Jxx, Jyy, Jxy, Jxz, Jyz)</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>D<span class="classifier">np.array_like</span></dt><dd><p>DM elements (Dx, Dy, Dz)</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>J<span class="classifier">np.array_like</span></dt><dd><p>Complete exchange tensor flattened (Jxx, Jxy, Jxz, Jyx, Jyy, Jyz, Jzx, Jzy, Jzz)</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-odd">Return type<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p>J_iso</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.magnetism.parse_magnetic_entity">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">parse_magnetic_entity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dh</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">atom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">l</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/magnetism.html#parse_magnetic_entity"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.parse_magnetic_entity" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Function to define orbital indexes of a given magnetic entity.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>dh</strong> – sisl.physics.Hamiltonian
|
|
|
|
|
Hamiltonian from sisl</p></li>
|
|
|
|
|
<li><p><strong>atom</strong> – integer or list of integers, optional
|
|
|
|
|
Defining atom (or atoms) in the unit cell forming the magnetic entity. Defaults to None</p></li>
|
|
|
|
|
<li><p><strong>l</strong> – integer, optional
|
|
|
|
|
Defining the angular momentum channel. Defaults to None</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>list</dt><dd><p>The orbital indexes of the given magnetic entity</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.magnetism.spin_tracer">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">spin_tracer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/magnetism.html#spin_tracer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.spin_tracer" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Spin tracer utility.</p>
|
|
|
|
|
<p>This takes an operator with the orbital-spin sequence:
|
|
|
|
|
orbital 1 up,
|
|
|
|
|
orbital 1 down,
|
|
|
|
|
orbital 2 up,
|
|
|
|
|
orbital 2 down,
|
|
|
|
|
that is in the SPIN-BOX representation,
|
|
|
|
|
and extracts orbital dependent Pauli traces.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>M</strong> – np.array_like
|
|
|
|
|
Traceable matrix</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>dict</dt><dd><p>It contains the traced matrix with “x”, “y”, “z” and “c”</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
<section id="module-grogupy.utilities">
|
|
|
|
|
<span id="grogupy-utilities-module"></span><h2>grogupy.utilities module<a class="headerlink" href="#module-grogupy.utilities" title="Link to this heading"></a></h2>
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.RotM">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">RotM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">u</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#RotM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.RotM" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Definition of rotation matrix with angle theta around direction u.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>theta</strong> – float
|
|
|
|
|
The angle of rotation</p></li>
|
|
|
|
|
<li><p><strong>u</strong> – np.array_like
|
|
|
|
|
The rotation axis</p></li>
|
|
|
|
|
<li><p><strong>eps</strong> – float, optional
|
|
|
|
|
Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>The rotation matrix</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.RotMa2b">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">RotMa2b</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#RotMa2b"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.RotMa2b" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Definition of rotation matrix rotating unit vector a to unit vector b.</p>
|
|
|
|
|
<p>Function returns array R such that R @ a = b holds.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>a</strong> – np.array_like
|
|
|
|
|
First vector</p></li>
|
|
|
|
|
<li><p><strong>b</strong> – np.array_like
|
|
|
|
|
Second vector</p></li>
|
|
|
|
|
<li><p><strong>eps</strong> – float, optional
|
|
|
|
|
Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>The rotation matrix with the above property</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.commutator">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">commutator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#commutator"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.commutator" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Shorthand for commutator.</p>
|
|
|
|
|
<p>Commutator of two matrices in the mathematical sense.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>a</strong> – np.array_like
|
|
|
|
|
The first matrix</p></li>
|
|
|
|
|
<li><p><strong>b</strong> – np.array_like
|
|
|
|
|
The second matrix</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>The commutator of a and b</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.crossM">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">crossM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">u</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#crossM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.crossM" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Definition for the cross-product matrix.</p>
|
|
|
|
|
<p>It acts as a cross product with vector u.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>u</strong> – list or np.array_like
|
|
|
|
|
The second vector in the cross product</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>The matrix that represents teh cross product with a vector</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.hsk">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">hsk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">H</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ss</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sc_off</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">k</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">0)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#hsk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.hsk" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Speed up Hk and Sk generation.</p>
|
|
|
|
|
<p>Calculates the Hamiltonian and the Overlap matrix at a given k point. It is faster that the sisl version.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>H</strong> – np.array_like
|
|
|
|
|
Hamiltonian in spin box form</p></li>
|
|
|
|
|
<li><p><strong>ss</strong> – np.array_like
|
|
|
|
|
Overlap matrix in spin box form</p></li>
|
|
|
|
|
<li><p><strong>sc_off</strong> – list
|
|
|
|
|
supercell indexes of the Hamiltonian</p></li>
|
|
|
|
|
<li><p><strong>k</strong> – tuple, optional
|
|
|
|
|
The k point where the matrices are set up. Defaults to (0, 0, 0)</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>Hamiltonian at the given k point</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt>np.array_like</dt><dd><p>Overlap matrix at the given k point</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.int_de_ke">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">int_de_ke</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">traced</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">we</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#int_de_ke"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.int_de_ke" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It numerically integrates the traced matrix.</p>
|
|
|
|
|
<p>It is a wrapper from numpy.trapz and it contains the
|
|
|
|
|
relevant constants to calculate the energy integral from
|
|
|
|
|
equation 93 or 96.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>traced</strong> – np.array_like
|
|
|
|
|
The trace of a matrix or a matrix product</p></li>
|
|
|
|
|
<li><p><strong>we</strong> – float
|
|
|
|
|
The weight of a point on the contour</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>float</dt><dd><p>The energy calculated from the integral formula</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.make_contour">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">make_contour</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">emin</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-20</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">emax</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">42</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">150</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#make_contour"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.make_contour" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>A more sophisticated contour generator.</p>
|
|
|
|
|
<p>Calculates the parameters for the complex contour integral. It uses the
|
|
|
|
|
Legendre-Gauss quadrature method. It returns a class that contains
|
|
|
|
|
the information for the contour integral.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>emin</strong> – int, optional
|
|
|
|
|
Energy minimum of the contour. Defaults to -20</p></li>
|
|
|
|
|
<li><p><strong>emax</strong> – float, optional
|
|
|
|
|
Energy maximum of the contour. Defaults to 0.0, so the Fermi level</p></li>
|
|
|
|
|
<li><p><strong>enum</strong> – int, optional
|
|
|
|
|
Number of sample points along the contour. Defaults to 42</p></li>
|
|
|
|
|
<li><p><strong>p</strong> – int, optional
|
|
|
|
|
Shape parameter that describes the distribution of the sample points. Defaults to 150</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>ccont</dt><dd><p>Contains all the information for the contour integral</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.make_kset">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">make_kset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dirs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'xyz'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">NUMK</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">20</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#make_kset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.make_kset" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Simple k-grid generator to sample the Brillouin zone.</p>
|
|
|
|
|
<p>Depending on the value of the dirs
|
|
|
|
|
argument k sampling in 1,2 or 3 dimensions is generated.
|
|
|
|
|
If dirs argument does not contain either of x, y or z
|
|
|
|
|
a kset of a single k-pont at the origin is returned. The total number of k points is the NUMK**(dimensions)</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><ul class="simple">
|
|
|
|
|
<li><p><strong>dirs</strong> – str, optional
|
|
|
|
|
Directions of the k points in the Brillouin zone. They are the three lattice vectors. Defaults to “xyz”</p></li>
|
|
|
|
|
<li><p><strong>NUMK</strong> – int, optional
|
|
|
|
|
The number of k points in a direction. Defaults to 20</p></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>An array of k points that uniformly sample the Brillouin zone in the given directions</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.read_siesta_emin">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">read_siesta_emin</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eigfile</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#read_siesta_emin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.read_siesta_emin" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>It reads the lowest energy level from the siesta run.</p>
|
|
|
|
|
<p>It uses the .EIG file from siesta that contains the eigenvalues.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>eigfile</strong> – str
|
|
|
|
|
The path to the .EIG file</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>float</dt><dd><p>The energy minimum</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
<dl class="py function">
|
|
|
|
|
<dt class="sig sig-object py" id="grogupy.utilities.tau_u">
|
|
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">tau_u</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">u</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/grogupy/utilities.html#tau_u"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.tau_u" title="Link to this definition"></a></dt>
|
|
|
|
|
<dd><p>Pauli matrix in direction u.</p>
|
|
|
|
|
<p>Returns the vector u in the basis of the Pauli matrices.</p>
|
|
|
|
|
<dl class="field-list simple">
|
|
|
|
|
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-odd"><p><strong>u</strong> – list or np.array_like
|
|
|
|
|
The direction</p>
|
|
|
|
|
</dd>
|
|
|
|
|
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
|
|
|
|
<dd class="field-even"><p><dl class="simple">
|
|
|
|
|
<dt>np.array_like</dt><dd><p>Arbitrary direction in the base of the Pauli matrices</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</p>
|
|
|
|
|
</dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
<section id="module-grogupy">
|
|
|
|
|
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grogupy" title="Link to this heading"></a></h2>
|
|
|
|
|
</section>
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<footer>
|
|
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
|
|
<div role="contentinfo">
|
|
|
|
|
<p>© Copyright 2024, grogupy.</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
|
|
|
|
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
|
|
|
|
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
jQuery(function () {
|
|
|
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|