Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fjclark committed May 8, 2024
1 parent 0e2e674 commit 991a256
Show file tree
Hide file tree
Showing 45 changed files with 4,862 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ __pycache__
.*_cache
coverage
/test-config.toml
_build
test
tmp
testing.ipynb
Expand Down
4 changes: 4 additions & 0 deletions _build/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +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: 81cbf3a88fcf36e1f0829019d8b2d3c6
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added _build/.doctrees/environment.pickle
Binary file not shown.
Binary file added _build/.doctrees/index.doctree
Binary file not shown.
Binary file added _build/.doctrees/production-md.doctree
Binary file not shown.
Binary file added _build/.doctrees/steps/biosimspace.doctree
Binary file not shown.
Binary file added _build/.doctrees/steps/index.doctree
Binary file not shown.
Empty file added _build/.nojekyll
Empty file.
70 changes: 70 additions & 0 deletions _build/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.. maize-biosimspace documentation master file, created by
sphinx-quickstart on Wed Mar 8 17:24:58 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
maize-biosimspace
=================
*maize* is a graph-based workflow manager for computational chemistry pipelines. This repository contains a namespace package providing BioSimSpace extensions for *maize*. You can find the core maize documentation `here <https://molecularai.github.io/maize>`_.

.. toctree::
:hidden:
:maxdepth: 1
:caption: Examples

production-md

.. toctree::
:hidden:
:maxdepth: 1
:caption: Reference

steps/index

.. toctree::
:hidden:
:maxdepth: 1
:caption: Core

Steps <https://molecularai.github.io/maize/docs/steps>
Maize <https://molecularai.github.io/maize>

Installation
------------
To install, simply clone this repository and run:

.. code-block:: bash
mamba env create -f env-users.yml
mamba activate maize-biosimspace
pip install --no-deps ./
If you want to keep up-to-date with the latest changes to the core, clone `maize <https://github.com/MolecularAI/maize>`_, switch to the directory, and run (in the same conda environment):

.. code-block:: bash
pip install --no-deps ./
If you plan on developing, you should use ``env-dev.yml`` instead and use the ``-e`` flag for ``pip``.

Configuration
-------------
Each step documentation will contain information on how to setup and run the node, as well as install the required dependencies. Dependencies can be managed in several ways, depending on the node and workflow you are running:

* Through a ``module`` system:

Specify a module providing an executable in the ``config.toml`` (see `Configuring workflows <https://molecularai.github.io/maize/docs/userguide.html#config-workflow>`_). This module will then be loaded in the process running the node.

* With a separate python environment:

Some nodes will require custom python environments that are likely to be incompatible with the other environments. In those cases, the node process can be spawned in a custom environment. Note that this environment must still contain *maize*.

* By specifying the executable location and possibly script interpreter. This can also be accomplished using ``config.toml`` (see `Configuring workflows <https://molecularai.github.io/maize/docs/userguide.html#config-workflow>`_).


Indices and tables
------------------

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
61 changes: 61 additions & 0 deletions _build/_sources/production-md.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Production MD
==============

An example of a production molecular dynamics workflow using BioSimSpace Maize nodes:

.. code-block:: python
"""Run production Molecular Dynamics using PMEMD.CUDA through BioSimSpace."""
from pathlib import Path
from maize.core.workflow import Workflow
from maize.steps.exs.biosimspace import ProductionPmemdCuda
from maize.steps.io import LoadData, Return
from maize.utilities.execution import JobResourceConfig
# Build the graph
flow = Workflow(name="Prod_BSS_AMBER_Test", cleanup_temp=False, level="debug")
# Add the nodes
load_sys = flow.add(LoadData[list[Path]])
prod_pmemd = flow.add(
ProductionPmemdCuda,
name="Production_Amber",
parameters={
"runtime": 1.0, # ns
},
)
retu = flow.add(Return[list[Path]])
# Set parameters
load_sys.data.set(
[
Path(
"< path to complex.prm7>" # CHANGEME
),
Path(
"< path to complex.rst7>" # CHANGEME
),
]
)
# Connect the nodes
flow.connect(load_sys.out, prod_pmemd.inp)
flow.connect(prod_pmemd.out, retu.inp)
# Check and run!
flow.check()
flow.visualize()
flow.execute()
mols = retu.get()
# Load a BioSimSpace system from the returned paths
import BioSimSpace as BSS
sys = BSS.IO.readMolecules([str(mols[0]), str(mols[1])])
print(40 * "#")
print(sys)
# In reality, you would do something here...
9 changes: 9 additions & 0 deletions _build/_sources/steps/biosimspace.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BioSimSpace
==================

.. automodule:: maize.steps.exs.biosimspace
:members:
:no-value:
:noindex:
:exclude-members: full_timer, run_timer, logger, target_dir, work_dir, run, build
:inherited-members: Node, Component
11 changes: 11 additions & 0 deletions _build/_sources/steps/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _custom-steps:

Steps
=====
This is the documentation of all contained steps.

.. toctree::
:maxdepth: 1
:caption: Steps

biosimspace
Loading

0 comments on commit 991a256

Please sign in to comment.