-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
e63a9a1
commit 0bdcd53
Showing
85 changed files
with
14,873 additions
and
8 deletions.
There are no files selected for viewing
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 records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: da375906fee2dcb7d52af1e55c70aa40 | ||
config: 2a8e3e4803752bd2a3e4a40ef372ebaa | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
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 |
---|---|---|
@@ -0,0 +1,125 @@ | ||
|
||
|
||
<!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>Overview: module code — SPARC-X-API 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" /> | ||
|
||
|
||
<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=5929fcd5"></script> | ||
<script src="../_static/doctools.js?v=9bcbadda"></script> | ||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></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"> | ||
SPARC-X-API | ||
</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">Contents</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../setup_environment.html">Configurations for SPARC-X-API</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../basic_usage.html">Basic Usage</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../advanced_socket.html">Advanced Usage: SPARC-X-API as a Socket Interface</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../examples.html">Examples</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../package_components.html">SPARC-X-API Package Components</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../advanced_topics.html">Advanced Topics</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../api_changes.html">Changes in API</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../troubleshooting.html">Troubleshooting</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../contribute.html">How to Contribute</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../maintainers.html">Documentation for Maintainers</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">SPARC-X-API</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item active">Overview: module code</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>All modules for which code is available</h1> | ||
<ul><li><a href="sparc.html">sparc</a></li> | ||
<ul><li><a href="sparc/api.html">sparc.api</a></li> | ||
<li><a href="sparc/calculator.html">sparc.calculator</a></li> | ||
<li><a href="sparc/cli.html">sparc.cli</a></li> | ||
<li><a href="sparc/client.html">sparc.client</a></li> | ||
<li><a href="sparc/docparser.html">sparc.docparser</a></li> | ||
<li><a href="sparc/download_data.html">sparc.download_data</a></li> | ||
<li><a href="sparc/io.html">sparc.io</a></li> | ||
<li><a href="sparc/quicktest.html">sparc.quicktest</a></li> | ||
<li><a href="sparc/socketio.html">sparc.socketio</a></li> | ||
<li><a href="sparc/sparc_parsers/atoms.html">sparc.sparc_parsers.atoms</a></li> | ||
<li><a href="sparc/sparc_parsers/ion.html">sparc.sparc_parsers.ion</a></li> | ||
<li><a href="sparc/sparc_parsers/pseudopotential.html">sparc.sparc_parsers.pseudopotential</a></li> | ||
<li><a href="sparc/sparc_parsers/utils.html">sparc.sparc_parsers.utils</a></li> | ||
<li><a href="sparc/utils.html">sparc.utils</a></li> | ||
</ul></ul> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2024, SPARC-X Developmers.</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> |
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,167 @@ | ||
|
||
|
||
<!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>sparc — SPARC-X-API 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" /> | ||
|
||
|
||
<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=5929fcd5"></script> | ||
<script src="../_static/doctools.js?v=9bcbadda"></script> | ||
<script src="../_static/sphinx_highlight.js?v=dc90522c"></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"> | ||
SPARC-X-API | ||
</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">Contents</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../setup_environment.html">Configurations for SPARC-X-API</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../basic_usage.html">Basic Usage</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../advanced_socket.html">Advanced Usage: SPARC-X-API as a Socket Interface</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../examples.html">Examples</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../package_components.html">SPARC-X-API Package Components</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../advanced_topics.html">Advanced Topics</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../api_changes.html">Changes in API</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../troubleshooting.html">Troubleshooting</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../contribute.html">How to Contribute</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../maintainers.html">Documentation for Maintainers</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">SPARC-X-API</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">sparc</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 sparc</h1><div class="highlight"><pre> | ||
<span></span><span class="sd">"""Initialization of sparc-x-api</span> | ||
|
||
<span class="sd">For submodules like download_data and api, ase / numpy may be ignored,</span> | ||
<span class="sd">and run using standard python libaries. This may be useful for cases like</span> | ||
<span class="sd">conda build and CI where not all dependencies are present</span> | ||
<span class="sd">"""</span> | ||
|
||
|
||
<span class="k">def</span> <span class="nf">_missing_deps_func</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> | ||
<span class="k">raise</span> <span class="ne">ImportError</span><span class="p">(</span><span class="s2">"Importing fails for ase / numpy!"</span><span class="p">)</span> | ||
|
||
|
||
<div class="viewcode-block" id="SPARCMissingDeps"> | ||
<a class="viewcode-back" href="../api/sparc.html#sparc.SPARCMissingDeps">[docs]</a> | ||
<span class="k">class</span> <span class="nc">SPARCMissingDeps</span><span class="p">:</span> | ||
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> | ||
<span class="k">raise</span> <span class="ne">ImportError</span><span class="p">(</span> | ||
<span class="s2">"Cannot initialize sparc.SPARC because the required dependencies (ase and numpy) are not available."</span> | ||
<span class="p">)</span> | ||
|
||
<span class="k">def</span> <span class="fm">__getattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span> | ||
<span class="k">raise</span> <span class="ne">ImportError</span><span class="p">(</span> | ||
<span class="sa">f</span><span class="s2">"Cannot access '</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2">' on sparc.SPARC because the required dependencies (ase and numpy) are not available."</span> | ||
<span class="p">)</span></div> | ||
|
||
|
||
|
||
<span class="k">try</span><span class="p">:</span> | ||
<span class="kn">import</span> <span class="nn">ase</span> | ||
<span class="kn">import</span> <span class="nn">numpy</span> | ||
|
||
<span class="n">_import_complete</span> <span class="o">=</span> <span class="kc">True</span> | ||
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span> | ||
<span class="n">_import_complete</span> <span class="o">=</span> <span class="kc">False</span> | ||
|
||
<span class="k">if</span> <span class="n">_import_complete</span><span class="p">:</span> | ||
<span class="kn">from</span> <span class="nn">packaging</span> <span class="kn">import</span> <span class="n">version</span> | ||
|
||
<span class="kn">from</span> <span class="nn">.calculator</span> <span class="kn">import</span> <span class="n">SPARC</span> | ||
<span class="kn">from</span> <span class="nn">.io</span> <span class="kn">import</span> <span class="n">read_sparc</span><span class="p">,</span> <span class="n">register_ase_io_sparc</span><span class="p">,</span> <span class="n">write_sparc</span> | ||
|
||
<span class="c1"># If ase version less than 3.23, use manual register function</span> | ||
<span class="c1"># Otherwise use the new entry point</span> | ||
<span class="k">if</span> <span class="n">version</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">ase</span><span class="o">.</span><span class="n">__version__</span><span class="p">)</span> <span class="o"><</span> <span class="n">version</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="s2">"3.23"</span><span class="p">):</span> | ||
<span class="n">register_ase_io_sparc</span><span class="p">()</span> | ||
<span class="k">else</span><span class="p">:</span> | ||
<span class="c1"># register calculator class <experimental></span> | ||
<span class="kn">from</span> <span class="nn">ase.calculators.calculator</span> <span class="kn">import</span> <span class="n">register_calculator_class</span> | ||
|
||
<span class="n">register_calculator_class</span><span class="p">(</span><span class="s2">"sparc"</span><span class="p">,</span> <span class="n">SPARC</span><span class="p">)</span> | ||
<span class="k">else</span><span class="p">:</span> | ||
<span class="c1"># If importing is not complete, any code trying to directly import</span> | ||
<span class="c1"># the following attributes will raise ImportError</span> | ||
<span class="n">read_sparc</span> <span class="o">=</span> <span class="n">_missing_deps_func</span> | ||
<span class="n">write_sparc</span> <span class="o">=</span> <span class="n">_missing_deps_func</span> | ||
<span class="n">SPARC</span> <span class="o">=</span> <span class="n">SPARCMissingDeps</span> | ||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2024, SPARC-X Developmers.</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> |
Oops, something went wrong.