-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
112 changed files
with
12,489 additions
and
1,573 deletions.
There are no files selected for viewing
Binary file modified
BIN
+544 Bytes
(100%)
build/doctrees/api/correctors.thermodynamic_corrector.doctree
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+186 Bytes
(100%)
build/doctrees/api/descriptors.component_descriptors.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+857 Bytes
(100%)
build/doctrees/api/parsers.absolute_energy_parser.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+845 Bytes
(100%)
build/doctrees/api/parsers.relative_energy_parser.doctree
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+429 Bytes
(100%)
build/doctrees/api/plotters.energy_profile_plotter.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 9def3ab6b901fbc5ac130af0ac3aab30 | ||
config: e285ae3c7be6712386a4c8b000c5612a | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,266 @@ | ||
|
||
|
||
<!DOCTYPE html> | ||
<!--[if IE 8]><html class="no-js lt-ie9" lang="Python" > <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js" lang="Python" > <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<title>scaks — scaks scaks documentation</title> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> | ||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> | ||
<link rel="index" title="Index" href="../genindex.html" /> | ||
<link rel="search" title="Search" href="../search.html" /> | ||
|
||
|
||
<script src="../_static/js/modernizr.min.js"></script> | ||
|
||
</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"> scaks | ||
|
||
|
||
|
||
</a> | ||
|
||
|
||
|
||
|
||
<div class="version"> | ||
v1.0.0 | ||
</div> | ||
|
||
|
||
|
||
|
||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> | ||
<input type="text" name="q" placeholder="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="main navigation"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="caption"><span class="caption-text">Contents:</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../install.html">Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../tutorial/index.html">Tutorial</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../api/index.html">API</a></li> | ||
</ul> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> | ||
|
||
|
||
<nav class="wy-nav-top" aria-label="top navigation"> | ||
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../index.html">scaks</a> | ||
|
||
</nav> | ||
|
||
|
||
<div class="wy-nav-content"> | ||
|
||
<div class="rst-content"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div role="navigation" aria-label="breadcrumbs navigation"> | ||
|
||
<ul class="wy-breadcrumbs"> | ||
|
||
<li><a href="../index.html">Docs</a> »</li> | ||
|
||
<li><a href="index.html">Module code</a> »</li> | ||
|
||
<li>scaks</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 scaks</h1><div class="highlight"><pre> | ||
<span></span><span class="kn">import</span> <span class="nn">time</span> | ||
<span class="kn">import</span> <span class="nn">sys</span> | ||
|
||
<span class="kn">from</span> <span class="nn">.functions</span> <span class="k">import</span> <span class="o">*</span> | ||
<span class="kn">from</span> <span class="nn">.errors.error</span> <span class="k">import</span> <span class="o">*</span> | ||
<span class="kn">from</span> <span class="nn">.compatutil</span> <span class="k">import</span> <span class="n">pickle</span> | ||
|
||
|
||
<span class="n">__version__</span> <span class="o">=</span> <span class="s1">'1.0.0'</span> | ||
|
||
<span class="n">file_header</span> <span class="o">=</span> <span class="p">(</span> | ||
<span class="s1">'# This file was automatically generated by scaks'</span> <span class="o">+</span> | ||
<span class="s1">' (https://github.com/PytLab/scaks).</span><span class="se">\n</span><span class="s1">'</span> <span class="o">+</span> | ||
<span class="s1">'# Version </span><span class="si">%s</span><span class="se">\n</span><span class="s1"># Date: </span><span class="si">%s</span><span class="s1"> </span><span class="se">\n</span><span class="s1">#</span><span class="se">\n</span><span class="s1">'</span> <span class="o">+</span> | ||
<span class="s1">'# Do not make changes to this file '</span> <span class="o">+</span> | ||
<span class="s1">'unless you know what you are doing</span><span class="se">\n\n</span><span class="s1">'</span><span class="p">)</span> <span class="o">%</span> <span class="p">(</span><span class="n">__version__</span><span class="p">,</span> <span class="n">time</span><span class="o">.</span><span class="n">asctime</span><span class="p">())</span> | ||
|
||
<span class="c1">#-------------------------------------------------------</span> | ||
<span class="c1"># Some base classes for kinetic model are defined below |</span> | ||
<span class="c1">#-------------------------------------------------------</span> | ||
|
||
|
||
<span class="k">class</span> <span class="nc">ModelShell</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span> | ||
<span class="sd">"""</span> | ||
<span class="sd"> A non-functional parent class to be inherited by</span> | ||
<span class="sd"> other tools class of kinetic model.</span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">owner</span><span class="p">):</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">_owner</span> <span class="o">=</span> <span class="n">owner</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">_archived_data_dict</span> <span class="o">=</span> <span class="p">{}</span> | ||
|
||
<span class="k">def</span> <span class="nf">archive_data</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">data_name</span><span class="p">,</span> <span class="n">data</span><span class="p">):</span> | ||
<span class="sd">"""</span> | ||
<span class="sd"> Update data dict and dump it to data file.</span> | ||
|
||
<span class="sd"> :param data_name: key in data dict</span> | ||
<span class="sd"> :type data_name: str</span> | ||
|
||
<span class="sd"> :param data: value in data dict</span> | ||
<span class="sd"> :type data: any</span> | ||
<span class="sd"> """</span> | ||
<span class="c1"># Update data dict.</span> | ||
<span class="k">if</span> <span class="n">data_name</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_owner</span><span class="o">.</span><span class="n">archived_variables</span><span class="p">:</span> | ||
<span class="bp">self</span><span class="o">.</span><span class="n">_archived_data_dict</span><span class="p">[</span><span class="n">data_name</span><span class="p">]</span> <span class="o">=</span> <span class="n">data</span> | ||
<span class="c1"># Dump data dict to data file</span> | ||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_archived_data_dict</span><span class="p">:</span> | ||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_owner</span><span class="o">.</span><span class="n">data_file</span><span class="p">,</span> <span class="s1">'wb'</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span> | ||
<span class="n">pickle</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_archived_data_dict</span><span class="p">,</span> <span class="n">f</span><span class="p">)</span> | ||
|
||
<span class="nd">@staticmethod</span> | ||
<span class="k">def</span> <span class="nf">write2file</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="n">line</span><span class="p">):</span> | ||
<span class="n">f</span> <span class="o">=</span> <span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s1">'a'</span><span class="p">)</span> | ||
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">line</span><span class="p">)</span> | ||
<span class="n">f</span><span class="o">.</span><span class="n">close</span><span class="p">()</span> | ||
|
||
</pre></div> | ||
|
||
</div> | ||
|
||
</div> | ||
<footer> | ||
|
||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p> | ||
© Copyright 2018, Zhengjiang Shao. | ||
|
||
</p> | ||
</div> | ||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
</footer> | ||
|
||
</div> | ||
</div> | ||
|
||
</section> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript"> | ||
var DOCUMENTATION_OPTIONS = { | ||
URL_ROOT:'../', | ||
VERSION:'scaks', | ||
LANGUAGE:'Python', | ||
COLLAPSE_INDEX:false, | ||
FILE_SUFFIX:'.html', | ||
HAS_SOURCE: true, | ||
SOURCELINK_SUFFIX: '.txt' | ||
}; | ||
</script> | ||
<script type="text/javascript" src="../_static/jquery.js"></script> | ||
<script type="text/javascript" src="../_static/underscore.js"></script> | ||
<script type="text/javascript" src="../_static/doctools.js"></script> | ||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | ||
|
||
|
||
|
||
<script type="text/javascript" src="../_static/js/theme.js"></script> | ||
|
||
<script type="text/javascript"> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.