now we have a working documentation

class-solution
Daniel Pozsar 2 months ago
parent 38a3be0558
commit b4549fe5b2

@ -55,9 +55,16 @@ pre-commit install
pre-commit run --all-files
```
To build the documentation navigate to the `docs/source` folder and run `make clean` and `make html`. After this the html page can be found in `docs/source/_build/html`.
To build the documentation navigate to the `docs/source` folder. Then autogenerate the documentation and build. After this the html page can be found in `docs/source/_build/html`. Follow the commands below.
```
cd docs/source
sphinx-apidoc -o ./implementation/ ../../src/
make clean
make html
```
To build a pdf containing the documentation instead of make, first navigate to the `docs/source` folde, then use the rst2pdf extension.
```
cd docs/source
sphinx-apidoc -o ./implementation/ ../../src/
sphinx-build -b pdf . _build/pdf
```

Binary file not shown.

@ -1,2 +0,0 @@
Environment variables
=====================

@ -1,53 +0,0 @@
grogupy package
===============
Submodules
----------
grogupy.core module
-------------------
.. automodule:: grogupy.core
:members:
:undoc-members:
:show-inheritance:
grogupy.grogu module
--------------------
.. automodule:: grogupy.grogu
:members:
:undoc-members:
:show-inheritance:
grogupy.io module
-----------------
.. automodule:: grogupy.io
:members:
:undoc-members:
:show-inheritance:
grogupy.magnetism module
------------------------
.. automodule:: grogupy.magnetism
:members:
:undoc-members:
:show-inheritance:
grogupy.utilities module
------------------------
.. automodule:: grogupy.utilities
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: grogupy
:members:
:undoc-members:
:show-inheritance:

@ -1,11 +0,0 @@
Implementation
==============
.. autosummary::
:toctree: generated
:recursive:
core
magnetism
utilities
io

@ -1,131 +0,0 @@
<!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>Environment variables &mdash; 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="Contributing to grogupy" href="dev/index.html" />
<link rel="prev" title="io" href="implementation/generated/io.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="implementation/index.html">Implementation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">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">Environment variables</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/environment.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="environment-variables">
<h1>Environment variables<a class="headerlink" href="#environment-variables" title="Link to this heading"></a></h1>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="implementation/generated/io.html" class="btn btn-neutral float-left" title="io" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="dev/index.html" class="btn btn-neutral float-right" title="Contributing to grogupy" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; 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>

@ -1,822 +0,0 @@
<!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 &mdash; 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>Greens 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>Greens 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 &gt; 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 &#64; 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>&#169; 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>

@ -1,179 +0,0 @@
<!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 &mdash; 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</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/modules.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">
<h1>grogupy<a class="headerlink" href="#grogupy" title="Link to this heading"></a></h1>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="grogupy.html">grogupy package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy.core">grogupy.core module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#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.html#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.html#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.html#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.html#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.html#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.html#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="grogupy.html#module-grogupy.grogu">grogupy.grogu module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy.io">grogupy.io module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#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.html#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.html#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.html#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.html#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.html#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="grogupy.html#module-grogupy.magnetism">grogupy.magnetism module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#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.html#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.html#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.html#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.html#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="grogupy.html#module-grogupy.utilities">grogupy.utilities module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#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.html#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.html#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.html#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.html#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.html#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.html#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.html#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.html#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.html#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="grogupy.html#module-grogupy">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</section>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; 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>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -1,2 +0,0 @@
Environment variables
=====================

@ -1,53 +0,0 @@
grogupy package
===============
Submodules
----------
grogupy.core module
-------------------
.. automodule:: grogupy.core
:members:
:undoc-members:
:show-inheritance:
grogupy.grogu module
--------------------
.. automodule:: grogupy.grogu
:members:
:undoc-members:
:show-inheritance:
grogupy.io module
-----------------
.. automodule:: grogupy.io
:members:
:undoc-members:
:show-inheritance:
grogupy.magnetism module
------------------------
.. automodule:: grogupy.magnetism
:members:
:undoc-members:
:show-inheritance:
grogupy.utilities module
------------------------
.. automodule:: grogupy.utilities
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: grogupy
:members:
:undoc-members:
:show-inheritance:

@ -1,11 +0,0 @@
Implementation
==============
.. autosummary::
:toctree: generated
:recursive:
core
magnetism
utilities
io

@ -53,8 +53,9 @@
</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>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/modules.html">src</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/grogupy.html">grogupy package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
@ -119,7 +120,7 @@
<div class="viewcode-block" id="parallel_Gk">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.parallel_Gk">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.parallel_Gk">[docs]</a>
<span class="k">def</span> <span class="nf">parallel_Gk</span><span class="p">(</span><span class="n">HK</span><span class="p">,</span> <span class="n">SK</span><span class="p">,</span> <span class="n">eran</span><span class="p">,</span> <span class="n">eset</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the Greens function by inversion.</span>
@ -146,7 +147,7 @@
<div class="viewcode-block" id="sequential_GK">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.sequential_GK">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.sequential_GK">[docs]</a>
<span class="k">def</span> <span class="nf">sequential_GK</span><span class="p">(</span><span class="n">HK</span><span class="p">,</span> <span class="n">SK</span><span class="p">,</span> <span class="n">eran</span><span class="p">,</span> <span class="n">eset</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the Greens function by inversion.</span>
@ -178,7 +179,7 @@
<div class="viewcode-block" id="calc_Vu">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.calc_Vu">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.calc_Vu">[docs]</a>
<span class="k">def</span> <span class="nf">calc_Vu</span><span class="p">(</span><span class="n">H</span><span class="p">,</span> <span class="n">Tu</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the local perturbation in case of a spin rotation.</span>
@ -203,7 +204,7 @@
<div class="viewcode-block" id="remove_clutter_for_save">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.remove_clutter_for_save">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.remove_clutter_for_save">[docs]</a>
<span class="k">def</span> <span class="nf">remove_clutter_for_save</span><span class="p">(</span><span class="n">pairs</span><span class="p">,</span> <span class="n">magnetic_entities</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Removes unimportant data from the dictionaries.</span>
@ -240,7 +241,7 @@
<div class="viewcode-block" id="build_hh_ss">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.build_hh_ss">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.build_hh_ss">[docs]</a>
<span class="k">def</span> <span class="nf">build_hh_ss</span><span class="p">(</span><span class="n">dh</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It builds the Hamiltonian and Overlap matrix from the sisl.dh class.</span>
@ -299,7 +300,7 @@
<span class="p">[</span>
<span class="n">U</span><span class="o">.</span><span class="n">T</span>
<div class="viewcode-block" id="setup_pairs_and_magnetic_entities">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.setup_pairs_and_magnetic_entities">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.setup_pairs_and_magnetic_entities">[docs]</a>
<span class="o">@</span> <span class="n">np</span><span class="o">.</span><span class="n">block</span><span class="p">([[</span><span class="n">h11</span><span class="p">[:,</span> <span class="p">:,</span> <span class="n">i</span><span class="p">],</span> <span class="n">h12</span><span class="p">[:,</span> <span class="p">:,</span> <span class="n">i</span><span class="p">]],</span> <span class="p">[</span><span class="n">h21</span><span class="p">[:,</span> <span class="p">:,</span> <span class="n">i</span><span class="p">],</span> <span class="n">h22</span><span class="p">[:,</span> <span class="p">:,</span> <span class="n">i</span><span class="p">]]])</span>
<span class="o">@</span> <span class="n">U</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">dh</span><span class="o">.</span><span class="n">lattice</span><span class="o">.</span><span class="n">nsc</span><span class="o">.</span><span class="n">prod</span><span class="p">())</span>
@ -474,7 +475,7 @@
<div class="viewcode-block" id="onsite_projection">
<a class="viewcode-back" href="../../grogupy.html#grogupy.core.onsite_projection">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.onsite_projection">[docs]</a>
<span class="k">def</span> <span class="nf">onsite_projection</span><span class="p">(</span><span class="n">matrix</span><span class="p">,</span> <span class="n">idx1</span><span class="p">,</span> <span class="n">idx2</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It produces the slices of a matrix for the on site projection.</span>

@ -53,8 +53,9 @@
</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>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/modules.html">src</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/grogupy.html">grogupy package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
@ -140,7 +141,7 @@
<div class="viewcode-block" id="main">
<a class="viewcode-back" href="../../grogupy.html#grogupy.grogu.main">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.grogu.html#grogupy.grogu.main">[docs]</a>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span>
<span class="c1"># runtime information</span>
<span class="n">times</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>

@ -53,8 +53,9 @@
</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>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/modules.html">src</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/grogupy.html">grogupy package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
@ -149,7 +150,7 @@
<div class="viewcode-block" id="save_pickle">
<a class="viewcode-back" href="../../grogupy.html#grogupy.io.save_pickle">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.save_pickle">[docs]</a>
<span class="k">def</span> <span class="nf">save_pickle</span><span class="p">(</span><span class="n">outfile</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Saves the data in the outfile with pickle.</span>
@ -167,7 +168,7 @@
<div class="viewcode-block" id="load_pickle">
<a class="viewcode-back" href="../../grogupy.html#grogupy.io.load_pickle">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.load_pickle">[docs]</a>
<span class="k">def</span> <span class="nf">load_pickle</span><span class="p">(</span><span class="n">infile</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Loads the data from the infile with pickle.</span>
@ -189,7 +190,7 @@
<div class="viewcode-block" id="print_parameters">
<a class="viewcode-back" href="../../grogupy.html#grogupy.io.print_parameters">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_parameters">[docs]</a>
<span class="k">def</span> <span class="nf">print_parameters</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the simulation parameters for the grogu out.</span>
@ -238,7 +239,7 @@
<div class="viewcode-block" id="print_atoms_and_pairs">
<a class="viewcode-back" href="../../grogupy.html#grogupy.io.print_atoms_and_pairs">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_atoms_and_pairs">[docs]</a>
<span class="k">def</span> <span class="nf">print_atoms_and_pairs</span><span class="p">(</span><span class="n">magnetic_entities</span><span class="p">,</span> <span class="n">pairs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the pair and magnetic entity information for the grogu out.</span>
@ -329,7 +330,7 @@
<div class="viewcode-block" id="print_runtime_information">
<a class="viewcode-back" href="../../grogupy.html#grogupy.io.print_runtime_information">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_runtime_information">[docs]</a>
<span class="k">def</span> <span class="nf">print_runtime_information</span><span class="p">(</span><span class="n">times</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the runtime information for the grogu out.</span>
@ -366,7 +367,7 @@
<div class="viewcode-block" id="print_job_description">
<a class="viewcode-back" href="../../grogupy.html#grogupy.io.print_job_description">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_job_description">[docs]</a>
<span class="k">def</span> <span class="nf">print_job_description</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the parameters and the description of the job.</span>

@ -53,8 +53,9 @@
</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>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/modules.html">src</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/grogupy.html">grogupy package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
@ -115,7 +116,7 @@
<div class="viewcode-block" id="blow_up_orbindx">
<a class="viewcode-back" href="../../grogupy.html#grogupy.magnetism.blow_up_orbindx">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.blow_up_orbindx">[docs]</a>
<span class="k">def</span> <span class="nf">blow_up_orbindx</span><span class="p">(</span><span class="n">orb_indices</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Function to blow up orbital indices to make SPIN BOX indices.</span>
@ -135,7 +136,7 @@
<div class="viewcode-block" id="spin_tracer">
<a class="viewcode-back" href="../../grogupy.html#grogupy.magnetism.spin_tracer">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.spin_tracer">[docs]</a>
<span class="k">def</span> <span class="nf">spin_tracer</span><span class="p">(</span><span class="n">M</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Spin tracer utility.</span>
@ -172,7 +173,7 @@
<div class="viewcode-block" id="parse_magnetic_entity">
<a class="viewcode-back" href="../../grogupy.html#grogupy.magnetism.parse_magnetic_entity">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.parse_magnetic_entity">[docs]</a>
<span class="k">def</span> <span class="nf">parse_magnetic_entity</span><span class="p">(</span><span class="n">dh</span><span class="p">,</span> <span class="n">atom</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Function to define orbital indexes of a given magnetic entity.</span>
@ -214,7 +215,7 @@
<div class="viewcode-block" id="calculate_anisotropy_tensor">
<a class="viewcode-back" href="../../grogupy.html#grogupy.magnetism.calculate_anisotropy_tensor">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.calculate_anisotropy_tensor">[docs]</a>
<span class="k">def</span> <span class="nf">calculate_anisotropy_tensor</span><span class="p">(</span><span class="n">mag_ent</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the renormalized anisotropy tensor from the energies.</span>
@ -247,7 +248,7 @@
<div class="viewcode-block" id="calculate_exchange_tensor">
<a class="viewcode-back" href="../../grogupy.html#grogupy.magnetism.calculate_exchange_tensor">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.calculate_exchange_tensor">[docs]</a>
<span class="k">def</span> <span class="nf">calculate_exchange_tensor</span><span class="p">(</span><span class="n">pair</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the exchange tensor from the energies.</span>

@ -53,8 +53,9 @@
</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>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/modules.html">src</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/grogupy.html">grogupy package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../implementation/environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
@ -123,7 +124,7 @@
<div class="viewcode-block" id="commutator">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.commutator">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.commutator">[docs]</a>
<span class="k">def</span> <span class="nf">commutator</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Shorthand for commutator.</span>
@ -146,7 +147,7 @@
<span class="c1"># define some useful functions</span>
<div class="viewcode-block" id="hsk">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.hsk">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.hsk">[docs]</a>
<span class="k">def</span> <span class="nf">hsk</span><span class="p">(</span><span class="n">H</span><span class="p">,</span> <span class="n">ss</span><span class="p">,</span> <span class="n">sc_off</span><span class="p">,</span> <span class="n">k</span><span class="o">=</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Speed up Hk and Sk generation.</span>
@ -185,7 +186,7 @@
<div class="viewcode-block" id="make_kset">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.make_kset">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.make_kset">[docs]</a>
<span class="k">def</span> <span class="nf">make_kset</span><span class="p">(</span><span class="n">dirs</span><span class="o">=</span><span class="s2">&quot;xyz&quot;</span><span class="p">,</span> <span class="n">NUMK</span><span class="o">=</span><span class="mi">20</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Simple k-grid generator to sample the Brillouin zone.</span>
@ -226,7 +227,7 @@
<div class="viewcode-block" id="make_contour">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.make_contour">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.make_contour">[docs]</a>
<span class="k">def</span> <span class="nf">make_contour</span><span class="p">(</span><span class="n">emin</span><span class="o">=-</span><span class="mi">20</span><span class="p">,</span> <span class="n">emax</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">enum</span><span class="o">=</span><span class="mi">42</span><span class="p">,</span> <span class="n">p</span><span class="o">=</span><span class="mi">150</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;A more sophisticated contour generator.</span>
@ -275,7 +276,7 @@
<div class="viewcode-block" id="tau_u">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.tau_u">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.tau_u">[docs]</a>
<span class="k">def</span> <span class="nf">tau_u</span><span class="p">(</span><span class="n">u</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Pauli matrix in direction u.</span>
@ -299,7 +300,7 @@
<span class="c1">#</span>
<div class="viewcode-block" id="crossM">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.crossM">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.crossM">[docs]</a>
<span class="k">def</span> <span class="nf">crossM</span><span class="p">(</span><span class="n">u</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Definition for the cross-product matrix.</span>
@ -318,7 +319,7 @@
<div class="viewcode-block" id="RotM">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.RotM">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.RotM">[docs]</a>
<span class="k">def</span> <span class="nf">RotM</span><span class="p">(</span><span class="n">theta</span><span class="p">,</span> <span class="n">u</span><span class="p">,</span> <span class="n">eps</span><span class="o">=</span><span class="mf">1e-10</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Definition of rotation matrix with angle theta around direction u.</span>
@ -351,7 +352,7 @@
<div class="viewcode-block" id="RotMa2b">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.RotMa2b">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.RotMa2b">[docs]</a>
<span class="k">def</span> <span class="nf">RotMa2b</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">eps</span><span class="o">=</span><span class="mf">1e-10</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Definition of rotation matrix rotating unit vector a to unit vector b.</span>
@ -381,7 +382,7 @@
<div class="viewcode-block" id="read_siesta_emin">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.read_siesta_emin">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.read_siesta_emin">[docs]</a>
<span class="k">def</span> <span class="nf">read_siesta_emin</span><span class="p">(</span><span class="n">eigfile</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It reads the lowest energy level from the siesta run.</span>
@ -404,7 +405,7 @@
<div class="viewcode-block" id="int_de_ke">
<a class="viewcode-back" href="../../grogupy.html#grogupy.utilities.int_de_ke">[docs]</a>
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.int_de_ke">[docs]</a>
<span class="k">def</span> <span class="nf">int_de_ke</span><span class="p">(</span><span class="n">traced</span><span class="p">,</span> <span class="n">we</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It numerically integrates the traced matrix.</span>

@ -53,8 +53,9 @@
</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>
<li class="toctree-l1"><a class="reference internal" href="../implementation/modules.html">src</a></li>
<li class="toctree-l1"><a class="reference internal" href="../implementation/grogupy.html">grogupy package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../implementation/environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>

@ -0,0 +1,4 @@
Environment variables
=====================
Coming soon...

@ -0,0 +1,7 @@
grogupy.core module
===================
.. automodule:: grogupy.core
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,7 @@
grogupy.grogu module
====================
.. automodule:: grogupy.grogu
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,7 @@
grogupy.io module
=================
.. automodule:: grogupy.io
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,7 @@
grogupy.magnetism module
========================
.. automodule:: grogupy.magnetism
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,22 @@
grogupy package
===============
Submodules
----------
.. toctree::
:maxdepth: 4
grogupy.core
grogupy.grogu
grogupy.io
grogupy.magnetism
grogupy.utilities
Module contents
---------------
.. automodule:: grogupy
:members:
:undoc-members:
:show-inheritance:

@ -0,0 +1,7 @@
grogupy.utilities module
========================
.. automodule:: grogupy.utilities
:members:
:undoc-members:
:show-inheritance:

@ -28,7 +28,7 @@ More on the theoretical background can be seen `here <https://arxiv.org/abs/2309
Basic tutorial on how to use the `grogupy` script.
.. grid-item-card:: -- Implementation
:link: implementation/index
:link: implementation/modules
:link-type: doc
Detailed description of the implementation.
@ -55,8 +55,9 @@ More on the theoretical background can be seen `here <https://arxiv.org/abs/2309
:maxdepth: 2
:caption: Advanced usage
implementation/index
environment
implementation/modules
implementation/grogupy
implementation/environment
.. toctree::
:hidden:

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save