Skip to content

Commit

Permalink
Merge branch 'main' into afe-md
Browse files Browse the repository at this point in the history
# Conflicts:
#	openfe/tests/data/openmm_afe/AHFEProtocol_json_results.gz
#	openfe/tests/data/openmm_md/MDProtocol_json_results.gz
#	openfe/tests/protocols/test_solvation_afe_tokenization.py
  • Loading branch information
richardjgowers committed Feb 16, 2024
2 parents c88e1f3 + 2150c20 commit 8d17ddc
Show file tree
Hide file tree
Showing 37 changed files with 1,488 additions and 271 deletions.
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
<!--
Thank you for pull request.
Below are a few things we ask you kindly to self-check before getting a review. Remove checks that are not relevant.
-->

<!--
Please note any issues this fixes using [closing keywords]( https://help.github.com/articles/closing-issues-using-keywords/ ):
-->

<!--
see https://regro.github.io/rever-docs/news.html for details on how to add news entry (you do not need to run the rever command)
-->

Checklist
* [ ] Added a ``news`` entry

## Developers certificate of origin
- [ ] I certify that this contribution is covered by the MIT License [here](https://github.com/OpenFreeEnergy/openfe/blob/main/LICENSE) and the **Developer Certificate of Origin** at <https://developercertificate.org/>.
20 changes: 19 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ defaults:
jobs:
tests:
runs-on: ${{ matrix.os }}-latest
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }} 🗃️${{ matrix.pydantic-version }}"
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }} 🗃️${{ matrix.pydantic-version }} oechem: ${{ matrix.openeye }}"
strategy:
fail-fast: false
matrix:
Expand All @@ -35,13 +35,21 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
openeye: ["no"]
include:
- os: "macos"
python-version: "3.11"
pydantic-version: ">1"
- os: "ubuntu"
python-version: "3.11"
pydantic-version: "<2"
- os: "ubuntu"
python-version: "3.11"
pydantic-version: ">1"
openeye: "yes"

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt

steps:
- uses: actions/checkout@v4
Expand All @@ -66,6 +74,16 @@ jobs:
pydantic=${{ matrix.pydantic-version }}
init-shell: bash

- name: "Install OpenEye"
if: ${{ !github.event.pull_request.head.repo.fork
&& matrix.openeye == 'yes' }}
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}
micromamba install -c openeye openeye-toolkits
python -c "import openeye; assert openeye.oechem.OEChemIsLicensed(), 'oechem license check failed!'"
- name: "Install GUFE from main@HEAD"
run: python -m pip install --no-deps git+https://github.com/OpenFreeEnergy/gufe@main

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,9 @@ docs/ExampleNotebooks/

# duecredit
.duecredit.p

# Some charge stuff
*.model.pt

# Rever
rever/
5 changes: 5 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=================
openfe Change Log
=================

.. current developments
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@

autodoc_mock_imports = [
"matplotlib",
"openmmtools",
"mdtraj",
"openmmforcefields",
"openmmtools",
"pymbar",
]

# Extensions for the myst parser
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbook/creating_atom_mappings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Creating Atom Mappings

Once your :ref:`data has been loaded<Loading Molecules>`
we can now proceed to defining how Components in these Systems correspond.
``Mapping`` objects are used to defined how ``Component`` objects from different :class:`ChemicalSystems` are related.
``Mapping`` objects are used to defined how ``Component`` objects from different :class:`.ChemicalSystem` objects are related.
This guide will show how this concept applies to the case of a pair of ligands we wish to transform between.

Generating Mappings
Expand Down
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ The **OpenFE** toolkit provides open-source frameworks for calculating alchemica

Reference guide on using the OpenFE CLI.

.. grid-item-card:: OpenFE Showcase
.. grid-item-card:: Changelog
:img-top: _static/Showcase.svg
:text-align: center
:link: tutorials/showcase_notebook
:link: CHANGELOG
:link-type: doc

Tutorial notebook showing the sorts of things OpenFE can do.
Any notable changes in the package for each released version

.. grid-item-card:: Relative Free Energy Protocol
:img-top: _static/Rocket.svg
Expand All @@ -92,6 +92,7 @@ The **OpenFE** toolkit provides open-source frameworks for calculating alchemica
guide/index
cookbook/index
reference/index
CHANGELOG

Indices and tables
------------------
Expand Down
80 changes: 80 additions & 0 deletions docs/reference/api/atom_mappers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.. _Atom Mappers:

Atom Mappings
=============

Tools for mapping atoms in one molecule to those in another. Used to generate efficient ligand networks.

.. module:: openfe.setup.atom_mapping

.. rubric:: Abstract Base Class

.. autosummary::
:nosignatures:
:toctree: generated/

LigandAtomMapper

.. rubric:: Implementations

.. autosummary::
:nosignatures:
:toctree: generated/

LomapAtomMapper
PersesAtomMapper

.. rubric:: Data Types

.. autosummary::
:nosignatures:
:toctree: generated/

LigandAtomMapping

.. _Atom Map Scorers:

Atom Map Scorers
----------------

Scoring functions for a mapping between ligands. These are used as objective functions for :any:`Ligand Network Planners`.


Lomap Scorers
~~~~~~~~~~~~~

Scorers implemented by the `LOMAP <https://github.com/OpenFreeEnergy/Lomap>`_ package.

.. apparently we need the atom_mapping because internally autofunction is
trying ``import openfe.setup.lomap_scorers``, which doesn't work (whereas
``from openfe.setup import lomap_scorers`` does)
.. module:: openfe.setup.atom_mapping.lomap_scorers

.. autosummary::
:nosignatures:
:toctree: generated/

default_lomap_score
ecr_score
mcsr_score
mncar_score
atomic_number_score
hybridization_score
sulfonamides_score
heterocycles_score
transmuting_methyl_into_ring_score
transmuting_ring_sizes_score


Perses Scorers
~~~~~~~~~~~~~~

Scorers implemented by the `Perses <https://github.com/choderalab/perses>`_ package.

.. module:: openfe.setup.atom_mapping.perses_scorers

.. autosummary::
:nosignatures:
:toctree: generated/

default_perses_scorer
13 changes: 0 additions & 13 deletions docs/reference/api/data.rst

This file was deleted.

3 changes: 2 additions & 1 deletion docs/reference/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ OpenFE API Reference
.. toctree::
:maxdepth: 2

data
systems_and_components
atom_mappers
ligand_network
alchemical_network_planning
defining_and_executing_simulations
openmm_rfe
openmm_solvation_afe
openmm_md
80 changes: 0 additions & 80 deletions docs/reference/api/ligand_network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,83 +52,3 @@ Functions to load a :class:`.LigandNetwork` from equivalent classes in other pac
load_orion_network
load_fepplus_network

.. _Atom Mappers:

Atom Mappings
-------------

Tools for mapping atoms in one molecule to those in another. Used to generate efficient ligand networks.

.. module:: openfe.setup.atom_mapping

.. rubric:: Abstract Base Class

.. autosummary::
:nosignatures:
:toctree: generated/

LigandAtomMapper

.. rubric:: Implementations

.. autosummary::
:nosignatures:
:toctree: generated/

LomapAtomMapper
PersesAtomMapper

.. rubric:: Data Types

.. autosummary::
:nosignatures:
:toctree: generated/

LigandAtomMapping

.. _Atom Map Scorers:

Atom Map Scorers
----------------

Scoring functions for a mapping between ligands. These are used as objective functions for :any:`Ligand Network Planners`.


Lomap Scorers
~~~~~~~~~~~~~

Scorers implemented by the `LOMAP <https://github.com/OpenFreeEnergy/Lomap>`_ package.

.. apparently we need the atom_mapping because internally autofunction is
trying ``import openfe.setup.lomap_scorers``, which doesn't work (whereas
``from openfe.setup import lomap_scorers`` does)
.. module:: openfe.setup.atom_mapping.lomap_scorers

.. autosummary::
:nosignatures:
:toctree: generated/

default_lomap_score
ecr_score
mcsr_score
mncar_score
atomic_number_score
hybridization_score
sulfonamides_score
heterocycles_score
transmuting_methyl_into_ring_score
transmuting_ring_sizes_score


Perses Scorers
~~~~~~~~~~~~~~

Scorers implemented by the `Perses <https://github.com/choderalab/perses>`_ package.

.. module:: openfe.setup.atom_mapping.perses_scorers

.. autosummary::
:nosignatures:
:toctree: generated/

default_perses_scorer
21 changes: 21 additions & 0 deletions docs/reference/api/openmm_md.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
OpenMM Molecular Dynamics Protocol
==================================

This Protocol implements a standard MD execution for a solvated protein system.

Protocol Settings
-----------------

.. module:: openfe.protocols.openmm_md

.. autopydantic_model:: PlainMDProtocolSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
:model-show-config-summary: False
:model-show-validator-members: False
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:exclude-members: get_defaults
:member-order: bysource
9 changes: 4 additions & 5 deletions docs/reference/api/systems_and_components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ We describe a chemical system as being made up of one or more "components," e.g.
:nosignatures:
:toctree: generated/

Component
SmallMoleculeComponent
ProteinComponent
SolventComponent
ChemicalSystem
SmallMoleculeComponent
ProteinComponent
SolventComponent
ChemicalSystem


Chemical System Generators
Expand Down
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dependencies:
- coverage
- cinnabar ==0.3.0
- openff-toolkit>=0.13.0
- openff-nagl-base >=0.3.3
- openff-units==0.2.0
- pint<0.22
- openff-models>=0.0.5
Expand All @@ -42,4 +43,6 @@ dependencies:
- sphinx-click
- pip:
- sphinx-toolbox
- espaloma_charge
- openff-nagl-models>=0.1.2
- git+https://github.com/OpenFreeEnergy/gufe@main
23 changes: 23 additions & 0 deletions news/TEMPLATE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading

0 comments on commit 8d17ddc

Please sign in to comment.