Skip to content

Commit

Permalink
Add initial ops to compute / reweight Gsolv (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBoothroyd authored Oct 31, 2024
1 parent bde5d30 commit b568f4c
Show file tree
Hide file tree
Showing 12 changed files with 744 additions and 38 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ jobs:
make test-examples
make docs
# TODO: Remove this line once pydantic 1.0 support is dropped
# TODO: Remove this once pydantic 1.0 support is dropped
# We remove absolv as femto needs pydantic >=2
mamba remove --name smee --yes "absolv"
mamba install --name smee --yes "pydantic <2"
make test
Expand Down
4 changes: 4 additions & 0 deletions devtools/envs/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ dependencies:
- numpy
- msgpack-python

# FE simulations
- mdtraj
- absolv >=1.0.1

# Examples
- jupyter
- nbconvert
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ select = ["B","C","E","F","W","B9"]
convention = "google"

[tool.coverage.run]
omit = ["**/tests/*"]
omit = ["**/tests/*", "smee/mm/_fe.py"]

[tool.coverage.report]
exclude_lines = [
Expand All @@ -39,3 +39,9 @@ exclude_lines = [
"if TYPE_CHECKING:",
"if typing.TYPE_CHECKING:",
]

[tool.pytest.ini_options]
markers = [
"fe: run free energy regression tests",
]
addopts = "-m 'not fe'"
6 changes: 6 additions & 0 deletions smee/mm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
"""Compute differentiable ensemble averages using OpenMM and SMEE."""

from smee.mm._config import GenerateCoordsConfig, MinimizationConfig, SimulationConfig
from smee.mm._fe import generate_dg_solv_data
from smee.mm._mm import generate_system_coords, simulate
from smee.mm._ops import (
NotEnoughSamplesError,
compute_dg_solv,
compute_ensemble_averages,
reweight_dg_solv,
reweight_ensemble_averages,
)
from smee.mm._reporters import TensorReporter, tensor_reporter, unpack_frames

__all__ = [
"compute_dg_solv",
"compute_ensemble_averages",
"generate_dg_solv_data",
"generate_system_coords",
"reweight_dg_solv",
"reweight_ensemble_averages",
"simulate",
"GenerateCoordsConfig",
Expand Down
Loading

0 comments on commit b568f4c

Please sign in to comment.