<!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.0" / >
< title > grogupy.io — grogupy 1.0.0 documentation< / title >
< link rel = "stylesheet" type = "text/css" href = "../../_static/pygments.css?v=80d5e7a1" / >
< link rel = "stylesheet" type = "text/css" href = "../../_static/css/theme.css?v=e59714d7" / >
< link rel = "stylesheet" type = "text/css" href = "../../_static/sphinx-design.min.css?v=95c83b7e" / >
< script src = "../../_static/jquery.js?v=5d32c60e" > < / script >
< script src = "../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c" > < / script >
< script src = "../../_static/documentation_options.js?v=8d563738" > < / script >
< script src = "../../_static/doctools.js?v=9a2dae69" > < / script >
< script src = "../../_static/sphinx_highlight.js?v=dc90522c" > < / script >
< script src = "../../_static/design-tabs.js?v=f930bc37" > < / script >
< script src = "../../_static/js/theme.js" > < / script >
< link rel = "index" title = "Index" href = "../../genindex.html" / >
< link rel = "search" title = "Search" href = "../../search.html" / >
< / head >
< body class = "wy-body-for-nav" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
< a href = "../../index.html" class = "icon icon-home" >
grogupy
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "../../search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" aria-label = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div > < div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "Navigation menu" >
< p class = "caption" role = "heading" > < span class = "caption-text" > Getting started< / span > < / p >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../introduction.html" > Introduction< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../quickstart/index.html" > Quickstart< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../cite.html" > Citing grogupy< / a > < / li >
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > User Guide< / span > < / p >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../tutorials/index.html" > Tutorials< / a > < / li >
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Advanced usage< / span > < / p >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../implementation/modules.html" > src< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../implementation/grogupy.html" > grogupy package< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../implementation/environment.html" > Environment variables< / a > < / li >
< / ul >
< p class = "caption" role = "heading" > < span class = "caption-text" > Development< / span > < / p >
< ul >
< 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 = "../index.html" > Module code< / a > < / li >
< li class = "breadcrumb-item active" > grogupy.io< / li >
< li class = "wy-breadcrumbs-aside" >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< h1 > Source code for grogupy.io< / h1 > < div class = "highlight" > < pre >
< span > < / span > < span class = "c1" > # Copyright (c) [2024] []< / span >
< span class = "c1" > #< / span >
< span class = "c1" > # Permission is hereby granted, free of charge, to any person obtaining a copy< / span >
< span class = "c1" > # of this software and associated documentation files (the " Software" ), to deal< / span >
< span class = "c1" > # in the Software without restriction, including without limitation the rights< / span >
< span class = "c1" > # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell< / span >
< span class = "c1" > # copies of the Software, and to permit persons to whom the Software is< / span >
< span class = "c1" > # furnished to do so, subject to the following conditions:< / span >
< span class = "c1" > #< / span >
< span class = "c1" > # The above copyright notice and this permission notice shall be included in all< / span >
< span class = "c1" > # copies or substantial portions of the Software.< / span >
< span class = "c1" > #< / span >
< span class = "c1" > # THE SOFTWARE IS PROVIDED " AS IS" , WITHOUT WARRANTY OF ANY KIND, EXPRESS OR< / span >
< span class = "c1" > # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,< / span >
< span class = "c1" > # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE< / span >
< span class = "c1" > # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER< / span >
< span class = "c1" > # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,< / 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 = "sd" > " " " Docstring in io.< / span >
< span class = "sd" > " " " < / 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" > from< / span > < span class = "nn" > sisl.io< / span > < span class = "kn" > import< / span > < span class = "n" > fdfSileSiesta< / 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" > " infile" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " outfile" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " scf_xcf_orientation" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " ref_xcf_orientations" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " kset" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " kdirs" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " ebot" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " eset" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " esetp" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " parallel_solver_for_Gk" < / span > < span class = "p" > ,< / span >
< span class = "s2" > " padawan_mode" < / 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" > 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" > ref_xcf_orientations< / 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" > kset< / span > < span class = "o" > =< / span > < span class = "mi" > 2< / span > < span class = "p" > ,< / span >
< span class = "n" > kdirs< / span > < span class = "o" > =< / span > < span class = "s2" > " xyz" < / span > < span class = "p" > ,< / span >
< span class = "n" > ebot< / span > < span class = "o" > =< / span > < span class = "kc" > None< / span > < span class = "p" > ,< / span >
< span class = "n" > eset< / span > < span class = "o" > =< / span > < span class = "mi" > 42< / span > < span class = "p" > ,< / span >
< span class = "n" > esetp< / span > < span class = "o" > =< / span > < span class = "mi" > 1000< / span > < span class = "p" > ,< / span >
< span class = "n" > parallel_solver_for_Gk< / span > < span class = "o" > =< / span > < span class = "kc" > False< / 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 >
< div class = "viewcode-block" id = "read_fdf" >
< 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" > " " " It reads the simulation parameters, magnetic entities and pairs from the fdf.< / span >
< span class = "sd" > Args:< / span >
< span class = "sd" > path : string< / span >
< span class = "sd" > The path to the .fdf file< / 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" > " " " < / 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" > " InputFile" < / 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" > " infile" < / 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" > " OutputFile" < / 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" > " outfile" < / 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" > " ScfXcfOrientation" < / 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" > " scf_xcf_orientation" < / 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" > " XCF_Rotation" < / 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" > " ref_xcf_orientations" < / 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" > " INTEGRAL.Kset" < / 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" > " kset" < / 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" > " INTEGRAL.Kdirs" < / 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" > " kdirs" < / 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" > " ebot" < / 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" > " INTEGRAL.Ebot" < / 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" > " INTEGRAL.Eset" < / 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" > " eset" < / 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" > " INTEGRAL.Esetp" < / 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" > " esetp" < / 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" > " GREEN.ParallelSolver" < / 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" > " parallel_solver_for_Gk" < / 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" > " PadawanMode" < / 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" > " padawan_mode" < / 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" > " Pairs" < / 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" > " MagneticEntities" < / 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" > " #" < / 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" > " Cluster" < / span > < span class = "p" > ,< / span > < span class = "s2" > " cluster" < / 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" > " AtomShell" < / span > < span class = "p" > ,< / span > < span class = "s2" > " Atomshell" < / span > < span class = "p" > ,< / span > < span class = "s2" > " atomShell" < / span > < span class = "p" > ,< / span > < span class = "s2" > " atomshell" < / 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" > " AtomOrbital" < / span > < span class = "p" > ,< / span > < span class = "s2" > " Atomorbital" < / span > < span class = "p" > ,< / span > < span class = "s2" > " tomOrbital" < / span > < span class = "p" > ,< / span > < span class = "s2" > " atomorbital" < / 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" > " Orbitals" < / span > < span class = "p" > ,< / span > < span class = "s2" > " orbitals" < / 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" > " Unrecognizable magnetic entity in .fdf!" < / 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" > " " " 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" > " " " < / 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 >
< div class = "viewcode-block" id = "save_pickle" >
< 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 = "w" > < / span > < span class = "sd" > " " " Saves the data in the outfile with pickle.< / span >
< span class = "sd" > Args:< / span >
< span class = "sd" > outfile : str< / span >
< span class = "sd" > Path to outfile< / span >
< span class = "sd" > data : dict< / span >
< span class = "sd" > Contains the data< / span >
< span class = "sd" > " " " < / span >
< span class = "c1" > # save dictionary< / span >
< span class = "k" > with< / span > < span class = "nb" > open< / span > < span class = "p" > (< / span > < span class = "n" > outfile< / span > < span class = "p" > ,< / span > < span class = "s2" > " wb" < / span > < span class = "p" > )< / span > < span class = "k" > as< / span > < span class = "n" > output_file< / span > < span class = "p" > :< / span >
< span class = "n" > dump< / span > < span class = "p" > (< / span > < span class = "n" > data< / span > < span class = "p" > ,< / span > < span class = "n" > output_file< / span > < span class = "p" > )< / span > < / div >
< div class = "viewcode-block" id = "load_pickle" >
< 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 = "w" > < / span > < span class = "sd" > " " " Loads the data from the infile with pickle.< / span >
< span class = "sd" > Args:< / span >
< span class = "sd" > infile : str< / span >
< span class = "sd" > Path to infile< / span >
< span class = "sd" > Returns:< / span >
< span class = "sd" > data : dict< / span >
< span class = "sd" > A dictionary of data< / span >
< span class = "sd" > " " " < / span >
< span class = "c1" > # open and read file< / span >
< span class = "k" > with< / span > < span class = "nb" > open< / span > < span class = "p" > (< / span > < span class = "n" > infile< / span > < span class = "p" > ,< / span > < span class = "s2" > " wb" < / span > < span class = "p" > )< / span > < span class = "k" > as< / span > < span class = "n" > input_file< / span > < span class = "p" > :< / span >
< span class = "n" > data< / span > < span class = "o" > =< / span > < span class = "n" > load< / span > < span class = "p" > (< / span > < span class = "n" > data< / span > < span class = "p" > ,< / span > < span class = "n" > input_file< / span > < span class = "p" > )< / span >
< span class = "k" > return< / span > < span class = "n" > data< / span > < / div >
< 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" > " " " 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" > " " " < / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Input file: " < / 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" > " infile" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Output file: " < / 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" > " outfile" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " Number of nodes in the parallel cluster: " < / span > < span class = "p" > ,< / span >
< span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " parallel_size" < / 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" > " parallel_solver_for_Gk" < / span > < span class = "p" > ]:< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " solver used for Greens function calculation: parallel" < / 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" > " solver used for Greens function calculation: sequential" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Cell [Ang]: " < / 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" > " cell" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " DFT axis: " < / 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" > " scf_xcf_orientation" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Quantization axis and perpendicular rotation directions:" < / 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" > " ref_xcf_orientations" < / 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" > " o" < / span > < span class = "p" > ],< / span > < span class = "s2" > " --» " < / span > < span class = "p" > ,< / span > < span class = "n" > ref< / span > < span class = "p" > [< / span > < span class = "s2" > " vw" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Parameters for the contour integral:" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Number of k points: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " kset" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " k point directions: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " kdirs" < / span > < span class = "p" > ])< / span >
< span class = "k" > if< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " automatic_ebot" < / span > < span class = "p" > ]:< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " Ebot: " < / span > < span class = "p" > ,< / span >
< span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " ebot" < / span > < span class = "p" > ],< / span >
< span class = "s2" > " WARNING: This was automatically determined!" < / 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" > " Ebot: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " ebot" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Eset: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " eset" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Esetp: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " esetp" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span > < / div >
< div class = "viewcode-block" id = "print_parameters" >
< 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 = "w" > < / span > < span class = "sd" > " " " It prints the simulation parameters for the grogu out.< / 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" > " " " < / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Input file: " < / 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" > " infile" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Output file: " < / 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" > " outfile" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " Number of nodes in the parallel cluster: " < / span > < span class = "p" > ,< / span >
< span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " parallel_size" < / span > < span class = "p" > ],< / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Cell [Ang]: " < / 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" > " cell" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " DFT axis: " < / 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" > " scf_xcf_orientation" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Quantization axis and perpendicular rotation directions:" < / 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" > " ref_xcf_orientations" < / 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" > " o" < / span > < span class = "p" > ],< / span > < span class = "s2" > " --» " < / span > < span class = "p" > ,< / span > < span class = "n" > ref< / span > < span class = "p" > [< / span > < span class = "s2" > " vw" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Parameters for the contour integral:" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Number of k points: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " kset" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " k point directions: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " kdirs" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Ebot: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " ebot" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Eset: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " eset" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Esetp: " < / span > < span class = "p" > ,< / span > < span class = "n" > simulation_parameters< / span > < span class = "p" > [< / span > < span class = "s2" > " esetp" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span > < / div >
< div class = "viewcode-block" id = "print_atoms_and_pairs" >
< 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 = "w" > < / span > < span class = "sd" > " " " It prints the pair and magnetic entity information for the grogu out.< / span >
< span class = "sd" > Args:< / span >
< span class = "sd" > magnetic_entities : dict< / span >
< span class = "sd" > It contains the data on the magnetic entities< / span >
< span class = "sd" > pairs : dict< / span >
< span class = "sd" > It contains the data on the pairs< / span >
< span class = "sd" > " " " < / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Atomic information: " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " [atom index]Element(orbitals) x [Ang] y [Ang] z [Ang] Sx Sy Sz Q Lx Ly Lz Jx Jy Jz" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "c1" > # iterate over magnetic entities< / 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 = "c1" > # iterate over atoms< / span >
< span class = "k" > for< / span > < span class = "n" > tag< / span > < span class = "p" > ,< / span > < span class = "n" > xyz< / span > < span class = "ow" > in< / span > < span class = "nb" > zip< / span > < span class = "p" > (< / span > < span class = "n" > mag_ent< / span > < span class = "p" > [< / span > < span class = "s2" > " tags" < / span > < span class = "p" > ],< / span > < span class = "n" > mag_ent< / span > < span class = "p" > [< / span > < span class = "s2" > " xyz" < / span > < span class = "p" > ]):< / span >
< span class = "c1" > # coordinates and tag< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "sa" > f< / span > < span class = "s2" > " < / span > < span class = "si" > {< / span > < span class = "n" > tag< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > xyz< / span > < span class = "p" > [< / span > < span class = "mi" > 0< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > xyz< / span > < span class = "p" > [< / span > < span class = "mi" > 1< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > xyz< / span > < span class = "p" > [< / span > < span class = "mi" > 2< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Anisotropy [meV]" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Magnetic entity x [Ang] y [Ang] z [Ang]" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "c1" > # iterate over magnetic entities< / 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 = "c1" > # iterate over atoms< / span >
< span class = "k" > for< / span > < span class = "n" > tag< / span > < span class = "p" > ,< / span > < span class = "n" > xyz< / span > < span class = "ow" > in< / span > < span class = "nb" > zip< / span > < span class = "p" > (< / span > < span class = "n" > mag_ent< / span > < span class = "p" > [< / span > < span class = "s2" > " tags" < / span > < span class = "p" > ],< / span > < span class = "n" > mag_ent< / span > < span class = "p" > [< / span > < span class = "s2" > " xyz" < / span > < span class = "p" > ]):< / span >
< span class = "c1" > # coordinates and tag< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "sa" > f< / span > < span class = "s2" > " < / span > < span class = "si" > {< / span > < span class = "n" > tag< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > xyz< / span > < span class = "p" > [< / span > < span class = "mi" > 0< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > xyz< / span > < span class = "p" > [< / span > < span class = "mi" > 1< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > xyz< / span > < span class = "p" > [< / span > < span class = "mi" > 2< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Consistency check: " < / span > < span class = "p" > ,< / span > < span class = "n" > mag_ent< / span > < span class = "p" > [< / span > < span class = "s2" > " K_consistency" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Anisotropy diag: " < / span > < span class = "p" > ,< / span > < span class = "n" > mag_ent< / span > < span class = "p" > [< / span > < span class = "s2" > " K" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Exchange [meV]" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Magnetic entity1 Magnetic entity2 [i j k] d [Ang]" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "c1" > # iterate over pairs< / 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 = "c1" > # print pair parameters< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " < / span > < span class = "si" > {< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s1" > ' tags' < / span > < span class = "p" > ][< / span > < span class = "mi" > 0< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s1" > ' tags' < / span > < span class = "p" > ][< / span > < span class = "mi" > 1< / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > < / span > < span class = "si" > {< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s1" > ' Ruc' < / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > d [Ang] < / span > < span class = "si" > {< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s1" > ' dist' < / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > " < / span >
< span class = "p" > )< / span >
< span class = "c1" > # print magnetic parameters< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Isotropic: " < / span > < span class = "p" > ,< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s2" > " J_iso" < / span > < span class = "p" > ],< / span > < span class = "s2" > " # Tr[J] / 3" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " DMI: " < / span > < span class = "p" > ,< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s2" > " D" < / span > < span class = "p" > ],< / span > < span class = "s2" > " # Dx, Dy, Dz" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " Symmetric-anisotropy: " < / span > < span class = "p" > ,< / span >
< span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s2" > " J_S" < / span > < span class = "p" > ],< / span >
< span class = "s2" > " # J_S = J - J_iso * I – – > Jxx, Jyy, Jxy, Jxz, Jyz" < / span > < span class = "p" > ,< / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " J: # Jxx, Jxy, Jxz, Jyx, Jyy, Jyz, Jzx, Jzy, Jzz" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "n" > pair< / span > < span class = "p" > [< / span > < span class = "s2" > " J" < / span > < span class = "p" > ])< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ================================================================================================================================================================" < / span >
< span class = "p" > )< / span > < / div >
< div class = "viewcode-block" id = "print_runtime_information" >
< 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 = "w" > < / span > < span class = "sd" > " " " It prints the runtime information for the grogu out.< / span >
< span class = "sd" > Args:< / span >
< span class = "sd" > times : dict< / span >
< span class = "sd" > It contains the runtime data< / span >
< span class = "sd" > " " " < / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "s2" > " Runtime information: " < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "sa" > f< / span > < span class = "s2" > " Total runtime: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' end_time' < / 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" > ' start_time' < / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "s2" > " ----------------------------------------------------------------------------------------------------------------------------------------------------------------" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span > < span class = "sa" > f< / span > < span class = "s2" > " Initial setup: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' setup_time' < / 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" > ' start_time' < / span > < span class = "p" > ]< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span > < span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " Hamiltonian conversion and XC field extraction: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' H_and_XCF_time' < / 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" > ' setup_time' < / span > < span class = "p" > ]< / span > < span class = "si" > :< / span > < span class = "s2" > .3f< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " Pair and site datastructure creatrions: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' site_and_pair_dictionaries_time' < / 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" > ' H_and_XCF_time' < / span > < span class = "p" > ]< / span > < span class = "si" > :< / span > < span class = "s2" > .3f< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " k set cration and distribution: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' k_set_time' < / 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" > ' site_and_pair_dictionaries_time' < / span > < span class = "p" > ]< / span > < span class = "si" > :< / span > < span class = "s2" > .3f< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " Rotating XC potential: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' reference_rotations_time' < / 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" > ' k_set_time' < / span > < span class = "p" > ]< / span > < span class = "si" > :< / span > < span class = "s2" > .3f< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " Greens function inversion: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' green_function_inversion_time' < / 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" > ' reference_rotations_time' < / span > < span class = "p" > ]< / span > < span class = "si" > :< / span > < span class = "s2" > .3f< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span >
< span class = "p" > )< / span >
< span class = "nb" > print< / span > < span class = "p" > (< / span >
< span class = "sa" > f< / span > < span class = "s2" > " Calculate energies and magnetic components: < / span > < span class = "si" > {< / span > < span class = "n" > times< / span > < span class = "p" > [< / span > < span class = "s1" > ' end_time' < / 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" > ' green_function_inversion_time' < / span > < span class = "p" > ]< / span > < span class = "si" > :< / span > < span class = "s2" > .3f< / span > < span class = "si" > }< / span > < span class = "s2" > s" < / span >
< span class = "p" > )< / span > < / div >
< / pre > < / div >
< / div >
< / div >
< footer >
< hr / >
< div role = "contentinfo" >
< p > © Copyright 2024, grogupy.< / p >
< / div >
Built with < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > using a
< a href = "https://github.com/readthedocs/sphinx_rtd_theme" > theme< / a >
provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
< script >
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
< / script >
< / body >
< / html >