|
|
|
|
|
|
|
|
<!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" />
|
|
|
<link rel="next" title="Environment variables" href="environment.html" />
|
|
|
<link rel="prev" title="src" href="modules.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 class="current">
|
|
|
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
|
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">grogupy package</a><ul>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#submodules">Submodules</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.core">grogupy.core module</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.build_hh_ss"><code class="docutils literal notranslate"><span class="pre">build_hh_ss()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.calc_Vu"><code class="docutils literal notranslate"><span class="pre">calc_Vu()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.onsite_projection"><code class="docutils literal notranslate"><span class="pre">onsite_projection()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.parallel_Gk"><code class="docutils literal notranslate"><span class="pre">parallel_Gk()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.remove_clutter_for_save"><code class="docutils literal notranslate"><span class="pre">remove_clutter_for_save()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.sequential_GK"><code class="docutils literal notranslate"><span class="pre">sequential_GK()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.setup_pairs_and_magnetic_entities"><code class="docutils literal notranslate"><span class="pre">setup_pairs_and_magnetic_entities()</span></code></a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.grogu">grogupy.grogu module</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.grogu.parse_command_line"><code class="docutils literal notranslate"><span class="pre">parse_command_line()</span></code></a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.io">grogupy.io module</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.load_pickle"><code class="docutils literal notranslate"><span class="pre">load_pickle()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_atoms_and_pairs"><code class="docutils literal notranslate"><span class="pre">print_atoms_and_pairs()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_job_description"><code class="docutils literal notranslate"><span class="pre">print_job_description()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_parameters"><code class="docutils literal notranslate"><span class="pre">print_parameters()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_runtime_information"><code class="docutils literal notranslate"><span class="pre">print_runtime_information()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.process_input_args"><code class="docutils literal notranslate"><span class="pre">process_input_args()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.read_fdf"><code class="docutils literal notranslate"><span class="pre">read_fdf()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.save_pickle"><code class="docutils literal notranslate"><span class="pre">save_pickle()</span></code></a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.magnetism">grogupy.magnetism module</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.blow_up_orbindx"><code class="docutils literal notranslate"><span class="pre">blow_up_orbindx()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.calculate_anisotropy_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_anisotropy_tensor()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.calculate_exchange_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_exchange_tensor()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.parse_magnetic_entity"><code class="docutils literal notranslate"><span class="pre">parse_magnetic_entity()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.spin_tracer"><code class="docutils literal notranslate"><span class="pre">spin_tracer()</span></code></a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.utilities">grogupy.utilities module</a><ul>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.RotM"><code class="docutils literal notranslate"><span class="pre">RotM()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.RotMa2b"><code class="docutils literal notranslate"><span class="pre">RotMa2b()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.commutator"><code class="docutils literal notranslate"><span class="pre">commutator()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.crossM"><code class="docutils literal notranslate"><span class="pre">crossM()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.hsk"><code class="docutils literal notranslate"><span class="pre">hsk()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.int_de_ke"><code class="docutils literal notranslate"><span class="pre">int_de_ke()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.make_contour"><code class="docutils literal notranslate"><span class="pre">make_contour()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.make_kset"><code class="docutils literal notranslate"><span class="pre">make_kset()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.read_siesta_emin"><code class="docutils literal notranslate"><span class="pre">read_siesta_emin()</span></code></a></li>
|
|
|
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.tau_u"><code class="docutils literal notranslate"><span class="pre">tau_u()</span></code></a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy">Module contents</a></li>
|
|
|
</ul>
|
|
|
</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"><a href="modules.html">src</a></li>
|
|
|
<li class="breadcrumb-item active">grogupy package</li>
|
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
<a href="../_sources/implementation/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>
|
|
|
<p>Docstring in core.</p>
|
|
|
<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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian read in by sisl</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>hh<span class="classifier">(NS, NO, NO) np.array_like</span></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>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>H<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>Hamiltonian</p>
|
|
|
</dd>
|
|
|
<dt>Tu<span class="classifier">(NO, NO) array_like</span></dt><dd><p>Rotation around u</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>Vu1<span class="classifier">(NO, NO) np.array_like</span></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>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>matrix<span class="classifier">(…, :, :) np.array_like</span></dt><dd><p>Some matrix</p>
|
|
|
</dd>
|
|
|
<dt>idx<span class="classifier">np.array_like</span></dt><dd><p>The indexes of the orbitals</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>np.array_like</dt><dd><p>Reduced matrix based on the projection</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>HK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Hamiltonian at a given k point</p>
|
|
|
</dd>
|
|
|
<dt>SK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Overlap Matrix at a given k point</p>
|
|
|
</dd>
|
|
|
<dt>eran<span class="classifier">(eset) np.array_like</span></dt><dd><p>Energy sample along the contour</p>
|
|
|
</dd>
|
|
|
<dt>eset<span class="classifier">int</span></dt><dd><p>Number of energy samples along the contour</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>Gk<span class="classifier">(eset, NO, NO), np.array_like</span></dt><dd><p>Green’s function at a given k point</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains all the pair information</p>
|
|
|
</dd>
|
|
|
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains all the magnetic entity information</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>pairs<span class="classifier">dict</span></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>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>HK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Hamiltonian at a given k point</p>
|
|
|
</dd>
|
|
|
<dt>SK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Overlap Matrix at a given k point</p>
|
|
|
</dd>
|
|
|
<dt>eran<span class="classifier">(eset) np.array_like</span></dt><dd><p>Energy sample along the contour</p>
|
|
|
</dd>
|
|
|
<dt>eset<span class="classifier">int</span></dt><dd><p>Number of energy samples along the contour</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>Gk<span class="classifier">(eset, NO, NO), np.array_like</span></dt><dd><p>Green’s function at a given k point</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains the initial pair information</p>
|
|
|
</dd>
|
|
|
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains the initial magnetic entity information</p>
|
|
|
</dd>
|
|
|
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian read in by sisl</p>
|
|
|
</dd>
|
|
|
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>A set of parameters from the simulation</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>pairs<span class="classifier">dict</span></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>
|
|
|
</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>
|
|
|
<p>Docstring in grogupy.</p>
|
|
|
<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><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em>, <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/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>
|
|
|
|
|
|
<dl class="py function">
|
|
|
<dt class="sig sig-object py" id="grogupy.grogu.parse_command_line">
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.grogu.</span></span><span class="sig-name descname"><span class="pre">parse_command_line</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/grogu.html#parse_command_line"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.grogu.parse_command_line" title="Link to this definition"></a></dt>
|
|
|
<dd><p>This function can read input from the command line.</p>
|
|
|
</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>
|
|
|
<p>Docstring in io.</p>
|
|
|
<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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>infile<span class="classifier">str</span></dt><dd><p>Path to infile</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>data<span class="classifier">dict</span></dt><dd><p>A dictionary of data</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>It contains the data on the magnetic entities</p>
|
|
|
</dd>
|
|
|
<dt>pairs<span class="classifier">dict</span></dt><dd><p>It contains the data on the pairs</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>It contains the simulations parameters</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>It contains the simulations parameters</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>times<span class="classifier">dict</span></dt><dd><p>It contains the runtime data</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd></dl>
|
|
|
|
|
|
<dl class="py function">
|
|
|
<dt class="sig sig-object py" id="grogupy.io.process_input_args">
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">process_input_args</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_arguments</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fdf_arguments</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">command_line_arguments</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">accepted_inputs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">['infile',</span> <span class="pre">'outfile',</span> <span class="pre">'scf_xcf_orientation',</span> <span class="pre">'ref_xcf_orientations',</span> <span class="pre">'kset',</span> <span class="pre">'kdirs',</span> <span class="pre">'ebot',</span> <span class="pre">'eset',</span> <span class="pre">'esetp',</span> <span class="pre">'parallel_solver_for_Gk',</span> <span class="pre">'padawan_mode']</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#process_input_args"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.process_input_args" title="Link to this definition"></a></dt>
|
|
|
<dd><p>It returns the final simulation parameters based on the inputs.</p>
|
|
|
<p>The merging is done in the order of priority:
|
|
|
1. command line arguments
|
|
|
2. fdf arguments
|
|
|
3. default arguments</p>
|
|
|
<dl class="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>default_arguments<span class="classifier">dict</span></dt><dd><p>Default arguments from grogupy</p>
|
|
|
</dd>
|
|
|
<dt>fdf_arguments<span class="classifier">dict</span></dt><dd><p>Arguments read from the fdf input file</p>
|
|
|
</dd>
|
|
|
<dt>command_line_arguments<span class="classifier">dict</span></dt><dd><p>Arguments from the command line</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>dict</dt><dd><p>The final simulation parameters</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd></dl>
|
|
|
|
|
|
<dl class="py function">
|
|
|
<dt class="sig sig-object py" id="grogupy.io.read_fdf">
|
|
|
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">read_fdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#read_fdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.read_fdf" title="Link to this definition"></a></dt>
|
|
|
<dd><p>It reads the simulation parameters, magnetic entities and pairs from the fdf.</p>
|
|
|
<dl class="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>path<span class="classifier">string</span></dt><dd><p>The path to the .fdf file</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>fdf_arguments<span class="classifier">dict</span></dt><dd><p>The read input arguments from the fdf file</p>
|
|
|
</dd>
|
|
|
<dt>magnetic_entities<span class="classifier">list</span></dt><dd><p>It contains the dictionaries associated with the magnetic entities</p>
|
|
|
</dd>
|
|
|
<dt>pairs<span class="classifier">dict</span></dt><dd><p>It contains the dictionaries associated with the pair information</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>outfile<span class="classifier">str</span></dt><dd><p>Path to outfile</p>
|
|
|
</dd>
|
|
|
<dt>data<span class="classifier">dict</span></dt><dd><p>Contains the data</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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>
|
|
|
<p>Docstring in magnetism.</p>
|
|
|
<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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>orb_indices<span class="classifier">np.array_like</span></dt><dd><p>These are the indices in ORBITAL BOX</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>orb_indices<span class="classifier">np.array_like</span></dt><dd><p>These are the indices in SPIN BOX</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>mag_ent<span class="classifier">dict</span></dt><dd><p>An element from the magnetic entities</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>K<span class="classifier">np.array_like</span></dt><dd><p>elements of the anisotropy tensor</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>pair<span class="classifier">dict</span></dt><dd><p>An element from the pairs</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>J_iso<span class="classifier">float</span></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>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian from sisl</p>
|
|
|
</dd>
|
|
|
<dt>atom<span class="classifier">integer or list of integers, optional</span></dt><dd><p>Defining atom (or atoms) in the unit cell forming the magnetic entity. Defaults to None</p>
|
|
|
</dd>
|
|
|
<dt>l<span class="classifier">integer, optional</span></dt><dd><p>Defining the angular momentum channel. Defaults to None</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>list</dt><dd><p>The orbital indexes of the given magnetic entity</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>M<span class="classifier">np.array_like</span></dt><dd><p>Traceable matrix</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>dict</dt><dd><p>It contains the traced matrix with “x”, “y”, “z” and “c”</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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>
|
|
|
<p>Docstring in utilities.</p>
|
|
|
<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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>theta<span class="classifier">float</span></dt><dd><p>The angle of rotation</p>
|
|
|
</dd>
|
|
|
<dt>u<span class="classifier">np.array_like</span></dt><dd><p>The rotation axis</p>
|
|
|
</dd>
|
|
|
<dt>eps<span class="classifier">float, optional</span></dt><dd><p>Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>np.array_like</dt><dd><p>The rotation matrix</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>a<span class="classifier">np.array_like</span></dt><dd><p>First vector</p>
|
|
|
</dd>
|
|
|
<dt>b<span class="classifier">np.array_like</span></dt><dd><p>Second vector</p>
|
|
|
</dd>
|
|
|
<dt>eps<span class="classifier">float, optional</span></dt><dd><p>Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>np.array_like</dt><dd><p>The rotation matrix with the above property</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>a<span class="classifier">np.array_like</span></dt><dd><p>The first matrix</p>
|
|
|
</dd>
|
|
|
<dt>b<span class="classifier">np.array_like</span></dt><dd><p>The second matrix</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>np.array_like</dt><dd><p>The commutator of a and b</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>u<span class="classifier">list or np.array_like</span></dt><dd><p>The second vector in the cross product</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>np.array_like</dt><dd><p>The matrix that represents teh cross product with a vector</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>H<span class="classifier">np.array_like</span></dt><dd><p>Hamiltonian in spin box form</p>
|
|
|
</dd>
|
|
|
<dt>ss<span class="classifier">np.array_like</span></dt><dd><p>Overlap matrix in spin box form</p>
|
|
|
</dd>
|
|
|
<dt>sc_off<span class="classifier">list</span></dt><dd><p>supercell indexes of the Hamiltonian</p>
|
|
|
</dd>
|
|
|
<dt>k<span class="classifier">tuple, optional</span></dt><dd><p>The k point where the matrices are set up. Defaults to (0, 0, 0)</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><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>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>traced<span class="classifier">np.array_like</span></dt><dd><p>The trace of a matrix or a matrix product</p>
|
|
|
</dd>
|
|
|
<dt>we<span class="classifier">float</span></dt><dd><p>The weight of a point on the contour</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>float</dt><dd><p>The energy calculated from the integral formula</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>emin<span class="classifier">int, optional</span></dt><dd><p>Energy minimum of the contour. Defaults to -20</p>
|
|
|
</dd>
|
|
|
<dt>emax<span class="classifier">float, optional</span></dt><dd><p>Energy maximum of the contour. Defaults to 0.0, so the Fermi level</p>
|
|
|
</dd>
|
|
|
<dt>enum<span class="classifier">int, optional</span></dt><dd><p>Number of sample points along the contour. Defaults to 42</p>
|
|
|
</dd>
|
|
|
<dt>p<span class="classifier">int, optional</span></dt><dd><p>Shape parameter that describes the distribution of the sample points. Defaults to 150</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>ccont</dt><dd><p>Contains all the information for the contour integral</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>dirs<span class="classifier">str, optional</span></dt><dd><p>Directions of the k points in the Brillouin zone. They are the three lattice vectors. Defaults to “xyz”</p>
|
|
|
</dd>
|
|
|
<dt>NUMK<span class="classifier">int, optional</span></dt><dd><p>The number of k points in a direction. Defaults to 20</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><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>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>eigfile<span class="classifier">str</span></dt><dd><p>The path to the .EIG file</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>float</dt><dd><p>The energy minimum</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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="simple">
|
|
|
<dt>Args:</dt><dd><dl class="simple">
|
|
|
<dt>u<span class="classifier">list or np.array_like</span></dt><dd><p>The direction</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</dd>
|
|
|
<dt>Returns:</dt><dd><dl class="simple">
|
|
|
<dt>np.array_like</dt><dd><p>Arbitrary direction in the base of the Pauli matrices</p>
|
|
|
</dd>
|
|
|
</dl>
|
|
|
</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>
|
|
|
<p>Docstring in init.</p>
|
|
|
</section>
|
|
|
</section>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
|
|
<a href="modules.html" class="btn btn-neutral float-left" title="src" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
|
|
<a href="environment.html" class="btn btn-neutral float-right" title="Environment variables" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
|
|
</div>
|
|
|
|
|
|
<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> |