From 386ae0915df7c546c5d9e1a5b72d43019d929ed5 Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Mon, 27 Jul 2020 12:39:35 +0200
Subject: [PATCH] add examples in the Singularity documentation

---
 doc/container/singularity.rst | 37 +++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/doc/container/singularity.rst b/doc/container/singularity.rst
index a1e8c12c..cd006fdb 100644
--- a/doc/container/singularity.rst
+++ b/doc/container/singularity.rst
@@ -57,6 +57,43 @@ To list all available |project| modelling actions:
 
     singularity run --app PM promod.img help
 
+So you can either run an action with:
+
+.. code-block:: bash
+
+    singularity run --app PM promod.img build-model [options]
+
+or an arbitrary Python script using OpenStructure / |project| with:
+
+.. code-block:: bash
+
+    singularity run --app PM promod.img my_script.py [options] 
+
+The Notebook app provides a jupyter notebook playground with OST, |project|, and
+nglview available. You can fire it up with:
+
+.. code-block:: bash
+
+    singularity run --app Notebook promod.img
+
+connect to the notebook, start a new OST kernel and test it with the following 
+code snippet:
+
+.. code-block:: python
+
+    from ost import io
+    from promod3 import loop
+    import nglview
+
+    # generate backbone with dihedrals of a helix and store it
+    sequence = "HELLYEAH"
+    bb_list = loop.BackboneList(sequence)
+    io.SavePDB(bb_list.ToEntity(), "test.pdb")
+
+    # display stored file
+    view = nglview.show_file("test.pdb")
+    view
+
 The Compound Library
 --------------------
 
-- 
GitLab