Skip to content

Commit aa83a91

Browse files
authored
Merge pull request #357 from OpenBioSim/release_2024.3.0
Release 2024.3.0
2 parents 4ffd5f6 + 3435cdc commit aa83a91

38 files changed

+9238
-76
lines changed

.github/workflows/Sandpit_exs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Install dependency
3535
run: |
36-
conda install -c conda-forge -c openbiosim/label/main biosimspace python=3.10 ambertools gromacs "sire=2024.1.0" "alchemlyb>=2.1" pytest openff-interchange pint=0.21 rdkit "jaxlib>0.3.7" tqdm
36+
conda install -c conda-forge -c openbiosim/label/main biosimspace python=3.10 ambertools gromacs "sire=2024.2.0" "alchemlyb>=2.1" pytest openff-interchange pint=0.21 rdkit "jaxlib>0.3.7" tqdm
3737
python -m pip install git+https://github.com/Exscientia/MDRestraintsGenerator.git
3838
# For the testing of BSS.FreeEnergy.AlchemicalFreeEnergy.analysis
3939
python -m pip install https://github.com/alchemistry/alchemtest/archive/master.zip

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,20 @@ Conda environment.
113113
114114
git clone https://github.com/openbiosim/biosimspace
115115
cd biosimspace/python
116-
python setup.py install
116+
pip install .
117117
118118
If you plan to develop and want an editable install, use:
119119

120120
.. code-block:: bash
121121
122-
python setup.py develop
122+
pip install -e .
123123
124124
If you want to skip the installation of BioSimSpace dependencies, e.g. if they
125125
are already installed, then you can use:
126126

127127
.. code-block:: bash
128128
129-
BSS_SKIP_DEPENDENCIES=1 python setup.py develop
129+
BSS_SKIP_DEPENDENCIES=1 pip install -e .
130130
131131
Once finished, you can test the installation by running:
132132

@@ -150,7 +150,7 @@ latest development code into that.
150150
conda activate openbiosim-dev
151151
git clone https://github.com/openbiosim/biosimspace
152152
cd biosimspace/python
153-
BSS_SKIP_DEPENDENCIES=1 python setup.py develop
153+
BSS_SKIP_DEPENDENCIES=1 pip install -e .
154154
155155
(You may also want to install optional dependencies, such as ``ambertools`` and
156156
``gromacs`` into your environment.)

doc/source/api/index_Align.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ BioSimSpace.Align
44
=================
55

66
The *Align* package provides functionality for aligning and merging molecules.
7+
8+
.. automodule:: BioSimSpace.Align
9+
10+
.. toctree::
11+
:maxdepth: 1
12+
713
Molecules are aligned using a Maximum Common Substructure (MCS) search, which
814
is used to find mappings between atom indices in the two molecules.
915
Functionality is provided for sorting the mappings according to a scoring
@@ -34,8 +40,3 @@ Some examples:
3440
# The resulting "merged-molecule" can be used in free energy perturbation
3541
# simulations.
3642
merged = BSS.Align.merge(mol0, mol1, mappings)
37-
38-
.. automodule:: BioSimSpace.Align
39-
40-
.. toctree::
41-
:maxdepth: 1

doc/source/api/index_FreeEnergy.rst

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ BioSimSpace.FreeEnergy
66
The *FreeEnergy* package contains tools to configure, run, and analyse
77
*relative* free energy simulations.
88

9+
.. automodule:: BioSimSpace.FreeEnergy
10+
11+
.. toctree::
12+
:maxdepth: 1
13+
14+
As well as the :class:`protocol <BioSimSpace.Protocol.FreeEnergy>` used for production
15+
916
Free-energy perturbation simulations require a
1017
:class:`System <BioSimSpace._SireWrappers.System>` containing a *merged*
1118
molecule that can be *perturbed* between two molecular end states by use
@@ -28,6 +35,9 @@ perturbable molecule created by merging two ligands, ``ligA`` and ``ligB``,
2835
perturbable molecule. We assume that each molecule/system has been
2936
appropriately minimised and equlibrated.
3037

38+
Relative binding free-energy (RBFE)
39+
-----------------------------------
40+
3141
To setup, run, and analyse a binding free-energy calculation:
3242

3343
.. code-block:: python
@@ -130,16 +140,80 @@ the path to a working directory to :class:`FreeEnergy.Relative.analyse <BioSimSp
130140
131141
pmf_vacuum, overlap_vacuum = BSS.FreeEnergy.Relative.analyse("ligA_ligB/vacuum")
132142
133-
.. automodule:: BioSimSpace.FreeEnergy
134-
135-
.. toctree::
136-
:maxdepth: 1
137-
138-
As well as the :class:`protocol <BioSimSpace.Protocol.FreeEnergy>` used for production
139143
simulations, it is also possible to use
140144
:class:`FreeEnergy.Relative <BioSimSpace.FreeEnergy.Relative>` to setup and run simulations
141145
for minimising or equilibrating structures for each lambda window. See the
142146
:class:`FreeEnergyMinimisation <BioSimSpace.Protocol.FreeEnergyMinimisation>` and
143147
:class:`FreeEnergyEquilibration <BioSimSpace.Protocol.FreeEnergyEquilibration>`
144148
protocols for details. At present, these protocols are only supported when not
145149
using :class:`SOMD <BioSimSpace.Process.Somd>` as the simulation engine.
150+
151+
Alchemical Transfer Method (ATM)
152+
--------------------------------
153+
154+
This package contains tools to configure, run, and analyse *relative* free
155+
energy simulations using the *alchemical transfer method* developed by the
156+
`Gallicchio lab <https://www.compmolbiophysbc.org/atom-openmm>`.
157+
158+
Only available in the *OpenMM* engine, the *alchemical transfer method*
159+
replaces the conventional notion of perturbing between two end states with
160+
a single system containing both the free and bound ligand. The relative free
161+
energy of binding is then associated with the swapping of the bound and free
162+
ligands.
163+
164+
The *alchemical transfer method* has a few advantages over the conventional
165+
approach, mainly arising from its relative simplicity and flexibility. The
166+
method is particularly well-suited to the study of difficult ligand
167+
transformations, such as scaffold-hopping and charge change perturbations.
168+
The presence of both ligands in the same system also replaces the conventional
169+
idea of _legs_, combining free, bound, forward and reverse legs into a
170+
single simulation.
171+
172+
In order to perform a relative free energy calculation using the
173+
*alchemical transfer method*, the user requires a protein and two ligands, as
174+
well as knowledge of any common core shared between the two ligands.
175+
ATM-compatible systems can be created from these elements using the
176+
:class:`FreeEnergy.ATM <BioSimSpace.FreeEnergy.ATMSetup>` class.
177+
178+
.. code-block:: python
179+
180+
from BioSimSpace.FreeEnergy import ATMSetup
181+
182+
...
183+
184+
# Create an ATM setup object. 'protein', 'ligand1' and 'ligand2' must be
185+
# BioSimSpace Molecule objects.
186+
# 'ligand1' is bound in the lambda=0 state, 'ligand2' is bound in the lambda=1 state.
187+
atm_setup = ATMSetup(protein=protein, ligand1=ligand1, ligand2=ligand2)
188+
189+
# Now create the BioSimSpace system. Here is where knowledge of the common core is required.
190+
# ligand1_rigid_core and ligand2_rigid_core are lists of integers, each of length three,
191+
# which define the indices of the common core atoms in the ligands.
192+
# Displacement is the desired distance between the centre of masses of the two ligands.
193+
system, data = atm_setup.prepare(
194+
ligand1_rigid_core=[1, 2, 3],
195+
ligand2_rigid_core=[1, 2, 3],
196+
displacement=22.0
197+
)
198+
199+
# The prepare function returns two objects: a prepared BioSimSpace system that is ready
200+
# for ATM simulation, and a data dictionary containing information relevant to ATM calculations.
201+
# This dictionary does not need to be kept, as the information is also encoded in the system
202+
# object, but it may be useful for debugging.
203+
204+
205+
Preparing the system for production runs is slightly more complex than in
206+
the conventional approach, as the system will need to be annealed to an
207+
intermediate lambda value, and then equilibrated at that value. The
208+
:ref:`protocol <ref_protocols>` sub-module contains functionality for
209+
equilibrating and annealing systems for ATM simulations.
210+
211+
Once the production simulations have been completed, the user can analyse
212+
the data using the :func:`analyse <BioSimSpace.FreeEnergy.ATM.analyse>` function.
213+
214+
.. code-block:: python
215+
216+
from BioSimSpace.FreeEnergy import ATM
217+
218+
# Analyse the simulation data to get the free energy difference and associated error.
219+
ddg, error = ATM.analyse("path/to/working/directory")

doc/source/changelog.rst

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,30 @@ company supporting open-source development of fostering academic/industrial coll
99
within the biomolecular simulation community. Our software is hosted via the `OpenBioSim`
1010
`GitHub <https://github.com/OpenBioSim/biosimspace>`__ organisation.
1111

12+
`2024.3.0 <https://github.com/openbiosim/biosimspace/compare/2024.2.0...2024.3.0>`_ - Oct 24 2024
13+
-------------------------------------------------------------------------------------------------
14+
15+
* Fixed link in protein free-energy perturbation tutorial (`#310 <https://github.com/OpenBioSim/biosimspace/pull/310>`__).
16+
* Fixed alignment of monatomic molecules (`#313 <https://github.com/OpenBioSim/biosimspace/pull/313>`__ and (`#333 <https://github.com/OpenBioSim/biosimspace/pull/333>`__).
17+
* Expose missing ``extra_args`` keyword argument for the :class:`Process.Somd <BioSimSpace.Process.Somd>` class (`#319 <https://github.com/OpenBioSim/biosimspace/pull/319>`__).
18+
* Add support for the Alchemical Transfer Method (ATM) (`@mb2055 <https://github.com/mb2055>`_) (`#327 <https://github.com/OpenBioSim/biosimspace/pull/327>`__).
19+
* Fixed :meth:`system.updateMolecules <BioSimSpace._SireWrappers.System.updateMolecules>` method when updating multiple molecules at once (`#336 <https://github.com/OpenBioSim/biosimspace/pull/336>`__).
20+
* Added a new :meth:`system.removeBox <BioSimSpace._SireWrappers.System.removeBox>` method to remove the box from a system (`#338 <https://github.com/OpenBioSim/biosimspace/pull/338>`__).
21+
* Fixed bug when using position restraints with OpenMM for perturbable systems (`#341 <https://github.com/OpenBioSim/biosimspace/pull/341>`__).
22+
* Include both end states in the GROMACS restraint file when using position restraints with perturbable systems (`#342 <https://github.com/OpenBioSim/biosimspace/pull/342>`__).
23+
* Set end state connectivity properties when a perturbation involves a change in connectivity (`#345 <https://github.com/OpenBioSim/biosimspace/pull/345>`__).
24+
* Use direct Sire-to-RDKit conversion when parameterising with OpenFF to avoid issues with intermediate file formats (`#349 <https://github.com/OpenBioSim/biosimspace/pull/349>`__).
25+
* Preserve SMILES based molecular properties during parameterisation (`#352 <https://github.com/OpenBioSim/biosimspace/pull/352>`__).
26+
* Rotate perturbable and non-perturbable molecules independently when rotating box vectors (`#355 <https://github.com/OpenBioSim/biosimspace/pull/355>`__).
27+
1228
`2024.2.0 <https://github.com/openbiosim/biosimspace/compare/2024.1.0...2024.2.0>`_ - Jul 09 2024
1329
-------------------------------------------------------------------------------------------------
1430

1531
* Fixed incorect use of ``self`` in :func:`Trajectory.getFrame <BioSimSpace.Trajectory.getFrame>` function (`#281 <https://github.com/OpenBioSim/biosimspace/pull/281>`__).
1632
* Use SDF as an intermediate for ``antechamber`` if the original molecule was loaded from that format (`#287 <https://github.com/OpenBioSim/biosimspace/pull/287>`__).
1733
* Detect dummy atoms by checking ``element`` *and* ``ambertype`` properties when creating ``SOMD`` pert files (`#289 <https://github.com/OpenBioSim/biosimspace/pull/289>`__).
1834
* Add missing ``match_water`` kwarg to ``prepareFEP`` node (`#292 <https://github.com/OpenBioSim/biosimspace/pull/292>`__).
19-
* Add protein free-energy perturbation functionality (`@akalpokas <https://github.com/akalpokas (`#294 <https://github.com/OpenBioSim/biosimspace/pull/294>`__).
35+
* Add protein free-energy perturbation functionality (`@akalpokas <https://github.com/akalpokas`_) (`#294 <https://github.com/OpenBioSim/biosimspace/pull/294>`__).
2036
* Ensure that the LJ sigma parameter for perturbed atoms is non-zero (`#295 <https://github.com/OpenBioSim/biosimspace/pull/295>`__).
2137
* Fixed return type docstrings for functions in the :mod:`BioSimSpace.Parameters` module (`#298 <https://github.com/OpenBioSim/biosimspace/pull/298>`__).
2238
* Don't use ``sire.legacy.Base.wrap`` with the ``file_format`` property to avoid (incorrect) auto string to unit conversion of ``mol2`` to moles squared (`#300 <https://github.com/OpenBioSim/biosimspace/pull/300>`__).
@@ -35,7 +51,6 @@ within the biomolecular simulation community. Our software is hosted via the `Op
3551
* Add a ``getRestraintType`` method to the base protocol that returns ``None`` (`#276 <https://github.com/OpenBioSim/biosimspace/pull/276>`__).
3652
* Add missing ``themostat_time_constant`` kwarg to the :class:`Metadynamics <BioSimSpace.Protocol.Metdynamics>` protocol (`#276 <https://github.com/OpenBioSim/biosimspace/pull/276>`__).
3753

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

@@ -73,7 +88,6 @@ within the biomolecular simulation community. Our software is hosted via the `Op
7388
* Ensure all searches for disulphide bonds are convert to a ``SelectorBond`` object (`#224 <https://github.com/OpenBioSim/biosimspace/pull/224>`__).
7489
* Fix injection of custom commands into ``LEaP`` script (`#226 <https://github.com/OpenBioSim/biosimspace/pull/226>`__).
7590

76-
7791
`2023.4.0 <https://github.com/openbiosim/biosimspace/compare/2023.3.1...2023.4.0>`_ - Oct 13 2023
7892
-------------------------------------------------------------------------------------------------
7993

doc/source/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ Tutorials
6363
=========
6464

6565
.. toctree::
66-
:maxdepth: 2
66+
:maxdepth: 1
6767

6868
tutorials/index
6969

7070
Detailed Guides
7171
===============
7272

7373
.. toctree::
74-
:maxdepth: 2
74+
:maxdepth: 1
7575

7676
guides/index
7777

@@ -93,7 +93,7 @@ Support
9393
Contributing
9494
============
9595
.. toctree::
96-
:maxdepth: 2
96+
:maxdepth: 1
9797

9898
contributing/index
9999
contributors

doc/source/install.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,20 @@ Conda environment.
219219
220220
git clone https://github.com/openbiosim/biosimspace
221221
cd biosimspace/python
222-
python setup.py install
222+
pip install .
223223
224224
If you plan to develop and want an editable install, use:
225225

226226
.. code-block:: bash
227227
228-
python setup.py develop
228+
pip install -e .
229229
230230
If you want to skip the installation of BioSimSpace dependencies, e.g. if they
231231
are already installed, then you can use:
232232

233233
.. code-block:: bash
234234
235-
BSS_SKIP_DEPENDENCIES=1 python setup.py develop
235+
BSS_SKIP_DEPENDENCIES=1 pip install -e .
236236
237237
Once finished, you can test the installation by running:
238238

@@ -256,7 +256,7 @@ latest development code into that.
256256
conda activate openbiosim-dev
257257
git clone https://github.com/openbiosim/biosimspace
258258
cd biosimspace/python
259-
BSS_SKIP_DEPENDENCIES=1 python setup.py develop
259+
BSS_SKIP_DEPENDENCIES=1 pip install -e .
260260
261261
(You may also want to install optional dependencies, such as ``ambertools`` and
262262
``gromacs`` into your environment.)

0 commit comments

Comments
 (0)