From 2cd1f71d8a5181e3dfc5c9e0615cecc2840862f3 Mon Sep 17 00:00:00 2001
From: Stefan Bienert <stefan.bienert@unibas.ch>
Date: Tue, 10 Mar 2020 21:58:00 +0100
Subject: [PATCH] SCHWED-4715: Get rid of Python 2.7 as a string as far as
 sensible

---
 core/init/__init__.py.in                                | 2 +-
 doc/contributing.rst                                    | 4 ++--
 extras/scoring_weight_training/run_all_optimizations.py | 3 +++
 extras/scoring_weight_training/run_array_job.sh         | 3 +++
 sidechain/doc/rotamer.rst                               | 4 ++--
 sidechain/doc/rotamer_constructor.rst                   | 2 +-
 sidechain/doc/rotamer_lib.rst                           | 4 ++--
 7 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/core/init/__init__.py.in b/core/init/__init__.py.in
index 1c6de949..47141c5c 100644
--- a/core/init/__init__.py.in
+++ b/core/init/__init__.py.in
@@ -72,7 +72,7 @@ if not conop.GetDefaultLib():
 
 # ensure that PROMOD3_SHARED_DATA_PATH env. var. set and override if needed
 if GetProMod3SharedDataPath() is None:
-    # module_path = PROMOD3_ROOT/lib64/python2.7/site-packages/promod3
+    # module_path = PROMOD3_ROOT/lib64/python3.6/site-packages/promod3
     module_path = os.path.dirname(os.path.abspath(__file__))
     # get PROMOD3_ROOT
     promod3_lib = os.path.dirname(os.path.dirname(os.path.dirname(module_path)))
diff --git a/doc/contributing.rst b/doc/contributing.rst
index dc7f61a9..7f7e75ac 100644
--- a/doc/contributing.rst
+++ b/doc/contributing.rst
@@ -437,7 +437,7 @@ Quick testing of |project| features
 High-level features of |project|, can be tested directly in an interactive
 Python shell. First, you need to tell Python, where to find the modules by
 defining the ``PYTHONPATH`` env. variable in your shell to include the
-:file:`lib64/python2.7/site-packages` folders of the :file:`stage` folders of
+:file:`lib64/python3.6/site-packages` folders of the :file:`stage` folders of
 |project| and |ost_s|. For convenience, you can place the export-command in
 your :file:`.bashrc` (or so). Then, you can import modules from ``promod3``
 and ``ost`` as in the example codes shown in this documentation.
@@ -569,7 +569,7 @@ module, for example
   :py_docs:`standard library <library/>`
 
 Modules from the |python| standard library are covered by the |python|
-`license <https://www.python.org/download/releases/2.7.5/license>`_ and
+`license <https://docs.python.org/3.6/license.html>`_ and
 licenses is what you have to watch out for with this subject. While the |python|
 license is safe to be used, in the past several projects went restrictive
 because of exclusive terms of use. Those issues often came from 'academic
diff --git a/extras/scoring_weight_training/run_all_optimizations.py b/extras/scoring_weight_training/run_all_optimizations.py
index de7157b3..7fdbd7a5 100644
--- a/extras/scoring_weight_training/run_all_optimizations.py
+++ b/extras/scoring_weight_training/run_all_optimizations.py
@@ -13,6 +13,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+This message should intentionally fail the script.
+This script was not ported to Python 3. Should be done along the next time a
+real use case pops up.
 
 import os, json
 
diff --git a/extras/scoring_weight_training/run_array_job.sh b/extras/scoring_weight_training/run_array_job.sh
index 7ea7ef6a..dcb52700 100644
--- a/extras/scoring_weight_training/run_array_job.sh
+++ b/extras/scoring_weight_training/run_array_job.sh
@@ -1,3 +1,6 @@
+Mean text supposed to make any attempt to run the script fail ;)
+This script is not ported to Python 3, yet. THe reason is simply that it was not used in a long time plus for tresting you first need the proper use case.
+
 #!/bin/bash
 #$ -t 1-500
 #$ -cwd
diff --git a/sidechain/doc/rotamer.rst b/sidechain/doc/rotamer.rst
index d64844a8..7e87093f 100644
--- a/sidechain/doc/rotamer.rst
+++ b/sidechain/doc/rotamer.rst
@@ -23,7 +23,7 @@ A rotamer represents an amino acid sidechain identified by a :class:`RotamerID`
 and is a set of :class:`Particle` objects. 
 Two types of rotamers exist. The :class:`RRMRotamer` and :class:`FRMRotamer`. 
 To gather all possible rotamers for one location,
-ProMod3 offers the :class:`RRMRotamerGroup` and :class:`FRMRotamerGroup`.
+|project| offers the :class:`RRMRotamerGroup` and :class:`FRMRotamerGroup`.
 All parts of the structure that are kept rigid can be represented by
 a :class:`Frame` object.
 
@@ -111,7 +111,7 @@ The Smallest Building Block - The Particle
 
 Particles give raise to more complex objects such as rotamers and frame 
 residues. They contain all data required to calculate pairwise energies.
-For every energy function available in ProMod3, there's a particle creation
+For every energy function available in |project|, there's a particle creation
 function.
 
 .. class:: PScoringFunction
diff --git a/sidechain/doc/rotamer_constructor.rst b/sidechain/doc/rotamer_constructor.rst
index 15d8f7d4..0691cf8b 100644
--- a/sidechain/doc/rotamer_constructor.rst
+++ b/sidechain/doc/rotamer_constructor.rst
@@ -20,7 +20,7 @@ Rotamer Constructor
 .. currentmodule:: promod3.sidechain
 
 Instead of creating rotamers or frame residues by yourself, you can use the 
-convenient functionality provided by ProMod3.
+convenient functionality provided by |project|.
 
 
 The RotamerConstructor Baseclass
diff --git a/sidechain/doc/rotamer_lib.rst b/sidechain/doc/rotamer_lib.rst
index 41fdb700..02bee83d 100644
--- a/sidechain/doc/rotamer_lib.rst
+++ b/sidechain/doc/rotamer_lib.rst
@@ -25,7 +25,7 @@ sidechain can completely be described in terms of dihedral angles. Preferred
 combinations of such dihedral angles are a result of steric properties and
 can be gathered in rotamer libraries. Different libraries exist in the field
 and their main difference is, whether the provided sidechain conformations 
-are dependent on their backbone or not. ProMod3 provides you with a 
+are dependent on their backbone or not. |project| provides you with a 
 :class:`BBDepRotamerLib` organizing rotamers for the different aminoacids 
 in equidistant phi/psi bins, as well as a simple :class:`RotamerLib`.
 Both libraries are containers for :class:`RotamerLibEntry` and are optimized
@@ -443,7 +443,7 @@ Rotamer Configurations
 In rotamers, one distinguishes between rotameric and non-rotameric sidechain
 dihedral angles. The rotameric ones are around SP3-SP3 hybridized bonds and
 typically have three distinct configurations (trans, gauche-, gauche+).
-The non-rotameric ones behave differently. ProMod3 offers some functionality
+The non-rotameric ones behave differently. |project| offers some functionality
 to estimate those configurations.
 
 .. class:: DihedralConfiguration
-- 
GitLab