Repository: Becksteinlab/GromacsWrapper (language: python)

Issue:
removed support for Python <= 3.7
- close #259 
- removed six and replaced with Python 3.x constructs
- updated package meta data
- update installation docs (sphinx and README)
- updated CHANGES
drop support for very old Python versions
GromacsWrapper has been supporting legacy Python for a long time (2.7, <3.7... arguable 3.7 and 3.8 are also old) and in principle we could continue to do so. However, it becomes increasingly complex to manage the testing of the old versions so we will **retire support for Python 2.7 and ~<3.7~ ≤3.7 in the next release**. 

GW 0.8.5 #256  is the last release that supports the full range of Python versions.
RTD failing
RTD fails with

     ModuleNotFoundError: No module named 'sphinx_rtd_theme'


Discussion / hints:
## [Codecov](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab) Report
> Merging [#265](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab) (87509d5) into [main](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/commit/1001a09237d1f5e475c8112a51cf964c890217a0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab) (1001a09) will **increase** coverage by `2.39%`.
> The diff coverage is `87.50%`.

```diff
@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
+ Coverage   66.50%   68.89%   +2.39%     
==========================================
  Files          23       22       -1     
  Lines        4356     3945     -411     
  Branches      758      708      -50     
==========================================
- Hits         2897     2718     -179     
+ Misses       1261     1047     -214     
+ Partials      198      180      -18     
```


| [Files](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab) | Coverage Δ | |
|---|---|---|
| [gromacs/\_\_init\_\_.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9fX2luaXRfXy5weQ==) | `72.30% <ø> (-0.42%)` | :arrow_down: |
| [gromacs/cbook.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9jYm9vay5weQ==) | `27.40% <ø> (-0.21%)` | :arrow_down: |
| [gromacs/collections.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9jb2xsZWN0aW9ucy5weQ==) | `84.09% <100.00%> (ø)` | |
| [gromacs/config.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9jb25maWcucHk=) | `74.68% <100.00%> (-2.20%)` | :arrow_down: |
| [gromacs/core.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9jb3JlLnB5) | `70.99% <100.00%> (-0.50%)` | :arrow_down: |
| [gromacs/environment.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9lbnZpcm9ubWVudC5weQ==) | `70.76% <100.00%> (-0.45%)` | :arrow_down: |
| [gromacs/fileformats/\_\_init\_\_.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9maWxlZm9ybWF0cy9fX2luaXRfXy5weQ==) | `100.00% <ø> (ø)` | |
| [gromacs/fileformats/convert.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9maWxlZm9ybWF0cy9jb252ZXJ0LnB5) | `58.62% <100.00%> (-0.48%)` | :arrow_down: |
| [gromacs/fileformats/mdp.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9maWxlZm9ybWF0cy9tZHAucHk=) | `96.92% <100.00%> (-0.10%)` | :arrow_down: |
| [gromacs/fileformats/ndx.py](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab#diff-Z3JvbWFjcy9maWxlZm9ybWF0cy9uZHgucHk=) | `87.95% <ø> (-0.29%)` | :arrow_down: |
| ... and [10 more](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab) | |

... and [1 file with indirect coverage changes](https://app.codecov.io/gh/Becksteinlab/GromacsWrapper/pull/265/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Becksteinlab)

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in [Chrome](https://chrome.google.com/webstore/detail/codecov/gedikamndpbemklijjkncpnolildpbgo) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/codecov/) today!

The macOS 3.11 GROMACS 2023.1 tests fail 

* tests/test_setup.py::[test_energy_minimize_custom_mdp](https://github.com/Becksteinlab/GromacsWrapper/actions/runs/6793753081/job/18469101228?pr=265#step:9:457)
* tests/fileformats/top/test_charmm22.py::TestCharmm22st::test_mdru
* tests/test_setup.py::test_energy_minimize
```
                :-) GROMACS - gmx mdrun, 2023.1-conda_forge (-:

Executable:   /Users/runner/micromamba/envs/test/bin.AVX2_256/gmx
Data prefix:  /Users/runner/micromamba/envs/test
Working dir:  /private/var/folders/3s/vfzpb5r51gs6y328rmlgzm7c0000gn/T/pytest-of-runner/pytest-0/1ake0/em
Command line:
  gmx mdrun -nt 2 -v -stepout 10 -deffnm em -c em.pdb


Back Off! I just backed up em.log to ./#em.log.1#

-------------------------------------------------------
Program:     gmx mdrun, version 2023.1-conda_forge
Source file: src/gromacs/hardware/printhardware.cpp (line 108)

Fatal error:
The gmx mdrun executable was compiled to use the rdtscp CPU instruction.
However, this is not supported by the current hardware and continuing would
lead to a crash. Please rebuild GROMACS with the GMX_USE_RDTSCP=OFF CMake
option.

For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors
-------------------------------------------------------
```

It looks as if the conda-forge GROMACS package is incompatible with the run environment of GitHub. Not sure what to do...

Let's see if downgrading to conda-forge GROMACS 2022.4 for macOS helps.
After reading https://manual.gromacs.org/2021.3/release-notes/2021/major/portability.html#rdtscp-usage-and-reporting 
> GROMACS now defaults always on x86 to use the RDTSCP machine instruction for lower latency timing. Very old machines might need to configure with GMX_USE_RDTSCP=off. Non-x86 platforms are unaffected, except that they will no longer report that RDTSCP is disabled (because that is self-evident).

I am just trying out the [bioconda gromacs](https://anaconda.org/bioconda/gromacs/files) packages, maybe they are compiled differently?? 
didn't work
Previous successful macOS runners used

      + gromacs                        2021.1  nompi_h2eb4de6_102  bioconda        Cached

so I should try to get this version installed.
How the **** is this failing now when 

      + gromacs                        2021.1  nompi_h2eb4de6_102  bioconda        Cached

is being installed in the macOS 3.11 runner?

The same set up passed the tests previously https://github.com/Becksteinlab/GromacsWrapper/actions/runs/6211029287/job/16859829487 .
There are a few very minor Python package version changes (e.g. numpy 1.24 to 1.25). The image is different 20230901.1 (mac OS 12.6.8) vs 20230921.1 (mac OS 12.6.9). I just don't understand why any of this should matter for GROMACS.

## Failed test 
2023-11-08, this PR
```
2023-11-08T05:49:34.5156160Z Current runner version: '2.311.0'
2023-11-08T05:49:34.5185150Z ##[group]Operating System
2023-11-08T05:49:34.5185780Z macOS
2023-11-08T05:49:34.5186100Z 12.6.9
2023-11-08T05:49:34.5186410Z 21G726
2023-11-08T05:49:34.5186730Z ##[endgroup]
2023-11-08T05:49:34.5187100Z ##[group]Runner Image
2023-11-08T05:49:34.5187530Z Image: macos-12
2023-11-08T05:49:34.5187900Z Version: 20230921.1
2023-11-08T05:49:34.5189060Z Included Software: https://github.com/actions/runner-images/blob/macOS-12/20230921.1/images/macos/macos-12-Readme.md
2023-11-08T05:49:34.5190870Z Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20230921.1
2023-11-08T05:49:34.5191930Z ##[endgroup]
2023-11-08T05:49:34.5192320Z ##[group]Runner Image Provisioner
2023-11-08T05:49:34.5192830Z 2.0.312.1
2023-11-08T05:49:34.5193160Z ##[endgroup]
```

## passed test

2023-09-17 , https://github.com/Becksteinlab/GromacsWrapper/actions/runs/6211029287/job/16859829487
```
2023-09-17T02:16:35.8965190Z Current runner version: '2.309.0'
2023-09-17T02:16:35.9006190Z ##[group]Operating System
2023-09-17T02:16:35.9006970Z macOS
2023-09-17T02:16:35.9007340Z 12.6.8
2023-09-17T02:16:35.9007660Z 21G725
2023-09-17T02:16:35.9008010Z ##[endgroup]
2023-09-17T02:16:35.9008330Z ##[group]Runner Image
2023-09-17T02:16:35.9008820Z Image: macos-12
2023-09-17T02:16:35.9009180Z Version: 20230901.1
2023-09-17T02:16:35.9009740Z Included Software: https://github.com/actions/runner-images/blob/macOS-12/20230901.1/images/macos/macos-12-Readme.md
2023-09-17T02:16:35.9010370Z Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20230901.1
2023-09-17T02:16:35.9010930Z ##[endgroup]
2023-09-17T02:16:35.9011340Z ##[group]Runner Image Provisioner
2023-09-17T02:16:35.9011720Z 2.0.299.1
2023-09-17T02:16:35.9012010Z ##[endgroup]
```
I am reduced to trying out random GROMACS packages in the hope that _one_ works... :-(
Hooray 🎉 , the old GROMACS 2018.6 works on the macOS runners. I don't know why, but I'll take it...



Fix patch:
diff --git a/ci/readthedocs/environment.yml b/ci/readthedocs/environment.yml
index 76164c1d..a5eb0473 100644
--- a/ci/readthedocs/environment.yml
+++ b/ci/readthedocs/environment.yml
@@ -4,9 +4,9 @@ channels:
 - defaults
 dependencies:
 - python=3.11
-- six
 - numpy>=1.0
 - matplotlib-base
 - pandas
 - numkit>=1.0
 - gromacs==2023.1
+- sphinx_rtd_theme
diff --git a/ci/readthedocs/requirements.txt b/ci/readthedocs/requirements.txt
index 5cc2477e..939d390c 100644
--- a/ci/readthedocs/requirements.txt
+++ b/ci/readthedocs/requirements.txt
@@ -1,4 +1,3 @@
-six
 numpy>=1.0
 matplotlib
 pandas
diff --git a/doc/sphinx/source/alternatives.txt b/doc/sphinx/source/alternatives.txt
index 9646c055..db2872d0 100644
--- a/doc/sphinx/source/alternatives.txt
+++ b/doc/sphinx/source/alternatives.txt
@@ -24,11 +24,20 @@ gmxapi_ (M.E. Irrgang, J.M. Hays, and P.M. Kasson)
    `10.1093/bioinformatics/bty484
    <https://doi.org/10.1093/bioinformatics/bty484>`_
 
+`gromacs_py`_ (Samuel Murail, Maxence Delaunay, Damien Espana)
+   Gromacs_py is a Python library allowing a simplified use of the
+   Gromacs MD simulation software. Gromacs_py can build a system
+   topologie based on a pdb file, create the simulation system (pbc
+   box, adding water and ions) and run minimisation, equilibration and
+   production runs. One of the main objective of the Gromacs_py
+   wrapper is to automatize routine operations for MD simulation of
+   multiple systems.
+   
 MDAnalysis_ (N. Michaud-Agrawal, E. J. Dennning, and O. Beckstein)
   Reads various trajectories (dcd, xtc, trr) and makes coordinates
   available as numpy_ arrays. It also has a fairly sophisticated
   selection language, similar to Charmm_ or VMD_.
-
+  
 ParmEd_
   A general tool for working with topology files for all the popular
   MD codes, including the `parmed.gromacs`_ module for ITP and TOP
@@ -160,3 +169,4 @@ they can be added here. Thanks.
 .. _issue tracker: https://github.com/Becksteinlab/GromacsWrapper/issues
 .. _ParmEd: http://parmed.github.io/ParmEd/html/index.html
 .. _parmed.gromacs: http://parmed.github.io/ParmEd/html/api/parmed/parmed.gromacs.html
+.. _`gromacs_py`: https://github.com/samuelmurail/gromacs_py
diff --git a/doc/sphinx/source/index.txt b/doc/sphinx/source/index.txt
index 3d241a03..2c1abc57 100644
--- a/doc/sphinx/source/index.txt
+++ b/doc/sphinx/source/index.txt
@@ -2,21 +2,21 @@
 .. GromacsWrapper documentation master file, created by sphinx-quickstart on Tue Jun 23 19:38:56 2009.
 
 ====================================================
-  GromacsWrapper --- a Python framework for Gromacs
+  GromacsWrapper --- a Python framework for GROMACS
 ====================================================
 
 :Release: |release|
 :Date: |today|
 
 
-**GromacsWrapper** is a Python package (Python 2.7.x and Python ≥ 3.6)
-that wraps system calls to GROMACS_ tools into thin classes. This
-allows for fairly seamless integration of the gromacs tools into
-Python_ scripts. This is generally superior to shell scripts because
-of Python's better error handling and superior data structures. It
-also allows for modularization and code re-use. In addition, commands,
-warnings and errors are logged to a file so that there exists a
-complete history of what has been done.
+**GromacsWrapper** is a pure Python package that wraps system calls to
+GROMACS_ tools into thin classes. This allows for fairly seamless
+integration of the GROMACS tools into Python_ scripts. This is
+generally superior to shell scripts because of Python's better error
+handling and superior data structures. It also allows for
+modularization and code re-use. In addition, commands, warnings and
+errors are logged to a file so that there exists a complete history of
+what has been done.
 
 GROMACS_ versions 4.6.x, 2016.x, 2018.x, 2019.x, 2020.x, 2021.x,
 2022.x, and 2023.x are all supported. GromacsWrapper detects your
@@ -24,8 +24,8 @@ Gromacs tools and provides them as :func:`gromacs.grompp`,
 :func:`gromacs.mdrun`, etc, regardless of your Gromacs version, which
 allows one to write scripts that are broadly Gromacs-version
 agnostic. Source your ``GMXRC`` file or make the :program:`gmx` binary
-(for versions ≥ 5.x) or all the Gromacs tools available on your
-:envvar:`PATH` for GromacsWrapper to find the Gromacs installation.
+(for versions ≥ 5.x) or all the GROMACS tools available on your
+:envvar:`PATH` for GromacsWrapper to find the GROMACS installation.
 
 .. warning::
 
@@ -51,9 +51,9 @@ you're fixing.
 Getting started
 ===============
 	     
-See :ref:`installation` for download and installation instructions. The
-:ref:`quickstart` provides a brief example of how to use
-GromacsWrapper in the most basic fashion.
+See :ref:`installation` for supported versions of Python and download
+and installation instructions. The :ref:`quickstart` provides a brief
+example of how to use GromacsWrapper in the most basic fashion.
 
 The source code itself is available in the `GromacsWrapper git
 repository`_.


Test patch:
diff --git a/ci/conda-envs/test_env.yaml b/ci/conda-envs/test_env.yaml
index 28698900..20c28775 100644
--- a/ci/conda-envs/test_env.yaml
+++ b/ci/conda-envs/test_env.yaml
@@ -3,7 +3,6 @@ channels:
 - conda-forge
 dependencies:
 - python
-- six
 - numpy>=1.0
 - matplotlib
 - pandas>=0.17