trying module docstrings

class-solution
Daniel Pozsar 2 months ago
parent d79828b9fd
commit fd53e98c25

@ -112,6 +112,9 @@
<span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> <span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<span class="c1"># SOFTWARE.</span> <span class="c1"># SOFTWARE.</span>
<span class="sd">&quot;&quot;&quot;Docstring in core.</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">numpy.linalg</span> <span class="kn">import</span> <span class="n">inv</span> <span class="kn">from</span> <span class="nn">numpy.linalg</span> <span class="kn">import</span> <span class="n">inv</span>
@ -119,67 +122,30 @@
<span class="kn">from</span> <span class="nn">grogupy.utilities</span> <span class="kn">import</span> <span class="n">commutator</span> <span class="kn">from</span> <span class="nn">grogupy.utilities</span> <span class="kn">import</span> <span class="n">commutator</span>
<div class="viewcode-block" id="parallel_Gk"> <div class="viewcode-block" id="onsite_projection">
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.parallel_Gk">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.html#grogupy.core.onsite_projection">[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="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;Calculates the Greens function by inversion.</span> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It produces the slices of a matrix for the on site projection.</span>
<span class="sd"> It calculates the Greens function on all the energy levels at the same time.</span>
<span class="sd"> Args:</span>
<span class="sd"> HK : (NO, NO), np.array_like</span>
<span class="sd"> Hamiltonian at a given k point</span>
<span class="sd"> SK : (NO, NO), np.array_like</span>
<span class="sd"> Overlap Matrix at a given k point</span>
<span class="sd"> eran : (eset) np.array_like</span>
<span class="sd"> Energy sample along the contour</span>
<span class="sd"> eset : int</span>
<span class="sd"> Number of energy samples along the contour</span>
<span class="sd"> Returns:</span>
<span class="sd"> Gk : (eset, NO, NO), np.array_like</span>
<span class="sd"> Green&#39;s function at a given k point</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># Calculates the Greens function on all the energy levels</span>
<span class="k">return</span> <span class="n">inv</span><span class="p">(</span><span class="n">SK</span> <span class="o">*</span> <span class="n">eran</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">eset</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="o">-</span> <span class="n">HK</span><span class="p">)</span></div>
<div class="viewcode-block" id="sequential_GK">
<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>
<span class="sd"> It calculates sequentially over the energy levels.</span> <span class="sd"> The slicing is along the last two axes as these contains the orbital indexing.</span>
<span class="sd"> Args:</span> <span class="sd"> Args:</span>
<span class="sd"> HK : (NO, NO), np.array_like</span> <span class="sd"> matrix : (..., :, :) np.array_like</span>
<span class="sd"> Hamiltonian at a given k point</span> <span class="sd"> Some matrix</span>
<span class="sd"> SK : (NO, NO), np.array_like</span> <span class="sd"> idx : np.array_like</span>
<span class="sd"> Overlap Matrix at a given k point</span> <span class="sd"> The indexes of the orbitals</span>
<span class="sd"> eran : (eset) np.array_like</span>
<span class="sd"> Energy sample along the contour</span>
<span class="sd"> eset : int</span>
<span class="sd"> Number of energy samples along the contour</span>
<span class="sd"> Returns:</span> <span class="sd"> Returns:</span>
<span class="sd"> Gk : (eset, NO, NO), np.array_like</span> <span class="sd"> np.array_like</span>
<span class="sd"> Green&#39;s function at a given k point</span> <span class="sd"> Reduced matrix based on the projection</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># creates an empty holder</span> <span class="k">return</span> <span class="n">matrix</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">idx1</span><span class="p">,</span> <span class="p">:][</span><span class="o">...</span><span class="p">,</span> <span class="n">idx2</span><span class="p">]</span></div>
<span class="n">Gk</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="n">eset</span><span class="p">,</span> <span class="n">HK</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">HK</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="n">dtype</span><span class="o">=</span><span class="s2">&quot;complex128&quot;</span><span class="p">)</span>
<span class="c1"># fills the holder sequentially by the Greens function on a given energy</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">eset</span><span class="p">):</span>
<span class="n">Gk</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="n">inv</span><span class="p">(</span><span class="n">SK</span> <span class="o">*</span> <span class="n">eran</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">-</span> <span class="n">HK</span><span class="p">)</span>
<span class="k">return</span> <span class="n">Gk</span></div>
<div class="viewcode-block" id="calc_Vu"> <div class="viewcode-block" id="calc_Vu">
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.calc_Vu">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the local perturbation in case of a spin rotation.</span>
@ -203,45 +169,8 @@
<div class="viewcode-block" id="remove_clutter_for_save">
<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>
<span class="sd"> It is used before saving to throw away data that</span>
<span class="sd"> is not needed for post processing.</span>
<span class="sd"> Args:</span>
<span class="sd"> pairs : dict</span>
<span class="sd"> Contains all the pair information</span>
<span class="sd"> magnetic_entities : dict</span>
<span class="sd"> Contains all the magnetic entity information</span>
<span class="sd"> Returns:</span>
<span class="sd"> pairs : dict</span>
<span class="sd"> Contains all the reduced pair information</span>
<span class="sd"> magnetic_entities : dict</span>
<span class="sd"> Contains all the reduced magnetic entity information</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># remove clutter from magnetic entities and pair information</span>
<span class="k">for</span> <span class="n">pair</span> <span class="ow">in</span> <span class="n">pairs</span><span class="p">:</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gij&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gij_tmp&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gji&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gji_tmp&quot;</span><span class="p">]</span>
<span class="k">for</span> <span class="n">mag_ent</span> <span class="ow">in</span> <span class="n">magnetic_entities</span><span class="p">:</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Gii&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Gii_tmp&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Vu1&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Vu2&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">pairs</span><span class="p">,</span> <span class="n">magnetic_entities</span></div>
<div class="viewcode-block" id="build_hh_ss"> <div class="viewcode-block" id="build_hh_ss">
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.build_hh_ss">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It builds the Hamiltonian and Overlap matrix from the sisl.dh class.</span>
@ -300,7 +229,7 @@
<span class="p">[</span> <span class="p">[</span>
<span class="n">U</span><span class="o">.</span><span class="n">T</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"> <div class="viewcode-block" id="setup_pairs_and_magnetic_entities">
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.setup_pairs_and_magnetic_entities">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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">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="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> <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,25 +403,99 @@
<div class="viewcode-block" id="onsite_projection"> <div class="viewcode-block" id="parallel_Gk">
<a class="viewcode-back" href="../../implementation/grogupy.core.html#grogupy.core.onsite_projection">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.html#grogupy.core.parallel_Gk">[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="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;It produces the slices of a matrix for the on site projection.</span> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the Greens function by inversion.</span>
<span class="sd"> The slicing is along the last two axes as these contains the orbital indexing.</span> <span class="sd"> It calculates the Greens function on all the energy levels at the same time.</span>
<span class="sd"> Args:</span> <span class="sd"> Args:</span>
<span class="sd"> matrix : (..., :, :) np.array_like</span> <span class="sd"> HK : (NO, NO), np.array_like</span>
<span class="sd"> Some matrix</span> <span class="sd"> Hamiltonian at a given k point</span>
<span class="sd"> idx : np.array_like</span> <span class="sd"> SK : (NO, NO), np.array_like</span>
<span class="sd"> The indexes of the orbitals</span> <span class="sd"> Overlap Matrix at a given k point</span>
<span class="sd"> eran : (eset) np.array_like</span>
<span class="sd"> Energy sample along the contour</span>
<span class="sd"> eset : int</span>
<span class="sd"> Number of energy samples along the contour</span>
<span class="sd"> Returns:</span> <span class="sd"> Returns:</span>
<span class="sd"> np.array_like</span> <span class="sd"> Gk : (eset, NO, NO), np.array_like</span>
<span class="sd"> Reduced matrix based on the projection</span> <span class="sd"> Green&#39;s function at a given k point</span>
<span class="sd"> &quot;&quot;&quot;</span> <span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">matrix</span><span class="p">[</span><span class="o">...</span><span class="p">,</span> <span class="n">idx1</span><span class="p">,</span> <span class="p">:][</span><span class="o">...</span><span class="p">,</span> <span class="n">idx2</span><span class="p">]</span></div> <span class="c1"># Calculates the Greens function on all the energy levels</span>
<span class="k">return</span> <span class="n">inv</span><span class="p">(</span><span class="n">SK</span> <span class="o">*</span> <span class="n">eran</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="n">eset</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="o">-</span> <span class="n">HK</span><span class="p">)</span></div>
<div class="viewcode-block" id="sequential_GK">
<a class="viewcode-back" href="../../implementation/grogupy.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>
<span class="sd"> It calculates sequentially over the energy levels.</span>
<span class="sd"> Args:</span>
<span class="sd"> HK : (NO, NO), np.array_like</span>
<span class="sd"> Hamiltonian at a given k point</span>
<span class="sd"> SK : (NO, NO), np.array_like</span>
<span class="sd"> Overlap Matrix at a given k point</span>
<span class="sd"> eran : (eset) np.array_like</span>
<span class="sd"> Energy sample along the contour</span>
<span class="sd"> eset : int</span>
<span class="sd"> Number of energy samples along the contour</span>
<span class="sd"> Returns:</span>
<span class="sd"> Gk : (eset, NO, NO), np.array_like</span>
<span class="sd"> Green&#39;s function at a given k point</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># creates an empty holder</span>
<span class="n">Gk</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="n">shape</span><span class="o">=</span><span class="p">(</span><span class="n">eset</span><span class="p">,</span> <span class="n">HK</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">HK</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="n">dtype</span><span class="o">=</span><span class="s2">&quot;complex128&quot;</span><span class="p">)</span>
<span class="c1"># fills the holder sequentially by the Greens function on a given energy</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">eset</span><span class="p">):</span>
<span class="n">Gk</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">=</span> <span class="n">inv</span><span class="p">(</span><span class="n">SK</span> <span class="o">*</span> <span class="n">eran</span><span class="p">[</span><span class="n">j</span><span class="p">]</span> <span class="o">-</span> <span class="n">HK</span><span class="p">)</span>
<span class="k">return</span> <span class="n">Gk</span></div>
<div class="viewcode-block" id="remove_clutter_for_save">
<a class="viewcode-back" href="../../implementation/grogupy.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>
<span class="sd"> It is used before saving to throw away data that</span>
<span class="sd"> is not needed for post processing.</span>
<span class="sd"> Args:</span>
<span class="sd"> pairs : dict</span>
<span class="sd"> Contains all the pair information</span>
<span class="sd"> magnetic_entities : dict</span>
<span class="sd"> Contains all the magnetic entity information</span>
<span class="sd"> Returns:</span>
<span class="sd"> pairs : dict</span>
<span class="sd"> Contains all the reduced pair information</span>
<span class="sd"> magnetic_entities : dict</span>
<span class="sd"> Contains all the reduced magnetic entity information</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># remove clutter from magnetic entities and pair information</span>
<span class="k">for</span> <span class="n">pair</span> <span class="ow">in</span> <span class="n">pairs</span><span class="p">:</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gij&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gij_tmp&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gji&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">pair</span><span class="p">[</span><span class="s2">&quot;Gji_tmp&quot;</span><span class="p">]</span>
<span class="k">for</span> <span class="n">mag_ent</span> <span class="ow">in</span> <span class="n">magnetic_entities</span><span class="p">:</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Gii&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Gii_tmp&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Vu1&quot;</span><span class="p">]</span>
<span class="k">del</span> <span class="n">mag_ent</span><span class="p">[</span><span class="s2">&quot;Vu2&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">pairs</span><span class="p">,</span> <span class="n">magnetic_entities</span></div>
</pre></div> </pre></div>

@ -112,7 +112,11 @@
<span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> <span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<span class="c1"># SOFTWARE.</span> <span class="c1"># SOFTWARE.</span>
<span class="sd">&quot;&quot;&quot;Docstring in grogupy.</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">warnings</span> <span class="kn">import</span> <span class="nn">warnings</span>
<span class="kn">from</span> <span class="nn">argparse</span> <span class="kn">import</span> <span class="n">ArgumentParser</span>
<span class="kn">from</span> <span class="nn">sys</span> <span class="kn">import</span> <span class="n">getsizeof</span> <span class="kn">from</span> <span class="nn">sys</span> <span class="kn">import</span> <span class="n">getsizeof</span>
<span class="kn">from</span> <span class="nn">timeit</span> <span class="kn">import</span> <span class="n">default_timer</span> <span class="k">as</span> <span class="n">timer</span> <span class="kn">from</span> <span class="nn">timeit</span> <span class="kn">import</span> <span class="n">default_timer</span> <span class="k">as</span> <span class="n">timer</span>
@ -140,48 +144,97 @@
<span class="kn">from</span> <span class="nn">grogupy</span> <span class="kn">import</span> <span class="o">*</span> <span class="kn">from</span> <span class="nn">grogupy</span> <span class="kn">import</span> <span class="o">*</span>
<div class="viewcode-block" id="main"> <div class="viewcode-block" id="parse_command_line">
<a class="viewcode-back" href="../../implementation/grogupy.grogu.html#grogupy.grogu.main">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.html#grogupy.grogu.parse_command_line">[docs]</a>
<span class="k">def</span> <span class="nf">main</span><span class="p">():</span> <span class="k">def</span> <span class="nf">parse_command_line</span><span class="p">():</span>
<span class="c1"># runtime information</span> <span class="w"> </span><span class="sd">&quot;&quot;&quot;This function can read input from the command line.&quot;&quot;&quot;</span>
<span class="n">times</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
<span class="n">times</span><span class="p">[</span><span class="s2">&quot;start_time&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
<span class="c1"># input output stuff</span> <span class="n">parser</span> <span class="o">=</span> <span class="n">ArgumentParser</span><span class="p">()</span>
<span class="c1">######################################################################</span>
<span class="c1">######################################################################</span>
<span class="c1">######################################################################</span>
<span class="n">infile</span> <span class="o">=</span> <span class="s2">&quot;/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf&quot;</span> <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="s2">&quot;./Fe3GeTe2_notebook&quot;</span> <span class="s2">&quot;-i&quot;</span><span class="p">,</span>
<span class="s2">&quot;--input&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;infile&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">str</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Input file name&quot;</span><span class="p">,</span>
<span class="n">required</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;-o&quot;</span><span class="p">,</span>
<span class="s2">&quot;--output&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;outfile&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">str</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Output file name&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">magnetic_entities</span> <span class="o">=</span> <span class="p">[</span> <span class="c1"># parser.add_argument(&#39;--scf-orientation&#39;, dest = &#39;scf_xcf_orientation&#39;, default = None, help = &#39;Output file name&#39;)</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span> <span class="c1"># parser.add_argument(&#39;--ref-orientation&#39;, dest = &#39;ref_xcf_orientations&#39;, default = None, help = &#39;Output file name&#39;)</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span>
<span class="p">]</span>
<span class="n">pairs</span> <span class="o">=</span> <span class="p">[</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">2</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">3</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="p">]</span>
<span class="n">simulation_parameters</span> <span class="o">=</span> <span class="n">default_args</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;infile&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">infile</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;outfile&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">outfile</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kset&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kdirs&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;xy&quot;</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;eset&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">600</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;esetp&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10000</span>
<span class="c1">######################################################################</span> <span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="c1">######################################################################</span> <span class="s2">&quot;--kset&quot;</span><span class="p">,</span>
<span class="c1">######################################################################</span> <span class="n">dest</span><span class="o">=</span><span class="s2">&quot;kset&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;k-space resolution of calculation&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--kdirs&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;kdirs&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">str</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Definition of k-space dimensionality&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--ebot&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;ebot&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">float</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Bottom energy of the contour&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--eset&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;eset&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Number of energy points on the contour&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--eset-p&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;esetp&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Parameter tuning the distribution on the contour&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--parallel-green&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;parallel_solver_for_Gk&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">bool</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;Whether to use the parallel or sequential solver for Greens function&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">parser</span><span class="o">.</span><span class="n">add_argument</span><span class="p">(</span>
<span class="s2">&quot;--padawan-mode&quot;</span><span class="p">,</span>
<span class="n">dest</span><span class="o">=</span><span class="s2">&quot;padawan_mode&quot;</span><span class="p">,</span>
<span class="n">default</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="nb">type</span><span class="o">=</span><span class="nb">bool</span><span class="p">,</span>
<span class="n">help</span><span class="o">=</span><span class="s2">&quot;If it is on it turns on extra helpful information for new users&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">cmd_line_args</span> <span class="o">=</span> <span class="n">parser</span><span class="o">.</span><span class="n">parse_args</span><span class="p">()</span>
<span class="k">return</span> <span class="n">cmd_line_args</span></div>
<div class="viewcode-block" id="main">
<a class="viewcode-back" href="../../implementation/grogupy.html#grogupy.grogu.main">[docs]</a>
<span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">simulation_parameters</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="c1"># runtime information</span>
<span class="n">times</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
<span class="n">times</span><span class="p">[</span><span class="s2">&quot;start_time&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">timer</span><span class="p">()</span>
<span class="c1"># MPI parameters</span> <span class="c1"># MPI parameters</span>
<span class="n">comm</span> <span class="o">=</span> <span class="n">MPI</span><span class="o">.</span><span class="n">COMM_WORLD</span> <span class="n">comm</span> <span class="o">=</span> <span class="n">MPI</span><span class="o">.</span><span class="n">COMM_WORLD</span>
@ -555,7 +608,62 @@
<span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span> <span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="n">main</span><span class="p">()</span> <span class="c1"># loading parameters</span>
<span class="c1"># it is not clear how to give grogu.fdf path...</span>
<span class="n">command_line_arguments</span> <span class="o">=</span> <span class="n">parse_command_line</span><span class="p">()</span>
<span class="n">fdf_arguments</span><span class="p">,</span> <span class="n">magnetic_entities</span><span class="p">,</span> <span class="n">pairs</span> <span class="o">=</span> <span class="n">read_fdf</span><span class="p">(</span><span class="n">command_line_arguments</span><span class="p">[</span><span class="s2">&quot;infile&quot;</span><span class="p">])</span>
<span class="c1"># right now we do not use any of these input, but it shows</span>
<span class="c1"># the order of priority when processing arguments</span>
<span class="n">default_arguments</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">fdf_arguments</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">command_line_arguments</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">simulation_parameters</span> <span class="o">=</span> <span class="n">process_input_args</span><span class="p">(</span>
<span class="n">default_arguments</span><span class="p">,</span> <span class="n">fdf_arguments</span><span class="p">,</span> <span class="n">command_line_arguments</span><span class="p">,</span> <span class="n">ACCEPTED_INPUTS</span>
<span class="p">)</span>
<span class="c1">####################################################################################################</span>
<span class="c1"># This is the input file for now #</span>
<span class="c1">####################################################################################################</span>
<span class="n">magnetic_entities</span> <span class="o">=</span> <span class="p">[</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">l</span><span class="o">=</span><span class="mi">2</span><span class="p">),</span>
<span class="p">]</span>
<span class="n">pairs</span> <span class="o">=</span> <span class="p">[</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">1</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">2</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="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">aj</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="o">-</span><span class="mi">3</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="p">]</span>
<span class="n">simulation_parameters</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;infile&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
<span class="s2">&quot;/Users/danielpozsar/Downloads/nojij/Fe3GeTe2/monolayer/soc/lat3_791/Fe3GeTe2.fdf&quot;</span>
<span class="p">)</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;outfile&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;./Fe3GeTe2_notebook&quot;</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;scf_xcf_orientation&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</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">1</span><span class="p">])</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ref_xcf_orientations&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">o</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</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="n">vw</span><span class="o">=</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]),</span> <span class="n">np</span><span class="o">.</span><span class="n">array</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">1</span><span class="p">])]),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">o</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">]),</span> <span class="n">vw</span><span class="o">=</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</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="n">np</span><span class="o">.</span><span class="n">array</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">1</span><span class="p">])]),</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">o</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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">1</span><span class="p">]),</span> <span class="n">vw</span><span class="o">=</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">1</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="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">([</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">])]),</span>
<span class="p">]</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kset&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">20</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kdirs&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;xy&quot;</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ebot&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;eset&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">600</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;esetp&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">10000</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;parallel_solver_for_Gk&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">False</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;padawan_mode&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">True</span>
<span class="c1">####################################################################################################</span>
<span class="c1"># This is the input file for now #</span>
<span class="c1">####################################################################################################</span>
<span class="n">main</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">,</span> <span class="n">magnetic_entities</span><span class="p">,</span> <span class="n">pairs</span><span class="p">)</span>
</pre></div> </pre></div>
</div> </div>

@ -112,12 +112,30 @@
<span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> <span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<span class="c1"># SOFTWARE.</span> <span class="c1"># SOFTWARE.</span>
<span class="kn">from</span> <span class="nn">argparse</span> <span class="kn">import</span> <span class="n">ArgumentParser</span> <span class="sd">&quot;&quot;&quot;Docstring in io.</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">pickle</span> <span class="kn">import</span> <span class="n">dump</span><span class="p">,</span> <span class="n">load</span> <span class="kn">from</span> <span class="nn">pickle</span> <span class="kn">import</span> <span class="n">dump</span><span class="p">,</span> <span class="n">load</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">sisl.io</span> <span class="kn">import</span> <span class="n">fdfSileSiesta</span>
<span class="n">default_args</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span>
<span class="c1"># list of accepted input parameters</span>
<span class="n">ACCEPTED_INPUTS</span> <span class="o">=</span> <span class="p">[</span>
<span class="s2">&quot;infile&quot;</span><span class="p">,</span>
<span class="s2">&quot;outfile&quot;</span><span class="p">,</span>
<span class="s2">&quot;scf_xcf_orientation&quot;</span><span class="p">,</span>
<span class="s2">&quot;ref_xcf_orientations&quot;</span><span class="p">,</span>
<span class="s2">&quot;kset&quot;</span><span class="p">,</span>
<span class="s2">&quot;kdirs&quot;</span><span class="p">,</span>
<span class="s2">&quot;ebot&quot;</span><span class="p">,</span>
<span class="s2">&quot;eset&quot;</span><span class="p">,</span>
<span class="s2">&quot;esetp&quot;</span><span class="p">,</span>
<span class="s2">&quot;parallel_solver_for_Gk&quot;</span><span class="p">,</span>
<span class="s2">&quot;padawan_mode&quot;</span><span class="p">,</span>
<span class="p">]</span>
<span class="n">default_arguments</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span>
<span class="n">infile</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">infile</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">outfile</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">outfile</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">scf_xcf_orientation</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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">1</span><span class="p">]),</span> <span class="n">scf_xcf_orientation</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</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">1</span><span class="p">]),</span>
@ -135,22 +153,168 @@
<span class="n">padawan_mode</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">padawan_mode</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="p">)</span> <span class="p">)</span>
<span class="c1"># parser = ArgumentParser()</span>
<span class="c1"># parser.add_argument(&#39;--input&#39; , dest = &#39;infile&#39; , default=None , help = &#39;Input file name&#39;)</span> <div class="viewcode-block" id="read_fdf">
<span class="c1"># parser.add_argument(&#39;--output&#39; , dest = &#39;outfile&#39;, default=None , help = &#39;Output file name&#39;)</span> <a class="viewcode-back" href="../../implementation/grogupy.html#grogupy.io.read_fdf">[docs]</a>
<span class="k">def</span> <span class="nf">read_fdf</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It reads the simulation parameters, magnetic entities and pairs from the fdf.</span>
<span class="c1"># parser.add_argument(&#39;--kset&#39; , dest = &#39;kset&#39; , default = 2 , type=int , help = &#39;k-space resolution of Jij calculation&#39;)</span> <span class="sd"> Args:</span>
<span class="c1"># parser.add_argument(&#39;--kdirs&#39; , dest = &#39;kdirs&#39; , default = &#39;xyz&#39; , help = &#39;Definition of k-space dimensionality&#39;)</span> <span class="sd"> path : string</span>
<span class="c1"># parser.add_argument(&#39;--ebot&#39; , dest = &#39;ebot&#39; , default = None , type=float, help = &#39;Bottom energy of the contour&#39;)</span> <span class="sd"> The path to the .fdf file</span>
<span class="c1"># parser.add_argument(&#39;--eset&#39; , dest = &#39;eset&#39; , default = 42 , type=int , help = &#39;Number of energy points on the contour&#39;)</span>
<span class="c1"># parser.add_argument(&#39;--eset-p&#39; , dest = &#39;esetp&#39; , default = 1000 , type=int , help = &#39;Parameter tuning the distribution on the contour&#39;)</span> <span class="sd"> Returns:</span>
<span class="sd"> fdf_arguments : dict</span>
<span class="sd"> The read input arguments from the fdf file</span>
<span class="sd"> magnetic_entities : list</span>
<span class="sd"> It contains the dictionaries associated with the magnetic entities</span>
<span class="sd"> pairs : dict</span>
<span class="sd"> It contains the dictionaries associated with the pair information</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># read fdf file</span>
<span class="n">fdf</span> <span class="o">=</span> <span class="n">fdfSileSiesta</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
<span class="n">fdf_arguments</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">()</span>
<span class="n">InputFile</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;InputFile&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">InputFile</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;infile&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">InputFile</span>
<span class="n">OutputFile</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;OutputFile&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">OutputFile</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;outfile&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">OutputFile</span>
<span class="n">ScfXcfOrientation</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;ScfXcfOrientation&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">ScfXcfOrientation</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;scf_xcf_orientation&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">ScfXcfOrientation</span><span class="p">)</span>
<span class="n">XCF_Rotation</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;XCF_Rotation&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">XCF_Rotation</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">rotations</span> <span class="o">=</span> <span class="p">[]</span>
<span class="c1"># iterate over rows</span>
<span class="k">for</span> <span class="n">rot</span> <span class="ow">in</span> <span class="n">XCF_Rotation</span><span class="p">:</span>
<span class="c1"># convert row to dictionary</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">rot</span><span class="o">.</span><span class="n">split</span><span class="p">()[:</span><span class="mi">9</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">float</span><span class="p">)</span>
<span class="n">o</span> <span class="o">=</span> <span class="n">dat</span><span class="p">[:</span><span class="mi">3</span><span class="p">]</span>
<span class="n">vw</span> <span class="o">=</span> <span class="n">dat</span><span class="p">[</span><span class="mi">3</span><span class="p">:]</span><span class="o">.</span><span class="n">reshape</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
<span class="n">rotations</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">o</span><span class="o">=</span><span class="n">o</span><span class="p">,</span> <span class="n">vw</span><span class="o">=</span><span class="n">vw</span><span class="p">))</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;ref_xcf_orientations&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">rotations</span>
<span class="n">Kset</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;INTEGRAL.Kset&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">Kset</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;kset&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">Kset</span>
<span class="n">Kdirs</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;INTEGRAL.Kdirs&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">Kdirs</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;kdirs&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">Kdirs</span>
<span class="c1"># This is permitted because it means automatic Ebot definition</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;ebot&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;INTEGRAL.Ebot&quot;</span><span class="p">)</span>
<span class="n">Eset</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;INTEGRAL.Eset&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">Eset</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;eset&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">Eset</span>
<span class="n">Esetp</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;INTEGRAL.Esetp&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">Esetp</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;esetp&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">Esetp</span>
<span class="n">ParallelSolver</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;GREEN.ParallelSolver&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">ParallelSolver</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;parallel_solver_for_Gk&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">ParallelSolver</span>
<span class="n">PadawanMode</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;PadawanMode&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">PadawanMode</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">fdf_arguments</span><span class="p">[</span><span class="s2">&quot;padawan_mode&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">PadawanMode</span>
<span class="n">Pairs</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;Pairs&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">Pairs</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">pairs</span> <span class="o">=</span> <span class="p">[]</span>
<span class="c1"># iterate over rows</span>
<span class="k">for</span> <span class="n">fdf_pair</span> <span class="ow">in</span> <span class="n">Pairs</span><span class="p">:</span>
<span class="c1"># convert data</span>
<span class="n">dat</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">fdf_pair</span><span class="o">.</span><span class="n">split</span><span class="p">()[:</span><span class="mi">5</span><span class="p">],</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">int</span><span class="p">)</span>
<span class="c1"># create pair dictionary</span>
<span class="n">my_pair</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">ai</span><span class="o">=</span><span class="n">dat</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">aj</span><span class="o">=</span><span class="n">dat</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">Ruc</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="mi">2</span><span class="p">:]))</span>
<span class="n">pairs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">my_pair</span><span class="p">)</span>
<span class="n">MagneticEntities</span> <span class="o">=</span> <span class="n">fdf</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;MagneticEntities&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">MagneticEntities</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">magnetic_entities</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">mag_ent</span> <span class="ow">in</span> <span class="n">MagneticEntities</span><span class="p">:</span>
<span class="n">row</span> <span class="o">=</span> <span class="n">mag_ent</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
<span class="n">dat</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">string</span> <span class="ow">in</span> <span class="n">row</span><span class="p">:</span>
<span class="k">if</span> <span class="n">string</span><span class="o">.</span><span class="n">find</span><span class="p">(</span><span class="s2">&quot;#&quot;</span><span class="p">)</span> <span class="o">!=</span> <span class="o">-</span><span class="mi">1</span><span class="p">:</span>
<span class="k">break</span>
<span class="n">dat</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">string</span><span class="p">)</span>
<span class="k">if</span> <span class="n">dat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">{</span><span class="s2">&quot;Cluster&quot;</span><span class="p">,</span> <span class="s2">&quot;cluster&quot;</span><span class="p">}:</span>
<span class="n">magnetic_entities</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">_</span><span class="p">)</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">dat</span><span class="p">[</span><span class="mi">1</span><span class="p">:]]))</span>
<span class="k">continue</span>
<span class="k">elif</span> <span class="n">dat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">{</span><span class="s2">&quot;AtomShell&quot;</span><span class="p">,</span> <span class="s2">&quot;Atomshell&quot;</span><span class="p">,</span> <span class="s2">&quot;atomShell&quot;</span><span class="p">,</span> <span class="s2">&quot;atomshell&quot;</span><span class="p">}:</span>
<span class="n">magnetic_entities</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="n">l</span><span class="o">=</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">_</span><span class="p">)</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">dat</span><span class="p">[</span><span class="mi">2</span><span class="p">:]])</span>
<span class="p">)</span>
<span class="k">continue</span>
<span class="k">elif</span> <span class="n">dat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">{</span><span class="s2">&quot;AtomOrbital&quot;</span><span class="p">,</span> <span class="s2">&quot;Atomorbital&quot;</span><span class="p">,</span> <span class="s2">&quot;tomOrbital&quot;</span><span class="p">,</span> <span class="s2">&quot;atomorbital&quot;</span><span class="p">}:</span>
<span class="n">magnetic_entities</span><span class="o">.</span><span class="n">append</span><span class="p">(</span>
<span class="nb">dict</span><span class="p">(</span><span class="n">atom</span><span class="o">=</span><span class="nb">int</span><span class="p">(</span><span class="n">dat</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="n">orb</span><span class="o">=</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">_</span><span class="p">)</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">dat</span><span class="p">[</span><span class="mi">2</span><span class="p">:]])</span>
<span class="p">)</span>
<span class="k">continue</span>
<span class="k">elif</span> <span class="n">dat</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">in</span> <span class="p">{</span><span class="s2">&quot;Orbitals&quot;</span><span class="p">,</span> <span class="s2">&quot;orbitals&quot;</span><span class="p">}:</span>
<span class="n">magnetic_entities</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">orb</span><span class="o">=</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">_</span><span class="p">)</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">dat</span><span class="p">[</span><span class="mi">1</span><span class="p">:]]))</span>
<span class="k">continue</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Unrecognizable magnetic entity in .fdf!&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">fdf_arguments</span><span class="p">,</span> <span class="n">magnetic_entities</span><span class="p">,</span> <span class="n">pairs</span></div>
<div class="viewcode-block" id="process_input_args">
<a class="viewcode-back" href="../../implementation/grogupy.html#grogupy.io.process_input_args">[docs]</a>
<span class="k">def</span> <span class="nf">process_input_args</span><span class="p">(</span>
<span class="n">default_arguments</span><span class="p">,</span>
<span class="n">fdf_arguments</span><span class="p">,</span>
<span class="n">command_line_arguments</span><span class="p">,</span>
<span class="n">accepted_inputs</span><span class="o">=</span><span class="n">ACCEPTED_INPUTS</span><span class="p">,</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;It returns the final simulation parameters based on the inputs.</span>
<span class="sd"> The merging is done in the order of priority:</span>
<span class="sd"> 1. command line arguments</span>
<span class="sd"> 2. fdf arguments</span>
<span class="sd"> 3. default arguments</span>
<span class="sd"> Args:</span>
<span class="sd"> default_arguments : dict</span>
<span class="sd"> Default arguments from grogupy</span>
<span class="sd"> fdf_arguments : dict</span>
<span class="sd"> Arguments read from the fdf input file</span>
<span class="sd"> command_line_arguments : dict</span>
<span class="sd"> Arguments from the command line</span>
<span class="sd"> Returns:</span>
<span class="sd"> dict</span>
<span class="sd"> The final simulation parameters</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1"># iterate over fdf_arguments and update default arguments</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">fdf_arguments</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
<span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">accepted_inputs</span><span class="p">:</span>
<span class="n">default_arguments</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
<span class="c1"># iterate over command_line_arguments and update default arguments</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">command_line_arguments</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
<span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">accepted_inputs</span><span class="p">:</span>
<span class="n">default_arguments</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
<span class="k">return</span> <span class="n">default_arguments</span></div>
<span class="c1"># cmd_line_args = parser.parse_args()</span>
<div class="viewcode-block" id="save_pickle"> <div class="viewcode-block" id="save_pickle">
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.save_pickle">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Saves the data in the outfile with pickle.</span>
@ -168,7 +332,7 @@
<div class="viewcode-block" id="load_pickle"> <div class="viewcode-block" id="load_pickle">
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.load_pickle">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Loads the data from the infile with pickle.</span>
@ -189,8 +353,69 @@
<div class="viewcode-block" id="print_job_description">
<a class="viewcode-back" href="../../implementation/grogupy.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>
<span class="sd"> Args:</span>
<span class="sd"> simulation_parameters : dict</span>
<span class="sd"> It contains the simulations parameters</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Input file: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;infile&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Output file: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;outfile&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;Number of nodes in the parallel cluster: &quot;</span><span class="p">,</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;parallel_size&quot;</span><span class="p">],</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;parallel_solver_for_Gk&quot;</span><span class="p">]:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;solver used for Greens function calculation: parallel&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;solver used for Greens function calculation: sequential&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Cell [Ang]: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;cell&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;DFT axis: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;scf_xcf_orientation&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Quantization axis and perpendicular rotation directions:&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">ref</span> <span class="ow">in</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ref_xcf_orientations&quot;</span><span class="p">]:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">ref</span><span class="p">[</span><span class="s2">&quot;o&quot;</span><span class="p">],</span> <span class="s2">&quot; --» &quot;</span><span class="p">,</span> <span class="n">ref</span><span class="p">[</span><span class="s2">&quot;vw&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Parameters for the contour integral:&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Number of k points: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kset&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;k point directions: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kdirs&quot;</span><span class="p">])</span>
<span class="k">if</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;automatic_ebot&quot;</span><span class="p">]:</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;Ebot: &quot;</span><span class="p">,</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ebot&quot;</span><span class="p">],</span>
<span class="s2">&quot; WARNING: This was automatically determined!&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Ebot: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ebot&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Eset: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;eset&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Esetp: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;esetp&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span></div>
<div class="viewcode-block" id="print_parameters"> <div class="viewcode-block" id="print_parameters">
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_parameters">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the simulation parameters for the grogu out.</span>
@ -239,7 +464,7 @@
<div class="viewcode-block" id="print_atoms_and_pairs"> <div class="viewcode-block" id="print_atoms_and_pairs">
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_atoms_and_pairs">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the pair and magnetic entity information for the grogu out.</span>
@ -330,7 +555,7 @@
<div class="viewcode-block" id="print_runtime_information"> <div class="viewcode-block" id="print_runtime_information">
<a class="viewcode-back" href="../../implementation/grogupy.io.html#grogupy.io.print_runtime_information">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It prints the runtime information for the grogu out.</span>
@ -364,67 +589,6 @@
<span class="sa">f</span><span class="s2">&quot;Calculate energies and magnetic components: </span><span class="si">{</span><span class="n">times</span><span class="p">[</span><span class="s1">&#39;end_time&#39;</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">times</span><span class="p">[</span><span class="s1">&#39;green_function_inversion_time&#39;</span><span class="p">]</span><span class="si">:</span><span class="s2">.3f</span><span class="si">}</span><span class="s2"> s&quot;</span> <span class="sa">f</span><span class="s2">&quot;Calculate energies and magnetic components: </span><span class="si">{</span><span class="n">times</span><span class="p">[</span><span class="s1">&#39;end_time&#39;</span><span class="p">]</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">times</span><span class="p">[</span><span class="s1">&#39;green_function_inversion_time&#39;</span><span class="p">]</span><span class="si">:</span><span class="s2">.3f</span><span class="si">}</span><span class="s2"> s&quot;</span>
<span class="p">)</span></div> <span class="p">)</span></div>
<div class="viewcode-block" id="print_job_description">
<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>
<span class="sd"> Args:</span>
<span class="sd"> simulation_parameters : dict</span>
<span class="sd"> It contains the simulations parameters</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Input file: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;infile&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Output file: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;outfile&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;Number of nodes in the parallel cluster: &quot;</span><span class="p">,</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;parallel_size&quot;</span><span class="p">],</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;parallel_solver_for_Gk&quot;</span><span class="p">]:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;solver used for Greens function calculation: parallel&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;solver used for Greens function calculation: sequential&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Cell [Ang]: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;cell&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;DFT axis: &quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;scf_xcf_orientation&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Quantization axis and perpendicular rotation directions:&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">ref</span> <span class="ow">in</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ref_xcf_orientations&quot;</span><span class="p">]:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">ref</span><span class="p">[</span><span class="s2">&quot;o&quot;</span><span class="p">],</span> <span class="s2">&quot; --» &quot;</span><span class="p">,</span> <span class="n">ref</span><span class="p">[</span><span class="s2">&quot;vw&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Parameters for the contour integral:&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Number of k points: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kset&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;k point directions: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;kdirs&quot;</span><span class="p">])</span>
<span class="k">if</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;automatic_ebot&quot;</span><span class="p">]:</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;Ebot: &quot;</span><span class="p">,</span>
<span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ebot&quot;</span><span class="p">],</span>
<span class="s2">&quot; WARNING: This was automatically determined!&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Ebot: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;ebot&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Eset: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;eset&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Esetp: &quot;</span><span class="p">,</span> <span class="n">simulation_parameters</span><span class="p">[</span><span class="s2">&quot;esetp&quot;</span><span class="p">])</span>
<span class="nb">print</span><span class="p">(</span>
<span class="s2">&quot;================================================================================================================================================================&quot;</span>
<span class="p">)</span></div>
</pre></div> </pre></div>
</div> </div>

@ -112,11 +112,14 @@
<span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> <span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<span class="c1"># SOFTWARE.</span> <span class="c1"># SOFTWARE.</span>
<span class="sd">&quot;&quot;&quot;Docstring in magnetism.</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<div class="viewcode-block" id="blow_up_orbindx"> <div class="viewcode-block" id="blow_up_orbindx">
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.blow_up_orbindx">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Function to blow up orbital indices to make SPIN BOX indices.</span>
@ -136,7 +139,7 @@
<div class="viewcode-block" id="spin_tracer"> <div class="viewcode-block" id="spin_tracer">
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.spin_tracer">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Spin tracer utility.</span>
@ -173,7 +176,7 @@
<div class="viewcode-block" id="parse_magnetic_entity"> <div class="viewcode-block" id="parse_magnetic_entity">
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.parse_magnetic_entity">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Function to define orbital indexes of a given magnetic entity.</span>
@ -215,7 +218,7 @@
<div class="viewcode-block" id="calculate_anisotropy_tensor"> <div class="viewcode-block" id="calculate_anisotropy_tensor">
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.calculate_anisotropy_tensor">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the renormalized anisotropy tensor from the energies.</span>
@ -248,7 +251,7 @@
<div class="viewcode-block" id="calculate_exchange_tensor"> <div class="viewcode-block" id="calculate_exchange_tensor">
<a class="viewcode-back" href="../../implementation/grogupy.magnetism.html#grogupy.magnetism.calculate_exchange_tensor">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Calculates the exchange tensor from the energies.</span>

@ -112,6 +112,9 @@
<span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span> <span class="c1"># OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<span class="c1"># SOFTWARE.</span> <span class="c1"># SOFTWARE.</span>
<span class="sd">&quot;&quot;&quot;Docstring in utilities.</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">scipy.special</span> <span class="kn">import</span> <span class="n">roots_legendre</span> <span class="kn">from</span> <span class="nn">scipy.special</span> <span class="kn">import</span> <span class="n">roots_legendre</span>
<span class="kn">from</span> <span class="nn">sisl.io.siesta</span> <span class="kn">import</span> <span class="n">eigSileSiesta</span> <span class="kn">from</span> <span class="nn">sisl.io.siesta</span> <span class="kn">import</span> <span class="n">eigSileSiesta</span>
@ -124,7 +127,7 @@
<div class="viewcode-block" id="commutator"> <div class="viewcode-block" id="commutator">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.commutator">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Shorthand for commutator.</span>
@ -147,7 +150,7 @@
<span class="c1"># define some useful functions</span> <span class="c1"># define some useful functions</span>
<div class="viewcode-block" id="hsk"> <div class="viewcode-block" id="hsk">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.hsk">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Speed up Hk and Sk generation.</span>
@ -186,7 +189,7 @@
<div class="viewcode-block" id="make_kset"> <div class="viewcode-block" id="make_kset">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.make_kset">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Simple k-grid generator to sample the Brillouin zone.</span>
@ -227,7 +230,7 @@
<div class="viewcode-block" id="make_contour"> <div class="viewcode-block" id="make_contour">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.make_contour">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;A more sophisticated contour generator.</span>
@ -276,7 +279,7 @@
<div class="viewcode-block" id="tau_u"> <div class="viewcode-block" id="tau_u">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.tau_u">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Pauli matrix in direction u.</span>
@ -300,7 +303,7 @@
<span class="c1">#</span> <span class="c1">#</span>
<div class="viewcode-block" id="crossM"> <div class="viewcode-block" id="crossM">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.crossM">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Definition for the cross-product matrix.</span>
@ -319,7 +322,7 @@
<div class="viewcode-block" id="RotM"> <div class="viewcode-block" id="RotM">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.RotM">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Definition of rotation matrix with angle theta around direction u.</span>
@ -352,7 +355,7 @@
<div class="viewcode-block" id="RotMa2b"> <div class="viewcode-block" id="RotMa2b">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.RotMa2b">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;Definition of rotation matrix rotating unit vector a to unit vector b.</span>
@ -382,7 +385,7 @@
<div class="viewcode-block" id="read_siesta_emin"> <div class="viewcode-block" id="read_siesta_emin">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.read_siesta_emin">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It reads the lowest energy level from the siesta run.</span>
@ -405,7 +408,7 @@
<div class="viewcode-block" id="int_de_ke"> <div class="viewcode-block" id="int_de_ke">
<a class="viewcode-back" href="../../implementation/grogupy.utilities.html#grogupy.utilities.int_de_ke">[docs]</a> <a class="viewcode-back" href="../../implementation/grogupy.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="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> <span class="w"> </span><span class="sd">&quot;&quot;&quot;It numerically integrates the traced matrix.</span>

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

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

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

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

@ -4,14 +4,45 @@ grogupy package
Submodules Submodules
---------- ----------
.. toctree:: grogupy.core module
:maxdepth: 4 -------------------
grogupy.core .. automodule:: grogupy.core
grogupy.grogu :members:
grogupy.io :undoc-members:
grogupy.magnetism :show-inheritance:
grogupy.utilities
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 Module contents
--------------- ---------------

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

@ -111,11 +111,11 @@
<h2 id="B">B</h2> <h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.magnetism.html#grogupy.magnetism.blow_up_orbindx">blow_up_orbindx() (in module grogupy.magnetism)</a> <li><a href="implementation/grogupy.html#grogupy.magnetism.blow_up_orbindx">blow_up_orbindx() (in module grogupy.magnetism)</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.core.html#grogupy.core.build_hh_ss">build_hh_ss() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.core.build_hh_ss">build_hh_ss() (in module grogupy.core)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -123,17 +123,17 @@
<h2 id="C">C</h2> <h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.core.html#grogupy.core.calc_Vu">calc_Vu() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.core.calc_Vu">calc_Vu() (in module grogupy.core)</a>
</li> </li>
<li><a href="implementation/grogupy.magnetism.html#grogupy.magnetism.calculate_anisotropy_tensor">calculate_anisotropy_tensor() (in module grogupy.magnetism)</a> <li><a href="implementation/grogupy.html#grogupy.magnetism.calculate_anisotropy_tensor">calculate_anisotropy_tensor() (in module grogupy.magnetism)</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.magnetism.html#grogupy.magnetism.calculate_exchange_tensor">calculate_exchange_tensor() (in module grogupy.magnetism)</a> <li><a href="implementation/grogupy.html#grogupy.magnetism.calculate_exchange_tensor">calculate_exchange_tensor() (in module grogupy.magnetism)</a>
</li> </li>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.commutator">commutator() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.commutator">commutator() (in module grogupy.utilities)</a>
</li> </li>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.crossM">crossM() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.crossM">crossM() (in module grogupy.utilities)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -152,14 +152,14 @@
grogupy.core grogupy.core
<ul> <ul>
<li><a href="implementation/grogupy.core.html#module-grogupy.core">module</a> <li><a href="implementation/grogupy.html#module-grogupy.core">module</a>
</li> </li>
</ul></li> </ul></li>
<li> <li>
grogupy.grogu grogupy.grogu
<ul> <ul>
<li><a href="implementation/grogupy.grogu.html#module-grogupy.grogu">module</a> <li><a href="implementation/grogupy.html#module-grogupy.grogu">module</a>
</li> </li>
</ul></li> </ul></li>
</ul></td> </ul></td>
@ -168,21 +168,21 @@
grogupy.io grogupy.io
<ul> <ul>
<li><a href="implementation/grogupy.io.html#module-grogupy.io">module</a> <li><a href="implementation/grogupy.html#module-grogupy.io">module</a>
</li> </li>
</ul></li> </ul></li>
<li> <li>
grogupy.magnetism grogupy.magnetism
<ul> <ul>
<li><a href="implementation/grogupy.magnetism.html#module-grogupy.magnetism">module</a> <li><a href="implementation/grogupy.html#module-grogupy.magnetism">module</a>
</li> </li>
</ul></li> </ul></li>
<li> <li>
grogupy.utilities grogupy.utilities
<ul> <ul>
<li><a href="implementation/grogupy.utilities.html#module-grogupy.utilities">module</a> <li><a href="implementation/grogupy.html#module-grogupy.utilities">module</a>
</li> </li>
</ul></li> </ul></li>
</ul></td> </ul></td>
@ -191,7 +191,7 @@
<h2 id="H">H</h2> <h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.hsk">hsk() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.hsk">hsk() (in module grogupy.utilities)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -199,7 +199,7 @@
<h2 id="I">I</h2> <h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.int_de_ke">int_de_ke() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.int_de_ke">int_de_ke() (in module grogupy.utilities)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -207,7 +207,7 @@
<h2 id="L">L</h2> <h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.io.html#grogupy.io.load_pickle">load_pickle() (in module grogupy.io)</a> <li><a href="implementation/grogupy.html#grogupy.io.load_pickle">load_pickle() (in module grogupy.io)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -215,11 +215,11 @@
<h2 id="M">M</h2> <h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.grogu.html#grogupy.grogu.main">main() (in module grogupy.grogu)</a> <li><a href="implementation/grogupy.html#grogupy.grogu.main">main() (in module grogupy.grogu)</a>
</li> </li>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.make_contour">make_contour() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.make_contour">make_contour() (in module grogupy.utilities)</a>
</li> </li>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.make_kset">make_kset() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.make_kset">make_kset() (in module grogupy.utilities)</a>
</li> </li>
<li> <li>
module module
@ -227,15 +227,15 @@
<ul> <ul>
<li><a href="implementation/grogupy.html#module-grogupy">grogupy</a>, <a href="index.html#module-grogupy">[1]</a> <li><a href="implementation/grogupy.html#module-grogupy">grogupy</a>, <a href="index.html#module-grogupy">[1]</a>
</li> </li>
<li><a href="implementation/grogupy.core.html#module-grogupy.core">grogupy.core</a> <li><a href="implementation/grogupy.html#module-grogupy.core">grogupy.core</a>
</li> </li>
<li><a href="implementation/grogupy.grogu.html#module-grogupy.grogu">grogupy.grogu</a> <li><a href="implementation/grogupy.html#module-grogupy.grogu">grogupy.grogu</a>
</li> </li>
<li><a href="implementation/grogupy.io.html#module-grogupy.io">grogupy.io</a> <li><a href="implementation/grogupy.html#module-grogupy.io">grogupy.io</a>
</li> </li>
<li><a href="implementation/grogupy.magnetism.html#module-grogupy.magnetism">grogupy.magnetism</a> <li><a href="implementation/grogupy.html#module-grogupy.magnetism">grogupy.magnetism</a>
</li> </li>
<li><a href="implementation/grogupy.utilities.html#module-grogupy.utilities">grogupy.utilities</a> <li><a href="implementation/grogupy.html#module-grogupy.utilities">grogupy.utilities</a>
</li> </li>
</ul></li> </ul></li>
</ul></td> </ul></td>
@ -244,7 +244,7 @@
<h2 id="O">O</h2> <h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.core.html#grogupy.core.onsite_projection">onsite_projection() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.core.onsite_projection">onsite_projection() (in module grogupy.core)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -252,19 +252,23 @@
<h2 id="P">P</h2> <h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.core.html#grogupy.core.parallel_Gk">parallel_Gk() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.core.parallel_Gk">parallel_Gk() (in module grogupy.core)</a>
</li> </li>
<li><a href="implementation/grogupy.magnetism.html#grogupy.magnetism.parse_magnetic_entity">parse_magnetic_entity() (in module grogupy.magnetism)</a> <li><a href="implementation/grogupy.html#grogupy.grogu.parse_command_line">parse_command_line() (in module grogupy.grogu)</a>
</li> </li>
<li><a href="implementation/grogupy.io.html#grogupy.io.print_atoms_and_pairs">print_atoms_and_pairs() (in module grogupy.io)</a> <li><a href="implementation/grogupy.html#grogupy.magnetism.parse_magnetic_entity">parse_magnetic_entity() (in module grogupy.magnetism)</a>
</li>
<li><a href="implementation/grogupy.html#grogupy.io.print_atoms_and_pairs">print_atoms_and_pairs() (in module grogupy.io)</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.io.html#grogupy.io.print_job_description">print_job_description() (in module grogupy.io)</a> <li><a href="implementation/grogupy.html#grogupy.io.print_job_description">print_job_description() (in module grogupy.io)</a>
</li>
<li><a href="implementation/grogupy.html#grogupy.io.print_parameters">print_parameters() (in module grogupy.io)</a>
</li> </li>
<li><a href="implementation/grogupy.io.html#grogupy.io.print_parameters">print_parameters() (in module grogupy.io)</a> <li><a href="implementation/grogupy.html#grogupy.io.print_runtime_information">print_runtime_information() (in module grogupy.io)</a>
</li> </li>
<li><a href="implementation/grogupy.io.html#grogupy.io.print_runtime_information">print_runtime_information() (in module grogupy.io)</a> <li><a href="implementation/grogupy.html#grogupy.io.process_input_args">process_input_args() (in module grogupy.io)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -272,15 +276,17 @@
<h2 id="R">R</h2> <h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.read_siesta_emin">read_siesta_emin() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.io.read_fdf">read_fdf() (in module grogupy.io)</a>
</li> </li>
<li><a href="implementation/grogupy.core.html#grogupy.core.remove_clutter_for_save">remove_clutter_for_save() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.read_siesta_emin">read_siesta_emin() (in module grogupy.utilities)</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.RotM">RotM() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.core.remove_clutter_for_save">remove_clutter_for_save() (in module grogupy.core)</a>
</li>
<li><a href="implementation/grogupy.html#grogupy.utilities.RotM">RotM() (in module grogupy.utilities)</a>
</li> </li>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.RotMa2b">RotMa2b() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.RotMa2b">RotMa2b() (in module grogupy.utilities)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -288,15 +294,15 @@
<h2 id="S">S</h2> <h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.io.html#grogupy.io.save_pickle">save_pickle() (in module grogupy.io)</a> <li><a href="implementation/grogupy.html#grogupy.io.save_pickle">save_pickle() (in module grogupy.io)</a>
</li> </li>
<li><a href="implementation/grogupy.core.html#grogupy.core.sequential_GK">sequential_GK() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.core.sequential_GK">sequential_GK() (in module grogupy.core)</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.core.html#grogupy.core.setup_pairs_and_magnetic_entities">setup_pairs_and_magnetic_entities() (in module grogupy.core)</a> <li><a href="implementation/grogupy.html#grogupy.core.setup_pairs_and_magnetic_entities">setup_pairs_and_magnetic_entities() (in module grogupy.core)</a>
</li> </li>
<li><a href="implementation/grogupy.magnetism.html#grogupy.magnetism.spin_tracer">spin_tracer() (in module grogupy.magnetism)</a> <li><a href="implementation/grogupy.html#grogupy.magnetism.spin_tracer">spin_tracer() (in module grogupy.magnetism)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>
@ -304,7 +310,7 @@
<h2 id="T">T</h2> <h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr> <table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="implementation/grogupy.utilities.html#grogupy.utilities.tau_u">tau_u() (in module grogupy.utilities)</a> <li><a href="implementation/grogupy.html#grogupy.utilities.tau_u">tau_u() (in module grogupy.utilities)</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>

@ -22,7 +22,7 @@
<link rel="index" title="Index" href="../genindex.html" /> <link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" /> <link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Contributing to grogupy" href="../dev/index.html" /> <link rel="next" title="Contributing to grogupy" href="../dev/index.html" />
<link rel="prev" title="grogupy.utilities module" href="grogupy.utilities.html" /> <link rel="prev" title="grogupy package" href="grogupy.html" />
</head> </head>
<body class="wy-body-for-nav"> <body class="wy-body-for-nav">
@ -103,7 +103,7 @@
</div> </div>
</div> </div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="grogupy.utilities.html" class="btn btn-neutral float-left" title="grogupy.utilities module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="grogupy.html" class="btn btn-neutral float-left" title="grogupy package" 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> <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> </div>

@ -1,322 +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.core module &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="grogupy.grogu module" href="grogupy.grogu.html" />
<link rel="prev" title="grogupy package" href="grogupy.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
grogupy
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quickstart/index.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cite.html">Citing grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced usage</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="grogupy.html">grogupy package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="grogupy.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="#">grogupy.core module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.build_hh_ss"><code class="docutils literal notranslate"><span class="pre">build_hh_ss()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.calc_Vu"><code class="docutils literal notranslate"><span class="pre">calc_Vu()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.onsite_projection"><code class="docutils literal notranslate"><span class="pre">onsite_projection()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.parallel_Gk"><code class="docutils literal notranslate"><span class="pre">parallel_Gk()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.remove_clutter_for_save"><code class="docutils literal notranslate"><span class="pre">remove_clutter_for_save()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.sequential_GK"><code class="docutils literal notranslate"><span class="pre">sequential_GK()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.core.setup_pairs_and_magnetic_entities"><code class="docutils literal notranslate"><span class="pre">setup_pairs_and_magnetic_entities()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Contributing to grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Extras</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../changelog/index.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bibliography.html">Bibliography</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">grogupy</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="modules.html">src</a></li>
<li class="breadcrumb-item"><a href="grogupy.html">grogupy package</a></li>
<li class="breadcrumb-item active">grogupy.core module</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/implementation/grogupy.core.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="module-grogupy.core">
<span id="grogupy-core-module"></span><h1>grogupy.core module<a class="headerlink" href="#module-grogupy.core" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.build_hh_ss">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">build_hh_ss</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dh</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#build_hh_ss"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.build_hh_ss" title="Link to this definition"></a></dt>
<dd><p>It builds the Hamiltonian and Overlap matrix from the sisl.dh class.</p>
<p>It restructures the data in the SPIN BOX representation, where NS is
the number of supercells and NO is the number of orbitals.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian read in by sisl</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>hh<span class="classifier">(NS, NO, NO) np.array_like</span></dt><dd><p>Hamiltonian in SPIN BOX representation</p>
</dd>
<dt>ss<span class="classifier">(NS, NO, NO) np.array_like</span></dt><dd><p>Overlap matrix in SPIN BOX representation</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.calc_Vu">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">calc_Vu</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">H</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Tu</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#calc_Vu"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.calc_Vu" title="Link to this definition"></a></dt>
<dd><p>Calculates the local perturbation in case of a spin rotation.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>H<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>Hamiltonian</p>
</dd>
<dt>Tu<span class="classifier">(NO, NO) array_like</span></dt><dd><p>Rotation around u</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>Vu1<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>First order perturbed matrix</p>
</dd>
<dt>Vu2<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>Second order perturbed matrix</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.onsite_projection">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">onsite_projection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">matrix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">idx1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">idx2</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#onsite_projection"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.onsite_projection" title="Link to this definition"></a></dt>
<dd><p>It produces the slices of a matrix for the on site projection.</p>
<p>The slicing is along the last two axes as these contains the orbital indexing.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>matrix<span class="classifier">(…, :, :) np.array_like</span></dt><dd><p>Some matrix</p>
</dd>
<dt>idx<span class="classifier">np.array_like</span></dt><dd><p>The indexes of the orbitals</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>Reduced matrix based on the projection</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.parallel_Gk">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">parallel_Gk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">HK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eran</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#parallel_Gk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.parallel_Gk" title="Link to this definition"></a></dt>
<dd><p>Calculates the Greens function by inversion.</p>
<p>It calculates the Greens function on all the energy levels at the same time.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>HK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Hamiltonian at a given k point</p>
</dd>
<dt>SK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Overlap Matrix at a given k point</p>
</dd>
<dt>eran<span class="classifier">(eset) np.array_like</span></dt><dd><p>Energy sample along the contour</p>
</dd>
<dt>eset<span class="classifier">int</span></dt><dd><p>Number of energy samples along the contour</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>Gk<span class="classifier">(eset, NO, NO), np.array_like</span></dt><dd><p>Greens function at a given k point</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.remove_clutter_for_save">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">remove_clutter_for_save</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#remove_clutter_for_save"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.remove_clutter_for_save" title="Link to this definition"></a></dt>
<dd><p>Removes unimportant data from the dictionaries.</p>
<p>It is used before saving to throw away data that
is not needed for post processing.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains all the pair information</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains all the magnetic entity information</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains all the reduced pair information</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains all the reduced magnetic entity information</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.sequential_GK">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">sequential_GK</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">HK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eran</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#sequential_GK"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.sequential_GK" title="Link to this definition"></a></dt>
<dd><p>Calculates the Greens function by inversion.</p>
<p>It calculates sequentially over the energy levels.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>HK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Hamiltonian at a given k point</p>
</dd>
<dt>SK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Overlap Matrix at a given k point</p>
</dd>
<dt>eran<span class="classifier">(eset) np.array_like</span></dt><dd><p>Energy sample along the contour</p>
</dd>
<dt>eset<span class="classifier">int</span></dt><dd><p>Number of energy samples along the contour</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>Gk<span class="classifier">(eset, NO, NO), np.array_like</span></dt><dd><p>Greens function at a given k point</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.setup_pairs_and_magnetic_entities">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">setup_pairs_and_magnetic_entities</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dh</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#setup_pairs_and_magnetic_entities"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.setup_pairs_and_magnetic_entities" title="Link to this definition"></a></dt>
<dd><p>It creates the complete structure of the dictionaries and fills some basic data.</p>
<p>It creates orbital indexes, spin box indexes, coordinates and tags for magnetic entities.
Furthermore it creates the structures for the energies, the perturbed potentials and
the Greens function calculation. It dose the same for the pairs.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains the initial pair information</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains the initial magnetic entity information</p>
</dd>
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian read in by sisl</p>
</dd>
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>A set of parameters from the simulation</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains the initial information and the complete structure</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains the initial information and the complete structure</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="grogupy.html" class="btn btn-neutral float-left" title="grogupy package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="grogupy.grogu.html" class="btn btn-neutral float-right" title="grogupy.grogu module" 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,153 +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.grogu module &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="grogupy.io module" href="grogupy.io.html" />
<link rel="prev" title="grogupy.core module" href="grogupy.core.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
grogupy
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quickstart/index.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cite.html">Citing grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced usage</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="grogupy.html">grogupy package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="grogupy.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">grogupy.grogu module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Contributing to grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Extras</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../changelog/index.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bibliography.html">Bibliography</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">grogupy</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="modules.html">src</a></li>
<li class="breadcrumb-item"><a href="grogupy.html">grogupy package</a></li>
<li class="breadcrumb-item active">grogupy.grogu module</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/implementation/grogupy.grogu.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="module-grogupy.grogu">
<span id="grogupy-grogu-module"></span><h1>grogupy.grogu module<a class="headerlink" href="#module-grogupy.grogu" title="Link to this heading"></a></h1>
<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>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="grogupy.core.html" class="btn btn-neutral float-left" title="grogupy.core module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="grogupy.io.html" class="btn btn-neutral float-right" title="grogupy.io module" 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>

@ -21,7 +21,7 @@
<script src="../_static/js/theme.js"></script> <script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" /> <link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" /> <link rel="search" title="Search" href="../search.html" />
<link rel="next" title="grogupy.core module" href="grogupy.core.html" /> <link rel="next" title="Environment variables" href="environment.html" />
<link rel="prev" title="src" href="modules.html" /> <link rel="prev" title="src" href="modules.html" />
</head> </head>
@ -58,12 +58,52 @@
<ul class="current"> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li> <li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">grogupy package</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">grogupy package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#submodules">Submodules</a><ul> <li class="toctree-l2"><a class="reference internal" href="#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a></li> <li class="toctree-l2"><a class="reference internal" href="#module-grogupy.core">grogupy.core module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a></li> <li class="toctree-l3"><a class="reference internal" href="#grogupy.core.build_hh_ss"><code class="docutils literal notranslate"><span class="pre">build_hh_ss()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a></li> <li class="toctree-l3"><a class="reference internal" href="#grogupy.core.calc_Vu"><code class="docutils literal notranslate"><span class="pre">calc_Vu()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a></li> <li class="toctree-l3"><a class="reference internal" href="#grogupy.core.onsite_projection"><code class="docutils literal notranslate"><span class="pre">onsite_projection()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a></li> <li class="toctree-l3"><a class="reference internal" href="#grogupy.core.parallel_Gk"><code class="docutils literal notranslate"><span class="pre">parallel_Gk()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.remove_clutter_for_save"><code class="docutils literal notranslate"><span class="pre">remove_clutter_for_save()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.sequential_GK"><code class="docutils literal notranslate"><span class="pre">sequential_GK()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.core.setup_pairs_and_magnetic_entities"><code class="docutils literal notranslate"><span class="pre">setup_pairs_and_magnetic_entities()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.grogu">grogupy.grogu module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.grogu.parse_command_line"><code class="docutils literal notranslate"><span class="pre">parse_command_line()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.io">grogupy.io module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.load_pickle"><code class="docutils literal notranslate"><span class="pre">load_pickle()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_atoms_and_pairs"><code class="docutils literal notranslate"><span class="pre">print_atoms_and_pairs()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_job_description"><code class="docutils literal notranslate"><span class="pre">print_job_description()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_parameters"><code class="docutils literal notranslate"><span class="pre">print_parameters()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.print_runtime_information"><code class="docutils literal notranslate"><span class="pre">print_runtime_information()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.process_input_args"><code class="docutils literal notranslate"><span class="pre">process_input_args()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.read_fdf"><code class="docutils literal notranslate"><span class="pre">read_fdf()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.io.save_pickle"><code class="docutils literal notranslate"><span class="pre">save_pickle()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.magnetism">grogupy.magnetism module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.blow_up_orbindx"><code class="docutils literal notranslate"><span class="pre">blow_up_orbindx()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.calculate_anisotropy_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_anisotropy_tensor()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.calculate_exchange_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_exchange_tensor()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.parse_magnetic_entity"><code class="docutils literal notranslate"><span class="pre">parse_magnetic_entity()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.magnetism.spin_tracer"><code class="docutils literal notranslate"><span class="pre">spin_tracer()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy.utilities">grogupy.utilities module</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.RotM"><code class="docutils literal notranslate"><span class="pre">RotM()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.RotMa2b"><code class="docutils literal notranslate"><span class="pre">RotMa2b()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.commutator"><code class="docutils literal notranslate"><span class="pre">commutator()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.crossM"><code class="docutils literal notranslate"><span class="pre">crossM()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.hsk"><code class="docutils literal notranslate"><span class="pre">hsk()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.int_de_ke"><code class="docutils literal notranslate"><span class="pre">int_de_ke()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.make_contour"><code class="docutils literal notranslate"><span class="pre">make_contour()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.make_kset"><code class="docutils literal notranslate"><span class="pre">make_kset()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.read_siesta_emin"><code class="docutils literal notranslate"><span class="pre">read_siesta_emin()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="#grogupy.utilities.tau_u"><code class="docutils literal notranslate"><span class="pre">tau_u()</span></code></a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l2"><a class="reference internal" href="#module-grogupy">Module contents</a></li> <li class="toctree-l2"><a class="reference internal" href="#module-grogupy">Module contents</a></li>
@ -110,57 +150,679 @@
<h1>grogupy package<a class="headerlink" href="#grogupy-package" title="Link to this heading"></a></h1> <h1>grogupy package<a class="headerlink" href="#grogupy-package" title="Link to this heading"></a></h1>
<section id="submodules"> <section id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2> <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this heading"></a></h2>
<div class="toctree-wrapper compound"> </section>
<ul> <section id="module-grogupy.core">
<li class="toctree-l1"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a><ul> <span id="grogupy-core-module"></span><h2>grogupy.core module<a class="headerlink" href="#module-grogupy.core" title="Link to this heading"></a></h2>
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.html#grogupy.core.build_hh_ss"><code class="docutils literal notranslate"><span class="pre">build_hh_ss()</span></code></a></li> <p>Docstring in core.</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.html#grogupy.core.calc_Vu"><code class="docutils literal notranslate"><span class="pre">calc_Vu()</span></code></a></li> <dl class="py function">
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.html#grogupy.core.onsite_projection"><code class="docutils literal notranslate"><span class="pre">onsite_projection()</span></code></a></li> <dt class="sig sig-object py" id="grogupy.core.build_hh_ss">
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.html#grogupy.core.parallel_Gk"><code class="docutils literal notranslate"><span class="pre">parallel_Gk()</span></code></a></li> <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>
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.html#grogupy.core.remove_clutter_for_save"><code class="docutils literal notranslate"><span class="pre">remove_clutter_for_save()</span></code></a></li> <dd><p>It builds the Hamiltonian and Overlap matrix from the sisl.dh class.</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.html#grogupy.core.sequential_GK"><code class="docutils literal notranslate"><span class="pre">sequential_GK()</span></code></a></li> <p>It restructures the data in the SPIN BOX representation, where NS is
<li class="toctree-l2"><a class="reference internal" href="grogupy.core.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> the number of supercells and NO is the number of orbitals.</p>
</ul> <dl class="simple">
</li> <dt>Args:</dt><dd><dl class="simple">
<li class="toctree-l1"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a><ul> <dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian read in by sisl</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.grogu.html#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li> </dd>
</ul> </dl>
</li> </dd>
<li class="toctree-l1"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a><ul> <dt>Returns:</dt><dd><dl class="simple">
<li class="toctree-l2"><a class="reference internal" href="grogupy.io.html#grogupy.io.load_pickle"><code class="docutils literal notranslate"><span class="pre">load_pickle()</span></code></a></li> <dt>hh<span class="classifier">(NS, NO, NO) np.array_like</span></dt><dd><p>Hamiltonian in SPIN BOX representation</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.io.html#grogupy.io.print_atoms_and_pairs"><code class="docutils literal notranslate"><span class="pre">print_atoms_and_pairs()</span></code></a></li> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.io.html#grogupy.io.print_job_description"><code class="docutils literal notranslate"><span class="pre">print_job_description()</span></code></a></li> <dt>ss<span class="classifier">(NS, NO, NO) np.array_like</span></dt><dd><p>Overlap matrix in SPIN BOX representation</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.io.html#grogupy.io.print_parameters"><code class="docutils literal notranslate"><span class="pre">print_parameters()</span></code></a></li> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.io.html#grogupy.io.print_runtime_information"><code class="docutils literal notranslate"><span class="pre">print_runtime_information()</span></code></a></li> </dl>
<li class="toctree-l2"><a class="reference internal" href="grogupy.io.html#grogupy.io.save_pickle"><code class="docutils literal notranslate"><span class="pre">save_pickle()</span></code></a></li> </dd>
</ul> </dl>
</li> </dd></dl>
<li class="toctree-l1"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a><ul>
<li class="toctree-l2"><a class="reference internal" href="grogupy.magnetism.html#grogupy.magnetism.blow_up_orbindx"><code class="docutils literal notranslate"><span class="pre">blow_up_orbindx()</span></code></a></li> <dl class="py function">
<li class="toctree-l2"><a class="reference internal" href="grogupy.magnetism.html#grogupy.magnetism.calculate_anisotropy_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_anisotropy_tensor()</span></code></a></li> <dt class="sig sig-object py" id="grogupy.core.calc_Vu">
<li class="toctree-l2"><a class="reference internal" href="grogupy.magnetism.html#grogupy.magnetism.calculate_exchange_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_exchange_tensor()</span></code></a></li> <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>
<li class="toctree-l2"><a class="reference internal" href="grogupy.magnetism.html#grogupy.magnetism.parse_magnetic_entity"><code class="docutils literal notranslate"><span class="pre">parse_magnetic_entity()</span></code></a></li> <dd><p>Calculates the local perturbation in case of a spin rotation.</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.magnetism.html#grogupy.magnetism.spin_tracer"><code class="docutils literal notranslate"><span class="pre">spin_tracer()</span></code></a></li> <dl class="simple">
</ul> <dt>Args:</dt><dd><dl class="simple">
</li> <dt>H<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>Hamiltonian</p>
<li class="toctree-l1"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a><ul> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.RotM"><code class="docutils literal notranslate"><span class="pre">RotM()</span></code></a></li> <dt>Tu<span class="classifier">(NO, NO) array_like</span></dt><dd><p>Rotation around u</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.RotMa2b"><code class="docutils literal notranslate"><span class="pre">RotMa2b()</span></code></a></li> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.commutator"><code class="docutils literal notranslate"><span class="pre">commutator()</span></code></a></li> </dl>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.crossM"><code class="docutils literal notranslate"><span class="pre">crossM()</span></code></a></li> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.hsk"><code class="docutils literal notranslate"><span class="pre">hsk()</span></code></a></li> <dt>Returns:</dt><dd><dl class="simple">
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.int_de_ke"><code class="docutils literal notranslate"><span class="pre">int_de_ke()</span></code></a></li> <dt>Vu1<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>First order perturbed matrix</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.make_contour"><code class="docutils literal notranslate"><span class="pre">make_contour()</span></code></a></li> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.make_kset"><code class="docutils literal notranslate"><span class="pre">make_kset()</span></code></a></li> <dt>Vu2<span class="classifier">(NO, NO) np.array_like</span></dt><dd><p>Second order perturbed matrix</p>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.read_siesta_emin"><code class="docutils literal notranslate"><span class="pre">read_siesta_emin()</span></code></a></li> </dd>
<li class="toctree-l2"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.tau_u"><code class="docutils literal notranslate"><span class="pre">tau_u()</span></code></a></li> </dl>
</ul> </dd>
</li> </dl>
</ul> </dd></dl>
</div>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.onsite_projection">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">onsite_projection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">matrix</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">idx1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">idx2</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#onsite_projection"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.onsite_projection" title="Link to this definition"></a></dt>
<dd><p>It produces the slices of a matrix for the on site projection.</p>
<p>The slicing is along the last two axes as these contains the orbital indexing.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>matrix<span class="classifier">(…, :, :) np.array_like</span></dt><dd><p>Some matrix</p>
</dd>
<dt>idx<span class="classifier">np.array_like</span></dt><dd><p>The indexes of the orbitals</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>Reduced matrix based on the projection</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.parallel_Gk">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">parallel_Gk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">HK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eran</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#parallel_Gk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.parallel_Gk" title="Link to this definition"></a></dt>
<dd><p>Calculates the Greens function by inversion.</p>
<p>It calculates the Greens function on all the energy levels at the same time.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>HK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Hamiltonian at a given k point</p>
</dd>
<dt>SK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Overlap Matrix at a given k point</p>
</dd>
<dt>eran<span class="classifier">(eset) np.array_like</span></dt><dd><p>Energy sample along the contour</p>
</dd>
<dt>eset<span class="classifier">int</span></dt><dd><p>Number of energy samples along the contour</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>Gk<span class="classifier">(eset, NO, NO), np.array_like</span></dt><dd><p>Greens function at a given k point</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.remove_clutter_for_save">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">remove_clutter_for_save</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#remove_clutter_for_save"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.remove_clutter_for_save" title="Link to this definition"></a></dt>
<dd><p>Removes unimportant data from the dictionaries.</p>
<p>It is used before saving to throw away data that
is not needed for post processing.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains all the pair information</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains all the magnetic entity information</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains all the reduced pair information</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains all the reduced magnetic entity information</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.sequential_GK">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">sequential_GK</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">HK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">SK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eran</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eset</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#sequential_GK"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.sequential_GK" title="Link to this definition"></a></dt>
<dd><p>Calculates the Greens function by inversion.</p>
<p>It calculates sequentially over the energy levels.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>HK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Hamiltonian at a given k point</p>
</dd>
<dt>SK<span class="classifier">(NO, NO), np.array_like</span></dt><dd><p>Overlap Matrix at a given k point</p>
</dd>
<dt>eran<span class="classifier">(eset) np.array_like</span></dt><dd><p>Energy sample along the contour</p>
</dd>
<dt>eset<span class="classifier">int</span></dt><dd><p>Number of energy samples along the contour</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>Gk<span class="classifier">(eset, NO, NO), np.array_like</span></dt><dd><p>Greens function at a given k point</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.core.setup_pairs_and_magnetic_entities">
<span class="sig-prename descclassname"><span class="pre">grogupy.core.</span></span><span class="sig-name descname"><span class="pre">setup_pairs_and_magnetic_entities</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dh</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/core.html#setup_pairs_and_magnetic_entities"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.core.setup_pairs_and_magnetic_entities" title="Link to this definition"></a></dt>
<dd><p>It creates the complete structure of the dictionaries and fills some basic data.</p>
<p>It creates orbital indexes, spin box indexes, coordinates and tags for magnetic entities.
Furthermore it creates the structures for the energies, the perturbed potentials and
the Greens function calculation. It dose the same for the pairs.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains the initial pair information</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains the initial magnetic entity information</p>
</dd>
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian read in by sisl</p>
</dd>
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>A set of parameters from the simulation</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>pairs<span class="classifier">dict</span></dt><dd><p>Contains the initial information and the complete structure</p>
</dd>
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>Contains the initial information and the complete structure</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
<section id="module-grogupy.grogu">
<span id="grogupy-grogu-module"></span><h2>grogupy.grogu module<a class="headerlink" href="#module-grogupy.grogu" title="Link to this heading"></a></h2>
<p>Docstring in grogupy.</p>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.grogu.main">
<span class="sig-prename descclassname"><span class="pre">grogupy.grogu.</span></span><span class="sig-name descname"><span class="pre">main</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/grogu.html#main"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.grogu.main" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.grogu.parse_command_line">
<span class="sig-prename descclassname"><span class="pre">grogupy.grogu.</span></span><span class="sig-name descname"><span class="pre">parse_command_line</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/grogu.html#parse_command_line"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.grogu.parse_command_line" title="Link to this definition"></a></dt>
<dd><p>This function can read input from the command line.</p>
</dd></dl>
</section>
<section id="module-grogupy.io">
<span id="grogupy-io-module"></span><h2>grogupy.io module<a class="headerlink" href="#module-grogupy.io" title="Link to this heading"></a></h2>
<p>Docstring in io.</p>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.load_pickle">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">load_pickle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">infile</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#load_pickle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.load_pickle" title="Link to this definition"></a></dt>
<dd><p>Loads the data from the infile with pickle.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>infile<span class="classifier">str</span></dt><dd><p>Path to infile</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>data<span class="classifier">dict</span></dt><dd><p>A dictionary of data</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_atoms_and_pairs">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_atoms_and_pairs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_atoms_and_pairs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_atoms_and_pairs" title="Link to this definition"></a></dt>
<dd><p>It prints the pair and magnetic entity information for the grogu out.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>It contains the data on the magnetic entities</p>
</dd>
<dt>pairs<span class="classifier">dict</span></dt><dd><p>It contains the data on the pairs</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_job_description">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_job_description</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_job_description"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_job_description" title="Link to this definition"></a></dt>
<dd><p>It prints the parameters and the description of the job.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>It contains the simulations parameters</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_parameters">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_parameters</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_parameters"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_parameters" title="Link to this definition"></a></dt>
<dd><p>It prints the simulation parameters for the grogu out.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>It contains the simulations parameters</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_runtime_information">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_runtime_information</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">times</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_runtime_information"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_runtime_information" title="Link to this definition"></a></dt>
<dd><p>It prints the runtime information for the grogu out.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>times<span class="classifier">dict</span></dt><dd><p>It contains the runtime data</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.process_input_args">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">process_input_args</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_arguments</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fdf_arguments</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">command_line_arguments</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">accepted_inputs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">['infile',</span> <span class="pre">'outfile',</span> <span class="pre">'scf_xcf_orientation',</span> <span class="pre">'ref_xcf_orientations',</span> <span class="pre">'kset',</span> <span class="pre">'kdirs',</span> <span class="pre">'ebot',</span> <span class="pre">'eset',</span> <span class="pre">'esetp',</span> <span class="pre">'parallel_solver_for_Gk',</span> <span class="pre">'padawan_mode']</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#process_input_args"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.process_input_args" title="Link to this definition"></a></dt>
<dd><p>It returns the final simulation parameters based on the inputs.</p>
<p>The merging is done in the order of priority:
1. command line arguments
2. fdf arguments
3. default arguments</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>default_arguments<span class="classifier">dict</span></dt><dd><p>Default arguments from grogupy</p>
</dd>
<dt>fdf_arguments<span class="classifier">dict</span></dt><dd><p>Arguments read from the fdf input file</p>
</dd>
<dt>command_line_arguments<span class="classifier">dict</span></dt><dd><p>Arguments from the command line</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>dict</dt><dd><p>The final simulation parameters</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.read_fdf">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">read_fdf</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#read_fdf"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.read_fdf" title="Link to this definition"></a></dt>
<dd><p>It reads the simulation parameters, magnetic entities and pairs from the fdf.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>path<span class="classifier">string</span></dt><dd><p>The path to the .fdf file</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>fdf_arguments<span class="classifier">dict</span></dt><dd><p>The read input arguments from the fdf file</p>
</dd>
<dt>magnetic_entities<span class="classifier">list</span></dt><dd><p>It contains the dictionaries associated with the magnetic entities</p>
</dd>
<dt>pairs<span class="classifier">dict</span></dt><dd><p>It contains the dictionaries associated with the pair information</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.save_pickle">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">save_pickle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#save_pickle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.save_pickle" title="Link to this definition"></a></dt>
<dd><p>Saves the data in the outfile with pickle.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>outfile<span class="classifier">str</span></dt><dd><p>Path to outfile</p>
</dd>
<dt>data<span class="classifier">dict</span></dt><dd><p>Contains the data</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
<section id="module-grogupy.magnetism">
<span id="grogupy-magnetism-module"></span><h2>grogupy.magnetism module<a class="headerlink" href="#module-grogupy.magnetism" title="Link to this heading"></a></h2>
<p>Docstring in magnetism.</p>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.blow_up_orbindx">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">blow_up_orbindx</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">orb_indices</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#blow_up_orbindx"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.blow_up_orbindx" title="Link to this definition"></a></dt>
<dd><p>Function to blow up orbital indices to make SPIN BOX indices.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>orb_indices<span class="classifier">np.array_like</span></dt><dd><p>These are the indices in ORBITAL BOX</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>orb_indices<span class="classifier">np.array_like</span></dt><dd><p>These are the indices in SPIN BOX</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.calculate_anisotropy_tensor">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">calculate_anisotropy_tensor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mag_ent</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#calculate_anisotropy_tensor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.calculate_anisotropy_tensor" title="Link to this definition"></a></dt>
<dd><p>Calculates the renormalized anisotropy tensor from the energies.</p>
<p>It uses the grogu convention for output.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>mag_ent<span class="classifier">dict</span></dt><dd><p>An element from the magnetic entities</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>K<span class="classifier">np.array_like</span></dt><dd><p>elements of the anisotropy tensor</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.calculate_exchange_tensor">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">calculate_exchange_tensor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pair</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#calculate_exchange_tensor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.calculate_exchange_tensor" title="Link to this definition"></a></dt>
<dd><p>Calculates the exchange tensor from the energies.</p>
<p>It produces the isotropic exchange, the relevant elements
from the Dzyaloshinskii-Morilla (Dm) tensor, the symmetric-anisotropy
and the complete exchange tensor.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>pair<span class="classifier">dict</span></dt><dd><p>An element from the pairs</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>J_iso<span class="classifier">float</span></dt><dd><p>Isotropic exchange (Tr[J] / 3)</p>
</dd>
<dt>J_S<span class="classifier">np.array_like</span></dt><dd><p>Symmetric-anisotropy (J_S = J - J_iso * I &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>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.parse_magnetic_entity">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">parse_magnetic_entity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dh</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">atom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">l</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#parse_magnetic_entity"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.parse_magnetic_entity" title="Link to this definition"></a></dt>
<dd><p>Function to define orbital indexes of a given magnetic entity.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian from sisl</p>
</dd>
<dt>atom<span class="classifier">integer or list of integers, optional</span></dt><dd><p>Defining atom (or atoms) in the unit cell forming the magnetic entity. Defaults to None</p>
</dd>
<dt>l<span class="classifier">integer, optional</span></dt><dd><p>Defining the angular momentum channel. Defaults to None</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>list</dt><dd><p>The orbital indexes of the given magnetic entity</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.spin_tracer">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">spin_tracer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#spin_tracer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.spin_tracer" title="Link to this definition"></a></dt>
<dd><p>Spin tracer utility.</p>
<p>This takes an operator with the orbital-spin sequence:
orbital 1 up,
orbital 1 down,
orbital 2 up,
orbital 2 down,
that is in the SPIN-BOX representation,
and extracts orbital dependent Pauli traces.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>M<span class="classifier">np.array_like</span></dt><dd><p>Traceable matrix</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>dict</dt><dd><p>It contains the traced matrix with “x”, “y”, “z” and “c”</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
<section id="module-grogupy.utilities">
<span id="grogupy-utilities-module"></span><h2>grogupy.utilities module<a class="headerlink" href="#module-grogupy.utilities" title="Link to this heading"></a></h2>
<p>Docstring in utilities.</p>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.RotM">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">RotM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">u</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#RotM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.RotM" title="Link to this definition"></a></dt>
<dd><p>Definition of rotation matrix with angle theta around direction u.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>theta<span class="classifier">float</span></dt><dd><p>The angle of rotation</p>
</dd>
<dt>u<span class="classifier">np.array_like</span></dt><dd><p>The rotation axis</p>
</dd>
<dt>eps<span class="classifier">float, optional</span></dt><dd><p>Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The rotation matrix</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.RotMa2b">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">RotMa2b</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#RotMa2b"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.RotMa2b" title="Link to this definition"></a></dt>
<dd><p>Definition of rotation matrix rotating unit vector a to unit vector b.</p>
<p>Function returns array R such that R &#64; a = b holds.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>a<span class="classifier">np.array_like</span></dt><dd><p>First vector</p>
</dd>
<dt>b<span class="classifier">np.array_like</span></dt><dd><p>Second vector</p>
</dd>
<dt>eps<span class="classifier">float, optional</span></dt><dd><p>Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The rotation matrix with the above property</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.commutator">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">commutator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#commutator"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.commutator" title="Link to this definition"></a></dt>
<dd><p>Shorthand for commutator.</p>
<p>Commutator of two matrices in the mathematical sense.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>a<span class="classifier">np.array_like</span></dt><dd><p>The first matrix</p>
</dd>
<dt>b<span class="classifier">np.array_like</span></dt><dd><p>The second matrix</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The commutator of a and b</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.crossM">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">crossM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">u</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#crossM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.crossM" title="Link to this definition"></a></dt>
<dd><p>Definition for the cross-product matrix.</p>
<p>It acts as a cross product with vector u.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>u<span class="classifier">list or np.array_like</span></dt><dd><p>The second vector in the cross product</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The matrix that represents teh cross product with a vector</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.hsk">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">hsk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">H</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ss</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sc_off</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">k</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">0)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#hsk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.hsk" title="Link to this definition"></a></dt>
<dd><p>Speed up Hk and Sk generation.</p>
<p>Calculates the Hamiltonian and the Overlap matrix at a given k point. It is faster that the sisl version.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>H<span class="classifier">np.array_like</span></dt><dd><p>Hamiltonian in spin box form</p>
</dd>
<dt>ss<span class="classifier">np.array_like</span></dt><dd><p>Overlap matrix in spin box form</p>
</dd>
<dt>sc_off<span class="classifier">list</span></dt><dd><p>supercell indexes of the Hamiltonian</p>
</dd>
<dt>k<span class="classifier">tuple, optional</span></dt><dd><p>The k point where the matrices are set up. Defaults to (0, 0, 0)</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>Hamiltonian at the given k point</p>
</dd>
<dt>np.array_like</dt><dd><p>Overlap matrix at the given k point</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.int_de_ke">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">int_de_ke</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">traced</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">we</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#int_de_ke"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.int_de_ke" title="Link to this definition"></a></dt>
<dd><p>It numerically integrates the traced matrix.</p>
<p>It is a wrapper from numpy.trapz and it contains the
relevant constants to calculate the energy integral from
equation 93 or 96.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>traced<span class="classifier">np.array_like</span></dt><dd><p>The trace of a matrix or a matrix product</p>
</dd>
<dt>we<span class="classifier">float</span></dt><dd><p>The weight of a point on the contour</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>float</dt><dd><p>The energy calculated from the integral formula</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.make_contour">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">make_contour</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">emin</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-20</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">emax</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">42</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">150</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#make_contour"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.make_contour" title="Link to this definition"></a></dt>
<dd><p>A more sophisticated contour generator.</p>
<p>Calculates the parameters for the complex contour integral. It uses the
Legendre-Gauss quadrature method. It returns a class that contains
the information for the contour integral.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>emin<span class="classifier">int, optional</span></dt><dd><p>Energy minimum of the contour. Defaults to -20</p>
</dd>
<dt>emax<span class="classifier">float, optional</span></dt><dd><p>Energy maximum of the contour. Defaults to 0.0, so the Fermi level</p>
</dd>
<dt>enum<span class="classifier">int, optional</span></dt><dd><p>Number of sample points along the contour. Defaults to 42</p>
</dd>
<dt>p<span class="classifier">int, optional</span></dt><dd><p>Shape parameter that describes the distribution of the sample points. Defaults to 150</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>ccont</dt><dd><p>Contains all the information for the contour integral</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.make_kset">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">make_kset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dirs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'xyz'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">NUMK</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">20</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#make_kset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.make_kset" title="Link to this definition"></a></dt>
<dd><p>Simple k-grid generator to sample the Brillouin zone.</p>
<p>Depending on the value of the dirs
argument k sampling in 1,2 or 3 dimensions is generated.
If dirs argument does not contain either of x, y or z
a kset of a single k-pont at the origin is returned. The total number of k points is the NUMK**(dimensions)</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>dirs<span class="classifier">str, optional</span></dt><dd><p>Directions of the k points in the Brillouin zone. They are the three lattice vectors. Defaults to “xyz”</p>
</dd>
<dt>NUMK<span class="classifier">int, optional</span></dt><dd><p>The number of k points in a direction. Defaults to 20</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>An array of k points that uniformly sample the Brillouin zone in the given directions</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.read_siesta_emin">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">read_siesta_emin</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eigfile</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#read_siesta_emin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.read_siesta_emin" title="Link to this definition"></a></dt>
<dd><p>It reads the lowest energy level from the siesta run.</p>
<p>It uses the .EIG file from siesta that contains the eigenvalues.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>eigfile<span class="classifier">str</span></dt><dd><p>The path to the .EIG file</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>float</dt><dd><p>The energy minimum</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.tau_u">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">tau_u</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">u</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#tau_u"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.tau_u" title="Link to this definition"></a></dt>
<dd><p>Pauli matrix in direction u.</p>
<p>Returns the vector u in the basis of the Pauli matrices.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>u<span class="classifier">list or np.array_like</span></dt><dd><p>The direction</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>Arbitrary direction in the base of the Pauli matrices</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section> </section>
<section id="module-grogupy"> <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> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-grogupy" title="Link to this heading"></a></h2>
<p>Docstring in init.</p>
</section> </section>
</section> </section>
@ -169,7 +831,7 @@
</div> </div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="modules.html" class="btn btn-neutral float-left" title="src" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> <a href="modules.html" class="btn btn-neutral float-left" title="src" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="grogupy.core.html" class="btn btn-neutral float-right" title="grogupy.core module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> <a href="environment.html" class="btn btn-neutral float-right" title="Environment variables" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div> </div>
<hr/> <hr/>

@ -1,240 +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.io module &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="grogupy.magnetism module" href="grogupy.magnetism.html" />
<link rel="prev" title="grogupy.grogu module" href="grogupy.grogu.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
grogupy
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quickstart/index.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cite.html">Citing grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced usage</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="grogupy.html">grogupy package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="grogupy.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">grogupy.io module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.io.load_pickle"><code class="docutils literal notranslate"><span class="pre">load_pickle()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.io.print_atoms_and_pairs"><code class="docutils literal notranslate"><span class="pre">print_atoms_and_pairs()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.io.print_job_description"><code class="docutils literal notranslate"><span class="pre">print_job_description()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.io.print_parameters"><code class="docutils literal notranslate"><span class="pre">print_parameters()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.io.print_runtime_information"><code class="docutils literal notranslate"><span class="pre">print_runtime_information()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.io.save_pickle"><code class="docutils literal notranslate"><span class="pre">save_pickle()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Contributing to grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Extras</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../changelog/index.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bibliography.html">Bibliography</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">grogupy</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="modules.html">src</a></li>
<li class="breadcrumb-item"><a href="grogupy.html">grogupy package</a></li>
<li class="breadcrumb-item active">grogupy.io module</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/implementation/grogupy.io.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="module-grogupy.io">
<span id="grogupy-io-module"></span><h1>grogupy.io module<a class="headerlink" href="#module-grogupy.io" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.load_pickle">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">load_pickle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">infile</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#load_pickle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.load_pickle" title="Link to this definition"></a></dt>
<dd><p>Loads the data from the infile with pickle.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>infile<span class="classifier">str</span></dt><dd><p>Path to infile</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>data<span class="classifier">dict</span></dt><dd><p>A dictionary of data</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_atoms_and_pairs">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_atoms_and_pairs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">magnetic_entities</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pairs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_atoms_and_pairs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_atoms_and_pairs" title="Link to this definition"></a></dt>
<dd><p>It prints the pair and magnetic entity information for the grogu out.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>magnetic_entities<span class="classifier">dict</span></dt><dd><p>It contains the data on the magnetic entities</p>
</dd>
<dt>pairs<span class="classifier">dict</span></dt><dd><p>It contains the data on the pairs</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_job_description">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_job_description</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_job_description"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_job_description" title="Link to this definition"></a></dt>
<dd><p>It prints the parameters and the description of the job.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>It contains the simulations parameters</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_parameters">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_parameters</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">simulation_parameters</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_parameters"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_parameters" title="Link to this definition"></a></dt>
<dd><p>It prints the simulation parameters for the grogu out.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>simulation_parameters<span class="classifier">dict</span></dt><dd><p>It contains the simulations parameters</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.print_runtime_information">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">print_runtime_information</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">times</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#print_runtime_information"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.print_runtime_information" title="Link to this definition"></a></dt>
<dd><p>It prints the runtime information for the grogu out.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>times<span class="classifier">dict</span></dt><dd><p>It contains the runtime data</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.io.save_pickle">
<span class="sig-prename descclassname"><span class="pre">grogupy.io.</span></span><span class="sig-name descname"><span class="pre">save_pickle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">outfile</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/io.html#save_pickle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.io.save_pickle" title="Link to this definition"></a></dt>
<dd><p>Saves the data in the outfile with pickle.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>outfile<span class="classifier">str</span></dt><dd><p>Path to outfile</p>
</dd>
<dt>data<span class="classifier">dict</span></dt><dd><p>Contains the data</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="grogupy.grogu.html" class="btn btn-neutral float-left" title="grogupy.grogu module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="grogupy.magnetism.html" class="btn btn-neutral float-right" title="grogupy.magnetism module" 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,263 +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.magnetism module &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="grogupy.utilities module" href="grogupy.utilities.html" />
<link rel="prev" title="grogupy.io module" href="grogupy.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="modules.html">src</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="grogupy.html">grogupy package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="grogupy.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">grogupy.magnetism module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.magnetism.blow_up_orbindx"><code class="docutils literal notranslate"><span class="pre">blow_up_orbindx()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.magnetism.calculate_anisotropy_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_anisotropy_tensor()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.magnetism.calculate_exchange_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_exchange_tensor()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.magnetism.parse_magnetic_entity"><code class="docutils literal notranslate"><span class="pre">parse_magnetic_entity()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.magnetism.spin_tracer"><code class="docutils literal notranslate"><span class="pre">spin_tracer()</span></code></a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Contributing to grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Extras</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../changelog/index.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bibliography.html">Bibliography</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">grogupy</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="modules.html">src</a></li>
<li class="breadcrumb-item"><a href="grogupy.html">grogupy package</a></li>
<li class="breadcrumb-item active">grogupy.magnetism module</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/implementation/grogupy.magnetism.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="module-grogupy.magnetism">
<span id="grogupy-magnetism-module"></span><h1>grogupy.magnetism module<a class="headerlink" href="#module-grogupy.magnetism" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.blow_up_orbindx">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">blow_up_orbindx</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">orb_indices</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#blow_up_orbindx"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.blow_up_orbindx" title="Link to this definition"></a></dt>
<dd><p>Function to blow up orbital indices to make SPIN BOX indices.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>orb_indices<span class="classifier">np.array_like</span></dt><dd><p>These are the indices in ORBITAL BOX</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>orb_indices<span class="classifier">np.array_like</span></dt><dd><p>These are the indices in SPIN BOX</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.calculate_anisotropy_tensor">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">calculate_anisotropy_tensor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mag_ent</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#calculate_anisotropy_tensor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.calculate_anisotropy_tensor" title="Link to this definition"></a></dt>
<dd><p>Calculates the renormalized anisotropy tensor from the energies.</p>
<p>It uses the grogu convention for output.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>mag_ent<span class="classifier">dict</span></dt><dd><p>An element from the magnetic entities</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>K<span class="classifier">np.array_like</span></dt><dd><p>elements of the anisotropy tensor</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.calculate_exchange_tensor">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">calculate_exchange_tensor</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pair</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#calculate_exchange_tensor"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.calculate_exchange_tensor" title="Link to this definition"></a></dt>
<dd><p>Calculates the exchange tensor from the energies.</p>
<p>It produces the isotropic exchange, the relevant elements
from the Dzyaloshinskii-Morilla (Dm) tensor, the symmetric-anisotropy
and the complete exchange tensor.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>pair<span class="classifier">dict</span></dt><dd><p>An element from the pairs</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>J_iso<span class="classifier">float</span></dt><dd><p>Isotropic exchange (Tr[J] / 3)</p>
</dd>
<dt>J_S<span class="classifier">np.array_like</span></dt><dd><p>Symmetric-anisotropy (J_S = J - J_iso * I &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>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.parse_magnetic_entity">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">parse_magnetic_entity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dh</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">atom</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">l</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#parse_magnetic_entity"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.parse_magnetic_entity" title="Link to this definition"></a></dt>
<dd><p>Function to define orbital indexes of a given magnetic entity.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>dh<span class="classifier">sisl.physics.Hamiltonian</span></dt><dd><p>Hamiltonian from sisl</p>
</dd>
<dt>atom<span class="classifier">integer or list of integers, optional</span></dt><dd><p>Defining atom (or atoms) in the unit cell forming the magnetic entity. Defaults to None</p>
</dd>
<dt>l<span class="classifier">integer, optional</span></dt><dd><p>Defining the angular momentum channel. Defaults to None</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>list</dt><dd><p>The orbital indexes of the given magnetic entity</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.magnetism.spin_tracer">
<span class="sig-prename descclassname"><span class="pre">grogupy.magnetism.</span></span><span class="sig-name descname"><span class="pre">spin_tracer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/magnetism.html#spin_tracer"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.magnetism.spin_tracer" title="Link to this definition"></a></dt>
<dd><p>Spin tracer utility.</p>
<p>This takes an operator with the orbital-spin sequence:
orbital 1 up,
orbital 1 down,
orbital 2 up,
orbital 2 down,
that is in the SPIN-BOX representation,
and extracts orbital dependent Pauli traces.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>M<span class="classifier">np.array_like</span></dt><dd><p>Traceable matrix</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>dict</dt><dd><p>It contains the traced matrix with “x”, “y”, “z” and “c”</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="grogupy.io.html" class="btn btn-neutral float-left" title="grogupy.io module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="grogupy.utilities.html" class="btn btn-neutral float-right" title="grogupy.utilities module" 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,381 +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.utilities module &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="Environment variables" href="environment.html" />
<link rel="prev" title="grogupy.magnetism module" href="grogupy.magnetism.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
grogupy
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quickstart/index.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cite.html">Citing grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">User Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tutorials/index.html">Tutorials</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced usage</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="modules.html">src</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="grogupy.html">grogupy package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="grogupy.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">grogupy.utilities module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.RotM"><code class="docutils literal notranslate"><span class="pre">RotM()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.RotMa2b"><code class="docutils literal notranslate"><span class="pre">RotMa2b()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.commutator"><code class="docutils literal notranslate"><span class="pre">commutator()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.crossM"><code class="docutils literal notranslate"><span class="pre">crossM()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.hsk"><code class="docutils literal notranslate"><span class="pre">hsk()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.int_de_ke"><code class="docutils literal notranslate"><span class="pre">int_de_ke()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.make_contour"><code class="docutils literal notranslate"><span class="pre">make_contour()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.make_kset"><code class="docutils literal notranslate"><span class="pre">make_kset()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.read_siesta_emin"><code class="docutils literal notranslate"><span class="pre">read_siesta_emin()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#grogupy.utilities.tau_u"><code class="docutils literal notranslate"><span class="pre">tau_u()</span></code></a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="environment.html">Environment variables</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Development</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../dev/index.html">Contributing to grogupy</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Extras</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../changelog/index.html">Changelog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../bibliography.html">Bibliography</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">grogupy</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="modules.html">src</a></li>
<li class="breadcrumb-item"><a href="grogupy.html">grogupy package</a></li>
<li class="breadcrumb-item active">grogupy.utilities module</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/implementation/grogupy.utilities.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="module-grogupy.utilities">
<span id="grogupy-utilities-module"></span><h1>grogupy.utilities module<a class="headerlink" href="#module-grogupy.utilities" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.RotM">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">RotM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">theta</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">u</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#RotM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.RotM" title="Link to this definition"></a></dt>
<dd><p>Definition of rotation matrix with angle theta around direction u.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>theta<span class="classifier">float</span></dt><dd><p>The angle of rotation</p>
</dd>
<dt>u<span class="classifier">np.array_like</span></dt><dd><p>The rotation axis</p>
</dd>
<dt>eps<span class="classifier">float, optional</span></dt><dd><p>Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The rotation matrix</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.RotMa2b">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">RotMa2b</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#RotMa2b"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.RotMa2b" title="Link to this definition"></a></dt>
<dd><p>Definition of rotation matrix rotating unit vector a to unit vector b.</p>
<p>Function returns array R such that R &#64; a = b holds.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>a<span class="classifier">np.array_like</span></dt><dd><p>First vector</p>
</dd>
<dt>b<span class="classifier">np.array_like</span></dt><dd><p>Second vector</p>
</dd>
<dt>eps<span class="classifier">float, optional</span></dt><dd><p>Cutoff for small elements in the resulting matrix. Defaults to 1e-10</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The rotation matrix with the above property</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.commutator">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">commutator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#commutator"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.commutator" title="Link to this definition"></a></dt>
<dd><p>Shorthand for commutator.</p>
<p>Commutator of two matrices in the mathematical sense.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>a<span class="classifier">np.array_like</span></dt><dd><p>The first matrix</p>
</dd>
<dt>b<span class="classifier">np.array_like</span></dt><dd><p>The second matrix</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The commutator of a and b</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.crossM">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">crossM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">u</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#crossM"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.crossM" title="Link to this definition"></a></dt>
<dd><p>Definition for the cross-product matrix.</p>
<p>It acts as a cross product with vector u.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>u<span class="classifier">list or np.array_like</span></dt><dd><p>The second vector in the cross product</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>The matrix that represents teh cross product with a vector</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.hsk">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">hsk</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">H</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ss</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sc_off</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">k</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">(0,</span> <span class="pre">0,</span> <span class="pre">0)</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#hsk"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.hsk" title="Link to this definition"></a></dt>
<dd><p>Speed up Hk and Sk generation.</p>
<p>Calculates the Hamiltonian and the Overlap matrix at a given k point. It is faster that the sisl version.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>H<span class="classifier">np.array_like</span></dt><dd><p>Hamiltonian in spin box form</p>
</dd>
<dt>ss<span class="classifier">np.array_like</span></dt><dd><p>Overlap matrix in spin box form</p>
</dd>
<dt>sc_off<span class="classifier">list</span></dt><dd><p>supercell indexes of the Hamiltonian</p>
</dd>
<dt>k<span class="classifier">tuple, optional</span></dt><dd><p>The k point where the matrices are set up. Defaults to (0, 0, 0)</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>Hamiltonian at the given k point</p>
</dd>
<dt>np.array_like</dt><dd><p>Overlap matrix at the given k point</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.int_de_ke">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">int_de_ke</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">traced</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">we</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#int_de_ke"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.int_de_ke" title="Link to this definition"></a></dt>
<dd><p>It numerically integrates the traced matrix.</p>
<p>It is a wrapper from numpy.trapz and it contains the
relevant constants to calculate the energy integral from
equation 93 or 96.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>traced<span class="classifier">np.array_like</span></dt><dd><p>The trace of a matrix or a matrix product</p>
</dd>
<dt>we<span class="classifier">float</span></dt><dd><p>The weight of a point on the contour</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>float</dt><dd><p>The energy calculated from the integral formula</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.make_contour">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">make_contour</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">emin</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-20</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">emax</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">enum</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">42</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">150</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#make_contour"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.make_contour" title="Link to this definition"></a></dt>
<dd><p>A more sophisticated contour generator.</p>
<p>Calculates the parameters for the complex contour integral. It uses the
Legendre-Gauss quadrature method. It returns a class that contains
the information for the contour integral.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>emin<span class="classifier">int, optional</span></dt><dd><p>Energy minimum of the contour. Defaults to -20</p>
</dd>
<dt>emax<span class="classifier">float, optional</span></dt><dd><p>Energy maximum of the contour. Defaults to 0.0, so the Fermi level</p>
</dd>
<dt>enum<span class="classifier">int, optional</span></dt><dd><p>Number of sample points along the contour. Defaults to 42</p>
</dd>
<dt>p<span class="classifier">int, optional</span></dt><dd><p>Shape parameter that describes the distribution of the sample points. Defaults to 150</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>ccont</dt><dd><p>Contains all the information for the contour integral</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.make_kset">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">make_kset</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dirs</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'xyz'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">NUMK</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">20</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#make_kset"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.make_kset" title="Link to this definition"></a></dt>
<dd><p>Simple k-grid generator to sample the Brillouin zone.</p>
<p>Depending on the value of the dirs
argument k sampling in 1,2 or 3 dimensions is generated.
If dirs argument does not contain either of x, y or z
a kset of a single k-pont at the origin is returned. The total number of k points is the NUMK**(dimensions)</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>dirs<span class="classifier">str, optional</span></dt><dd><p>Directions of the k points in the Brillouin zone. They are the three lattice vectors. Defaults to “xyz”</p>
</dd>
<dt>NUMK<span class="classifier">int, optional</span></dt><dd><p>The number of k points in a direction. Defaults to 20</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>An array of k points that uniformly sample the Brillouin zone in the given directions</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.read_siesta_emin">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">read_siesta_emin</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">eigfile</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#read_siesta_emin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.read_siesta_emin" title="Link to this definition"></a></dt>
<dd><p>It reads the lowest energy level from the siesta run.</p>
<p>It uses the .EIG file from siesta that contains the eigenvalues.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>eigfile<span class="classifier">str</span></dt><dd><p>The path to the .EIG file</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>float</dt><dd><p>The energy minimum</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="grogupy.utilities.tau_u">
<span class="sig-prename descclassname"><span class="pre">grogupy.utilities.</span></span><span class="sig-name descname"><span class="pre">tau_u</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">u</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/grogupy/utilities.html#tau_u"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#grogupy.utilities.tau_u" title="Link to this definition"></a></dt>
<dd><p>Pauli matrix in direction u.</p>
<p>Returns the vector u in the basis of the Pauli matrices.</p>
<dl class="simple">
<dt>Args:</dt><dd><dl class="simple">
<dt>u<span class="classifier">list or np.array_like</span></dt><dd><p>The direction</p>
</dd>
</dl>
</dd>
<dt>Returns:</dt><dd><dl class="simple">
<dt>np.array_like</dt><dd><p>Arbitrary direction in the base of the Pauli matrices</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="grogupy.magnetism.html" class="btn btn-neutral float-left" title="grogupy.magnetism module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="environment.html" class="btn btn-neutral float-right" title="Environment variables" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#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>

@ -102,51 +102,52 @@
<div class="toctree-wrapper compound"> <div class="toctree-wrapper compound">
<ul> <ul>
<li class="toctree-l1"><a class="reference internal" href="grogupy.html">grogupy package</a><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><ul> <li class="toctree-l2"><a class="reference internal" href="grogupy.html#submodules">Submodules</a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.core.html">grogupy.core module</a><ul> <li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy.core">grogupy.core module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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.build_hh_ss"><code class="docutils literal notranslate"><span class="pre">build_hh_ss()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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.calc_Vu"><code class="docutils literal notranslate"><span class="pre">calc_Vu()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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.onsite_projection"><code class="docutils literal notranslate"><span class="pre">onsite_projection()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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.parallel_Gk"><code class="docutils literal notranslate"><span class="pre">parallel_Gk()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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.remove_clutter_for_save"><code class="docutils literal notranslate"><span class="pre">remove_clutter_for_save()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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.sequential_GK"><code class="docutils literal notranslate"><span class="pre">sequential_GK()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.core.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> <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> </ul>
</li> </li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.grogu.html">grogupy.grogu module</a><ul> <li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy.grogu">grogupy.grogu module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="grogupy.grogu.html#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="grogupy.html#grogupy.grogu.main"><code class="docutils literal notranslate"><span class="pre">main()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#grogupy.grogu.parse_command_line"><code class="docutils literal notranslate"><span class="pre">parse_command_line()</span></code></a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.io.html">grogupy.io module</a><ul> <li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy.io">grogupy.io module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="grogupy.io.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.load_pickle"><code class="docutils literal notranslate"><span class="pre">load_pickle()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.io.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_atoms_and_pairs"><code class="docutils literal notranslate"><span class="pre">print_atoms_and_pairs()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.io.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_job_description"><code class="docutils literal notranslate"><span class="pre">print_job_description()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.io.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_parameters"><code class="docutils literal notranslate"><span class="pre">print_parameters()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.io.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.print_runtime_information"><code class="docutils literal notranslate"><span class="pre">print_runtime_information()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.io.html#grogupy.io.save_pickle"><code class="docutils literal notranslate"><span class="pre">save_pickle()</span></code></a></li> <li class="toctree-l3"><a class="reference internal" href="grogupy.html#grogupy.io.process_input_args"><code class="docutils literal notranslate"><span class="pre">process_input_args()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#grogupy.io.read_fdf"><code class="docutils literal notranslate"><span class="pre">read_fdf()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.html#grogupy.io.save_pickle"><code class="docutils literal notranslate"><span class="pre">save_pickle()</span></code></a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l3"><a class="reference internal" href="grogupy.magnetism.html">grogupy.magnetism module</a><ul> <li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy.magnetism">grogupy.magnetism module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="grogupy.magnetism.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.blow_up_orbindx"><code class="docutils literal notranslate"><span class="pre">blow_up_orbindx()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.magnetism.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_anisotropy_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_anisotropy_tensor()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.magnetism.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.calculate_exchange_tensor"><code class="docutils literal notranslate"><span class="pre">calculate_exchange_tensor()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.magnetism.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.parse_magnetic_entity"><code class="docutils literal notranslate"><span class="pre">parse_magnetic_entity()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.magnetism.html#grogupy.magnetism.spin_tracer"><code class="docutils literal notranslate"><span class="pre">spin_tracer()</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-l3"><a class="reference internal" href="grogupy.utilities.html">grogupy.utilities module</a><ul>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.RotM"><code class="docutils literal notranslate"><span class="pre">RotM()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.RotMa2b"><code class="docutils literal notranslate"><span class="pre">RotMa2b()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.commutator"><code class="docutils literal notranslate"><span class="pre">commutator()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.crossM"><code class="docutils literal notranslate"><span class="pre">crossM()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.hsk"><code class="docutils literal notranslate"><span class="pre">hsk()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.int_de_ke"><code class="docutils literal notranslate"><span class="pre">int_de_ke()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.make_contour"><code class="docutils literal notranslate"><span class="pre">make_contour()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.make_kset"><code class="docutils literal notranslate"><span class="pre">make_kset()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.read_siesta_emin"><code class="docutils literal notranslate"><span class="pre">read_siesta_emin()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="grogupy.utilities.html#grogupy.utilities.tau_u"><code class="docutils literal notranslate"><span class="pre">tau_u()</span></code></a></li>
</ul> </ul>
</li> </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> </ul>
</li> </li>
<li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li> <li class="toctree-l2"><a class="reference internal" href="grogupy.html#module-grogupy">Module contents</a></li>

@ -113,27 +113,27 @@
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="implementation/grogupy.core.html#module-grogupy.core"><code class="xref">grogupy.core</code></a></td><td> <a href="implementation/grogupy.html#module-grogupy.core"><code class="xref">grogupy.core</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="implementation/grogupy.grogu.html#module-grogupy.grogu"><code class="xref">grogupy.grogu</code></a></td><td> <a href="implementation/grogupy.html#module-grogupy.grogu"><code class="xref">grogupy.grogu</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="implementation/grogupy.io.html#module-grogupy.io"><code class="xref">grogupy.io</code></a></td><td> <a href="implementation/grogupy.html#module-grogupy.io"><code class="xref">grogupy.io</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="implementation/grogupy.magnetism.html#module-grogupy.magnetism"><code class="xref">grogupy.magnetism</code></a></td><td> <a href="implementation/grogupy.html#module-grogupy.magnetism"><code class="xref">grogupy.magnetism</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
<tr class="cg-1"> <tr class="cg-1">
<td></td> <td></td>
<td>&#160;&#160;&#160; <td>&#160;&#160;&#160;
<a href="implementation/grogupy.utilities.html#module-grogupy.utilities"><code class="xref">grogupy.utilities</code></a></td><td> <a href="implementation/grogupy.html#module-grogupy.utilities"><code class="xref">grogupy.utilities</code></a></td><td>
<em></em></td></tr> <em></em></td></tr>
</table> </table>

File diff suppressed because one or more lines are too long

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

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

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

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

@ -4,14 +4,45 @@ grogupy package
Submodules Submodules
---------- ----------
.. toctree:: grogupy.core module
:maxdepth: 4 -------------------
grogupy.core .. automodule:: grogupy.core
grogupy.grogu :members:
grogupy.io :undoc-members:
grogupy.magnetism :show-inheritance:
grogupy.utilities
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 Module contents
--------------- ---------------

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

@ -18,6 +18,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
"""Docstring in init.
"""
from grogupy.core import * from grogupy.core import *
from grogupy.io import * from grogupy.io import *
from grogupy.magnetism import * from grogupy.magnetism import *

@ -18,9 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
"""This contains the core functions for the grogupy script. """Docstring in core.
""" """
import numpy as np import numpy as np

@ -18,6 +18,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
"""Docstring in grogupy.
"""
import warnings import warnings
from argparse import ArgumentParser from argparse import ArgumentParser
from sys import getsizeof from sys import getsizeof

@ -18,6 +18,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
"""Docstring in io.
"""
from pickle import dump, load from pickle import dump, load
import numpy as np import numpy as np

@ -18,6 +18,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
"""Docstring in magnetism.
"""
import numpy as np import numpy as np

@ -18,6 +18,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
"""Docstring in utilities.
"""
import numpy as np import numpy as np
from scipy.special import roots_legendre from scipy.special import roots_legendre
from sisl.io.siesta import eigSileSiesta from sisl.io.siesta import eigSileSiesta

Loading…
Cancel
Save