Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Sep 9, 2024
1 parent 4519790 commit 5fcecc2
Show file tree
Hide file tree
Showing 23 changed files with 450 additions and 56 deletions.
11 changes: 5 additions & 6 deletions bio_compose/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@


def run_simulation(*args, **kwargs) -> SimulationResult:
"""
Run a simulation with BioCompose.
"""Run a simulation with BioCompose.
:param args: Positional arguments
* 1 argument (smoldyn simulation only): smoldyn simulation configuration in which time parameters (dt, duration) are already defined.
* 3 arguments (smoldyn simulation only): smoldyn configuration file, smoldyn simulation duration, smoldyn simulation dt
* 5 arguments (sbml simulation only): sbml filepath, simulation start, simulation end, simulation steps, simulator
:param args: Positional arguments:
* 1 argument (smoldyn simulation only): smoldyn simulation configuration in which time parameters (dt, duration) are already defined.
* 3 arguments (smoldyn simulation only): smoldyn configuration file, smoldyn simulation duration, smoldyn simulation dt
* 5 arguments (sbml simulation only): sbml filepath, simulation start, simulation end, simulation steps, simulator
:param kwargs: Keyword arguments
Expand Down
Binary file modified documentation/build/doctrees/bio_compose.doctree
Binary file not shown.
Binary file modified documentation/build/doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified documentation/build/doctrees/index.doctree
Binary file not shown.
Binary file added documentation/build/html/_images/bio-compose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 12 additions & 8 deletions documentation/build/html/_modules/bio_compose.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@
</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>
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../getting-started.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting-started.html#verification">Verification</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting-started.html#simulation-runs">Simulation Runs</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">BioCompose modules</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="../modules.html">bio_compose</a></li>
</ul>

Expand Down Expand Up @@ -91,13 +96,12 @@ <h1>Source code for bio_compose</h1><div class="highlight"><pre>
<div class="viewcode-block" id="run_simulation">
<a class="viewcode-back" href="../bio_compose.html#bio_compose.run_simulation">[docs]</a>
<span class="k">def</span> <span class="nf">run_simulation</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="o">-&gt;</span> <span class="n">SimulationResult</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Run a simulation with BioCompose.</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Run a simulation with BioCompose.</span>

<span class="sd"> :param args: Positional arguments</span>
<span class="sd"> * 1 argument (smoldyn simulation only): smoldyn simulation configuration in which time parameters (dt, duration) are already defined.</span>
<span class="sd"> * 3 arguments (smoldyn simulation only): smoldyn configuration file, smoldyn simulation duration, smoldyn simulation dt</span>
<span class="sd"> * 5 arguments (sbml simulation only): sbml filepath, simulation start, simulation end, simulation steps, simulator</span>
<span class="sd"> :param args: Positional arguments:</span>
<span class="sd"> * 1 argument (smoldyn simulation only): smoldyn simulation configuration in which time parameters (dt, duration) are already defined.</span>
<span class="sd"> * 3 arguments (smoldyn simulation only): smoldyn configuration file, smoldyn simulation duration, smoldyn simulation dt</span>
<span class="sd"> * 5 arguments (sbml simulation only): sbml filepath, simulation start, simulation end, simulation steps, simulator</span>

<span class="sd"> :param kwargs: Keyword arguments</span>

Expand Down
9 changes: 7 additions & 2 deletions documentation/build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@
</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>
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../getting-started.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting-started.html#verification">Verification</a></li>
<li class="toctree-l1"><a class="reference internal" href="../getting-started.html#simulation-runs">Simulation Runs</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">BioCompose modules</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="../modules.html">bio_compose</a></li>
</ul>

Expand Down
87 changes: 87 additions & 0 deletions documentation/build/html/_sources/getting-started.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Installation
============

To install `bio-compose`, you can use pip:

.. code-block:: bash
pip install bio-compose
If you are installing from source, clone the repository and use the following commands:

.. code-block:: bash
git clone https://github.com/biosimulators/bio-compose.git
cd your_project
pip install -e .
Verification
============


Running a verification with `bio-compose` can be achieved in a few simple steps.

Running a **OMEX verifications**:

.. code-block:: python
from bio_compose import verify
filepath = '/path/to/a/valid/omex/file.omex'
simulators = ['amici', 'copasi', 'tellurium']
verification = verify(filepath, simulators)
Running **SBML verifications**:

.. code-block:: python
from bio_compose import verify
filepath = '/path/to/a/valid/sbml/file.xml'
simulators = ['amici', 'copasi', 'tellurium']
start_time = 0
duration = 100
n_steps = 1000
verification = verify(filepath, start_time, duration, n_steps, simulators)
Simulation Runs
===============

`bio-compose` has a `run_simulation` method that can be used to run either: a Smoldyn simulation **OR** a SBML simulation.

Running a **Smoldyn simulation**:

.. code-block:: python
from bio_compose import run_simulation
filepath = '/path/to/a/valid/smoldyn/configuration/txt/file.txt'
duration = 10
dt = 0.02
result = run_simulation(filepath, duration, dt)
Running a **SBML simulation**:

.. code-block:: python
from bio_compose import run_simulation
filepath = '/path/to/a/valid/sbml/file.xml'
simulator = 'copasi'
start_time = 0
duration = 100
n_steps = 1000
result = run_simulation(filepath, start_time, duration, n_steps, simulator)
11 changes: 9 additions & 2 deletions documentation/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ BioCompose documentation
========================
Create, execute, and introspect reproducible composite simulations of dynamic biological systems.

.. image:: ./bio-compose.png
:alt: BioCompose logo

.. toctree::
:maxdepth: 2
:caption: Contents:
:caption: Getting started

getting-started

.. toctree::
:maxdepth: 2
:caption: BioCompose modules

installation
modules

11 changes: 8 additions & 3 deletions documentation/build/html/bio_compose.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@
</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>
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="getting-started.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting-started.html#verification">Verification</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting-started.html#simulation-runs">Simulation Runs</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">BioCompose modules</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="modules.html">bio_compose</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">bio_compose package</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#submodules">Submodules</a></li>
Expand Down Expand Up @@ -671,7 +676,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>args</strong> – Positional arguments
<li><p><strong>args</strong> – Positional arguments:
* 1 argument (smoldyn simulation only): smoldyn simulation configuration in which time parameters (dt, duration) are already defined.
* 3 arguments (smoldyn simulation only): smoldyn configuration file, smoldyn simulation duration, smoldyn simulation dt
* 5 arguments (sbml simulation only): sbml filepath, simulation start, simulation end, simulation steps, simulator</p></li>
Expand Down
9 changes: 7 additions & 2 deletions documentation/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@
</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>
<p class="caption" role="heading"><span class="caption-text">Getting started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="getting-started.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting-started.html#verification">Verification</a></li>
<li class="toctree-l1"><a class="reference internal" href="getting-started.html#simulation-runs">Simulation Runs</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">BioCompose modules</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="modules.html">bio_compose</a></li>
</ul>

Expand Down
Loading

0 comments on commit 5fcecc2

Please sign in to comment.