Skip to content

Commit

Permalink
Merge pull request #277 from OpenBioSim/sync_exscientia
Browse files Browse the repository at this point in the history
Sync with Exscientia remote
  • Loading branch information
lohedges authored Apr 15, 2024
2 parents fdff786 + d79961e commit 3abcec4
Show file tree
Hide file tree
Showing 57 changed files with 1,418 additions and 710 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Sandpit_exs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Install dependency
run: |
mamba install -c conda-forge -c openbiosim/label/main biosimspace python=3.10 ambertools gromacs "sire=2023.4" "alchemlyb>=2.1" pytest openff-interchange pint=0.21 rdkit "jaxlib>0.3.7" tqdm
mamba install -c conda-forge -c openbiosim/label/main biosimspace python=3.10 ambertools gromacs "sire=2023.5" "alchemlyb>=2.1" pytest openff-interchange pint=0.21 rdkit "jaxlib>0.3.7" tqdm
python -m pip install git+https://github.com/Exscientia/MDRestraintsGenerator.git
# For the testing of BSS.FreeEnergy.AlchemicalFreeEnergy.analysis
python -m pip install https://github.com/alchemistry/alchemtest/archive/master.zip
Expand Down
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,35 +63,35 @@ Conda package
The easiest way to install BioSimSpace is using our `conda channel <https://anaconda.org/openbiosim/repo>`__.
BioSimSpace is built using dependencies from `conda-forge <https://conda-forge.org/>`__,
so please ensure that the channel takes strict priority. We recommend using
`Mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__.
`Miniforge <https://github.com/conda-forge/miniforge>`__.

To create a new environment:

.. code-block:: bash
mamba create -n openbiosim -c conda-forge -c openbiosim biosimspace
mamba activate openbiosim
conda create -n openbiosim -c conda-forge -c openbiosim biosimspace
conda activate openbiosim
To install the latest development version you can use:

.. code-block:: bash
mamba create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace
mamba activate openbiosim-dev
conda create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace
conda activate openbiosim-dev
When updating the development version it is generally advised to update `Sire <https://github.com/openbiosim/sire>`_
at the same time:

.. code-block:: bash
mamba update -c conda-forge -c openbiosim/label/dev biosimspace sire
conda update -c conda-forge -c openbiosim/label/dev biosimspace sire
Unless you add the required channels to your Conda configuration, then you'll
need to add them when updating, e.g., for the development package:

.. code-block:: bash
mamba update -c conda-forge -c openbiosim/label/dev biosimspace
conda update -c conda-forge -c openbiosim/label/dev biosimspace
Installing from source
^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -146,8 +146,8 @@ latest development code into that.

.. code-block:: bash
mamba create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace --only-deps
mamba activate openbiosim-dev
conda create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace --only-deps
conda activate openbiosim-dev
git clone https://github.com/openbiosim/biosimspace
cd biosimspace/python
BSS_SKIP_DEPENDENCIES=1 python setup.py develop
Expand Down
13 changes: 13 additions & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ company supporting open-source development of fostering academic/industrial coll
within the biomolecular simulation community. Our software is hosted via the `OpenBioSim`
`GitHub <https://github.com/OpenBioSim/biosimspace>`__ organisation.

`2023.5.1 <https://github.com/openbiosim/biosimspace/compare/2023.5.0...2023.5.1>`_ - Mar 20 2024
-------------------------------------------------------------------------------------------------

* Fixed path to user links file in the :func:`generateNetwork <BioSimSpace.Align.generateNetwork>` function (`#233 <https://github.com/OpenBioSim/biosimspace/pull/233>`__).
* Fixed redirection of stderr (`#233 <https://github.com/OpenBioSim/biosimspace/pull/233>`__).
* Switched to using ``AtomCoordMatcher`` to map parameterised molecules back to their original topology. This resolves issues where atoms moved between residues following parameterisation (`#235 <https://github.com/OpenBioSim/biosimspace/pull/235>`__).
* Make the GROMACS ``_generate_binary_run_file`` function static so that it can be used when initialising free energy simulations in setup-only mode (`#237 <https://github.com/OpenBioSim/biosimspace/pull/237>`__).
* Improve error handling and message when attempting to extract an all dummy atom selection (`#251 <https://github.com/OpenBioSim/biosimspace/pull/251>`__).
* Don't set SOMD specific end-state properties when decoupling a molecule (`#253 <https://github.com/OpenBioSim/biosimspace/pull/253>`__).
* Only convert to a end-state system when not running a free energy protocol with GROMACS so that hybrid topology isn't lost when using position restraints (`#257 <https://github.com/OpenBioSim/biosimspace/pull/257>`__).
* Exclude standard free ions from the AMBER position restraint mask (`#260 <https://github.com/OpenBioSim/biosimspace/pull/260>`__).
* Update the ``BioSimSpace.Types._GeneralUnit.__pow__`` operator to support fractional exponents (`#260 <https://github.com/OpenBioSim/biosimspace/pull/260>`__).

`2023.5.0 <https://github.com/openbiosim/biosimspace/compare/2023.4.1...2023.5.0>`_ - Dec 16 2023
-------------------------------------------------------------------------------------------------

Expand Down
28 changes: 3 additions & 25 deletions doc/source/contributing/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
Development process
===================

:mod:`BioSimSpace` uses a ``main``, ``devel`` and ``future`` development process,
:mod:`BioSimSpace` uses a ``main`` and ``devel`` development process,
using feature branches for all code development.

* ``main`` - this always contains the latest official release.
* ``devel`` - this always contains the latest development release, which will become the next official release.
* ``future`` - this contains pull requests that have been accepted, but which are targetted for a future release (i.e. not the next official release)

Code should be developed on a fork or in a feature branch called ``feature_{feature}``.
When your feature is ready, please submit a pull request against ``devel``. This
Expand All @@ -27,29 +26,8 @@ tests, examples and/or tutorial instructions.
the tutorials or writing a detailed description for the website.

Assuming the CI completes successfully, then one of the release team will
conduct a code review. The outcome of the review will be one of the following;

1. This feature is ready, and should be part of the next official release. The pull request
will be accepted into ``devel``. This will trigger our CI/CD process, building the new dev
package and uploading it to `anaconda.org <https://anaconda.org/openbiosim/biosimspace>`__
for everyone to use.

2. This feature is good, but it is not yet ready to be part of the next offical release. This
could be because the feature is part of a series, and all of the series need to be finished
before release. Or because we are in a feature freeze period. Or because you want more time
for people to explore and play with the feature before it is officially released (and would
then need to be supported, and backwards compatibility maintained). If this is the case (or
it is your request) then the pull request will be redirected into the ``future`` branch.
Once it (and features that depend on it) are ready, you can then issue a pull request for
all of the features at once into ``devel``. It will be noted that each of the individual
parts have already been code reviewed, so the process to accept the combination
into ``devel`` should be more straightforward.

3. This feature is good, but more work is needed before it can be accepted. This could be
because some of the unit tests haven't passed, or the latest version of ``devel`` hasn't
been merged. Or there may be changes that are requested that would make the code easier
to maintain or to preserve backwards compatibility. If this is the case, then we
will engage in conversation with you and will work together to rectify any issues.
conduct a code review, with the code being merged into ``devel`` if it is
approved.

Bug fixes or issue fixes are developed on fix branches, called ``fix_{number}`` (again in
either the main repository or forks). If no `issue thread <https://github.com/OpenBioSim/biosimspace/issues>`__
Expand Down
2 changes: 0 additions & 2 deletions doc/source/contributing/roadmap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ You can keep up with what we are working on in several ways;
* Keep an eye on the various ``feature_X`` branches as they appear in the repository. Feel free to initiate
a conversation on GitHub with the developer who is working on that branch if you want to learn more, or
want to make suggestions or offer a helping hand.
* Clone and build your own copy of the ``future`` branch. This is the bleeding edge, and things may change and break.
But it is the earliest way to use the future version of :mod:`BioSimSpace`.

Wishlists / suggestions
=======================
Expand Down
58 changes: 21 additions & 37 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,25 @@ The easiest way to install :mod:`BioSimSpace` is in a new
`conda environment <https://anaconda.org>`__.

You can use any conda environment or installation. We recommend using
`mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__,
as this is pre-configured to use `conda-forge <https://conda-forge.org>`__,
and bundles `mamba <https://mamba.readthedocs.io/en/latest/>`__, which
is a fast drop-in replacement for `conda <https://conda.io>`__.
`Miniforge <https://github.com/conda-forge/miniforge>`__,
as this is pre-configured to use `conda-forge <https://conda-forge.org>`__.

.. _Install_Mambaforge:
Either... Install a new copy of ``mambaforge``
.. _Install_Miniforge:
Either... Install a new copy of ``Miniforge``
----------------------------------------------

To install a new copy of
`mambaforge <https://github.com/conda-forge/miniforge#mambaforge>`__,
first download a ``Mambaforge`` from
`this page <https://github.com/conda-forge/miniforge#mambaforge>`__ that
`Miniforge <https://github.com/conda-forge/miniforge>`__,
first download a ``Miniforge`` from
`this page <https://github.com/conda-forge/miniforge>`__ that
matches your operating system and processor.

Install ``Mambaforge`` following the
Install ``Miniforge`` following the
`instructions here <https://github.com/conda-forge/miniforge#install>`__.

Once installed, you should be able to run the ``mamba`` command to
install other packages (e.g. ``mamba -h`` will print out help on
how to use the ``mamba`` command).
Once installed, you should be able to run the ``conda`` command to
install other packages (e.g. ``conda -h`` will print out help on
how to use the ``conda`` command).

Or... Use an existing anaconda/miniconda install
------------------------------------------------
Expand All @@ -80,21 +78,7 @@ the full path to your anaconda or miniconda installation.

You should now be able to run the ``conda`` command to install other
packages (e.g. ``conda -h`` will print out help on how to use the
``conda`` command). We highly recommend that you use ``mamba`` as a
drop-in replacement for ``conda``, so first install ``mamba``.

.. code-block:: bash
$ conda install -c conda-forge mamba
This should install mamba. If this fails, then your anaconda or miniconda
environment is likely quite full, or else it is outdated. We recommend
going back and following `the instructions <_Install_Mambaforge>`
to install a new copy of ``mambaforge``.

If this works, then you should now be able to run the ``mamba`` command
to install other packages (e.g. ``mamba -h`` will print out help
on how to use the ``mamba`` command).
``conda`` command).

And then... Install BioSimSpace into a new environment
------------------------------------------------------
Expand All @@ -107,7 +91,7 @@ by creating a Python 3.9 environment that we will call ``openbiosim``.

.. code-block:: bash
$ mamba create -n openbiosim "python<3.10"
$ conda create -n openbiosim "python<3.10"
.. note::

Expand All @@ -118,27 +102,27 @@ We can now install :mod:`BioSimSpace` into that environment by typing

.. code-block:: bash
$ mamba install -n openbiosim -c openbiosim biosimspace
$ conda install -n openbiosim -c openbiosim biosimspace
.. note::

The option ``-n openbiosim`` tells ``mamba`` to install :mod:`BioSimSpace`
The option ``-n openbiosim`` tells ``conda`` to install :mod:`BioSimSpace`
into the ``openbiosim`` environment. The option ``-c openbiosim``
tells ``mamba`` to install :mod:`BioSimSpace` from the ``openbiosim``
tells ``conda`` to install :mod:`BioSimSpace` from the ``openbiosim``
conda channel.

If you want the latest development release, then install by typing

.. code-block:: bash
$ mamba install -n openbiosim -c "openbiosim/label/dev" biosimspace
$ conda install -n openbiosim -c "openbiosim/label/dev" biosimspace
To install the latest development version you can use:

.. code-block:: bash
mamba create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace
mamba activate openbiosim-dev
conda create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace
conda activate openbiosim-dev
To run :mod:`BioSimSpace`, you must now activate the ``openbiosim`` environment.
You can do this by typing
Expand Down Expand Up @@ -268,8 +252,8 @@ latest development code into that.

.. code-block:: bash
mamba create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace --only-deps
mamba activate openbiosim-dev
conda create -n openbiosim-dev -c conda-forge -c openbiosim/label/dev biosimspace --only-deps
conda activate openbiosim-dev
git clone https://github.com/openbiosim/biosimspace
cd biosimspace/python
BSS_SKIP_DEPENDENCIES=1 python setup.py develop
Expand Down
60 changes: 30 additions & 30 deletions python/BioSimSpace/FreeEnergy/_relative.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def getData(self, name="data", file_link=False, work_dir=None):
)

# Write to the zip file.
with _zipfile.ZipFile(cwd + f"/{zipname}", "w") as zip:
with _zipfile.Zipfile(_os.join(cwd, zipname), "w") as zip:
for file in files:
zip.write(file)

Expand Down Expand Up @@ -2074,15 +2074,15 @@ def _initialise_runner(self, system):
process._system = first_process._system.copy()
process._protocol = self._protocol
process._work_dir = new_dir
process._std_out_file = new_dir + "/somd.out"
process._std_err_file = new_dir + "/somd.err"
process._rst_file = new_dir + "/somd.rst7"
process._top_file = new_dir + "/somd.prm7"
process._traj_file = new_dir + "/traj000000001.dcd"
process._restart_file = new_dir + "/latest.rst"
process._config_file = new_dir + "/somd.cfg"
process._pert_file = new_dir + "/somd.pert"
process._gradients_file = new_dir + "/gradients.dat"
process._std_out_file = _os.path.join(new_dir, "somd.out")
process._std_err_file = _os.path.join(new_dir, "somd.err")
process._rst_file = _os.path.join(new_dir, "somd.rst7")
process._top_file = _os.path.join(new_dir, "somd.prm7")
process._traj_file = _os.path.join(new_dir, "traj000000001.dcd")
process._restart_file = _os.path.join(new_dir, "latest.rst")
process._config_file = _os.path.join(new_dir, "somd.cfg")
process._pert_file = _os.path.join(new_dir, "somd.pert")
process._gradients_file = _os.path.join(new_dir, "gradients.dat")
process._input_files = [
process._config_file,
process._rst_file,
Expand All @@ -2106,10 +2106,10 @@ def _initialise_runner(self, system):
for line in new_config:
f.write(line)

mdp = new_dir + "/gromacs.mdp"
gro = new_dir + "/gromacs.gro"
top = new_dir + "/gromacs.top"
tpr = new_dir + "/gromacs.tpr"
mdp = _os.path.join(new_dir, "gromacs.mdp")
gro = _os.path.join(new_dir, "gromacs.gro")
top = _os.path.join(new_dir, "gromacs.top")
tpr = _os.path.join(new_dir, "gromacs.tpr")

# Use grompp to generate the portable binary run input file.
_Process.Gromacs._generate_binary_run_file(
Expand All @@ -2129,14 +2129,14 @@ def _initialise_runner(self, system):
process._system = first_process._system.copy()
process._protocol = self._protocol
process._work_dir = new_dir
process._std_out_file = new_dir + "/gromacs.out"
process._std_err_file = new_dir + "/gromacs.err"
process._gro_file = new_dir + "/gromacs.gro"
process._top_file = new_dir + "/gromacs.top"
process._ref_file = new_dir + "/gromacs_ref.gro"
process._traj_file = new_dir + "/gromacs.trr"
process._config_file = new_dir + "/gromacs.mdp"
process._tpr_file = new_dir + "/gromacs.tpr"
process._std_out_file = _os.path.join(new_dir, "gromacs.out")
process._std_err_file = _os.path.join(new_dir, "gromacs.err")
process._gro_file = _os.path.join(new_dir, "gromacs.gro")
process._top_file = _os.path.join(new_dir, "gromacs.top")
process._ref_file = _os.path.join(new_dir, "gromacs_ref.gro")
process._traj_file = _os.path.join(new_dir, "gromacs.trr")
process._config_file = _os.path.join(new_dir, "gromacs.mdp")
process._tpr_file = _os.path.join(new_dir, "gromacs.tpr")
process._input_files = [
process._config_file,
process._gro_file,
Expand Down Expand Up @@ -2165,14 +2165,14 @@ def _initialise_runner(self, system):
process._system = first_process._system.copy()
process._protocol = self._protocol
process._work_dir = new_dir
process._std_out_file = new_dir + "/amber.out"
process._std_err_file = new_dir + "/amber.err"
process._rst_file = new_dir + "/amber.rst7"
process._top_file = new_dir + "/amber.prm7"
process._ref_file = new_dir + "/amber_ref.rst7"
process._traj_file = new_dir + "/amber.nc"
process._config_file = new_dir + "/amber.cfg"
process._nrg_file = new_dir + "/amber.nrg"
process._std_out_file = _os.path.join(new_dir, "amber.out")
process._std_err_file = _os.path.join(new_dir, "amber.err")
process._rst_file = _os.path.join(new_dir, "amber.rst7")
process._top_file = _os.path.join(new_dir, "amber.prm7")
process._ref_file = _os.path.join(new_dir, "amber_ref.rst7")
process._traj_file = _os.path.join(new_dir, "amber.nc")
process._config_file = _os.path.join(new_dir, "amber.cfg")
process._nrg_file = _os.path.join(new_dir, "amber.nrg")
process._input_files = [
process._config_file,
process._rst_file,
Expand Down
Loading

0 comments on commit 3abcec4

Please sign in to comment.