Skip to content

Commit

Permalink
Test openfe 1.0.0rc0 + refresh showcase (#99)
Browse files Browse the repository at this point in the history
* spruce up CI

* now test the rc

* Fix choose_protocol.ipynb

* Duplicate openmm_rbfe/OpenFE_showcase_1_RBFE_of_T4lysozyme.ipynb history in showcase/openfe_showcase.ipynb history.

* shave and a haircut - 2 bits

* Fix showcase tutorial (#101)

* fix showcase notebook

* small fixes

* added some stuff from hannah pr

* update ligand_networks_for_developers.ipynb for 1.0rc0

* update benchmark_demo.ipynb for 1.0rc0

* first stab at changing examples to tyk2

* more switches to tyk2

* Add TYK2 image, remove T4L references

* Remove output

* Remove atom mapping CLI stuff

* show options atom mappers and ligand networks

* more notebook changes

* Add tyk2 figure and logo

* more changes showcase notebook

* Adress review comments

* Addressing review comments

* fix mapping

* transformation inputs as bullet points

* see if python 3.10 works

* lets see which python versions will work

* rerun ci

* update url for showcase installer

* unpin python version in env

* remove cell merged in by mistake

* see issue #138

* some small fixes for google colab

* just test on python 3.10

* pull down inputs for showcase

* drop osx for now

* put inputs in correct location

* updated with results, see issue #141

* skip running nbval on openfe gather cells at the end

* fix url for download

* update manual spec of default settings for openff bump

this is now 2.1.1 in 1.0 of openfe

* use fetch results for demoing gather

* use fetch to pull in inputs

* we can run more cells in CI, also added a note about it being a single edige

* fix Analysis typo

* pulled down wrong inputs

* Added a hack for google colab

---------

Co-authored-by: hannahbaumann <hbaumann@uci.edu>
Co-authored-by: Hannah Baumann <43765638+hannahbaumann@users.noreply.github.com>
Co-authored-by: richard gowers <richardjgowers@gmail.com>
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
  • Loading branch information
5 people authored May 2, 2024
1 parent 9fea50f commit b70d432
Show file tree
Hide file tree
Showing 13 changed files with 14,609 additions and 2,913 deletions.
2 changes: 1 addition & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- pydantic
- python==3.11.*
- python
- rdkit
- typing_extensions
- gufe>=0.9.4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
matrix:
# Note: we temporarily pin to macos-12 to avoid compatibility issues
# between AT22+ and macos-13+ runners
os: [ubuntu-latest, macos-12]
python-version: ["3.11",]
os: [ubuntu-latest]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v2.4.0
Expand Down Expand Up @@ -65,4 +65,4 @@ jobs:
- name: Run example notebooks
run: |
python -m pytest -v setup/ openmm_rbfe/ networks/ --nbval-lax -n auto --dist loadscope
python -m pytest -v setup/ showcase/ cookbook/ openmm_rbfe/ networks/ --nbval-lax -n auto --dist loadscope
77 changes: 63 additions & 14 deletions cookbook/choose_protocol.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 9,
"id": "38b41f0a-d2a3-4231-bf08-1504d3824978",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -67,7 +67,7 @@
"tags": []
},
"source": [
"Your choice of `Protocol` determines how free energy sampling is performed. At present, the only protocol available is `RelativeHybridTopologyProtocol`:\n",
"Your choice of `Protocol` determines how free energy sampling is performed. Here, we will be looking into the `RelativeHybridTopologyProtocol`:\n",
"\n",
"| Name | [RelativeHybridTopologyProtocol] |\n",
"|:-------------|:-----------------------------------------|\n",
Expand All @@ -82,7 +82,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 10,
"id": "b0757f5f-e38f-43ac-b43f-ee2bbea95f0d",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -135,7 +135,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 11,
"id": "96c32ead-a8d0-4283-950b-5d27c74ebf16",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -163,7 +163,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 12,
"id": "8d5a6281-50f9-4062-8fa4-375ce2df1bd6",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -193,7 +193,7 @@
" 'nonbonded_cutoff': <Quantity(1.0, 'nanometer')>,\n",
" 'nonbonded_method': 'PME',\n",
" 'rigid_water': True,\n",
" 'small_molecule_forcefield': 'openff-2.0.0'},\n",
" 'small_molecule_forcefield': 'openff-2.1.1'},\n",
" 'integrator_settings': {'barostat_frequency': <Quantity(25, 'timestep')>,\n",
" 'constraint_tolerance': 1e-06,\n",
" 'langevin_collision_rate': <Quantity(1.0, '1 / picosecond')>,\n",
Expand Down Expand Up @@ -252,7 +252,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 13,
"id": "2de6c6a9-bceb-4c9c-ae5a-3d88a72c801a",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -288,7 +288,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 14,
"id": "844e6fa5-f363-47fa-881d-00328faa601c",
"metadata": {
"slideshow": {
Expand All @@ -312,7 +312,7 @@
" ],\n",
" \n",
" # Small molecule force field to use with OpenMM template generator:\n",
" small_molecule_forcefield='openff-2.0.0',\n",
" small_molecule_forcefield='openff-2.1.1',\n",
" \n",
" # Nonbonded settings\n",
" nonbonded_method='PME', # Particle Mesh Ewald for long range electrostatics\n",
Expand Down Expand Up @@ -401,7 +401,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 15,
"id": "b499d852-4d7e-47c5-9342-31017baed37c",
"metadata": {
"nbsphinx": "hidden",
Expand All @@ -410,10 +410,59 @@
},
"tags": []
},
"outputs": [],
"outputs": [
{
"ename": "AssertionError",
"evalue": "",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[15], line 3\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Double check that the above settings match the defaults - delete this cell if you configure things yourself!\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# See https://github.com/OpenFreeEnergy/ExampleNotebooks/issues/138\u001b[39;00m\n\u001b[0;32m----> 3\u001b[0m \u001b[38;5;28;01massert\u001b[39;00m settings \u001b[38;5;241m==\u001b[39m RelativeHybridTopologyProtocol\u001b[38;5;241m.\u001b[39mdefault_settings()\n",
"\u001b[0;31mAssertionError\u001b[0m: "
]
}
],
"source": [
"# Double check that the above settings match the defaults - delete this cell if you configure things yourself!\n",
"assert settings == RelativeHybridTopologyProtocol.default_settings()"
"# See https://github.com/OpenFreeEnergy/ExampleNotebooks/issues/138\n",
"#assert settings == RelativeHybridTopologyProtocol.default_settings()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "3a6d3f17-2049-4456-a315-ce40ebd8969c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"forcefield_settings\n",
"forcefield_settings=OpenMMSystemGeneratorFFSettings(constraints='hbonds', rigid_water=True, hydrogen_mass=3.0, forcefields=['amber/ff14SB.xml', 'amber/tip3p_standard.xml', 'amber/tip3p_HFE_multivalent.xml', 'amber/phosaa10.xml'], small_molecule_forcefield='openff-2.0.0', nonbonded_cutoff=<Quantity(1.0, 'nanometer')>, nonbonded_method='PME') thermo_settings=ThermoSettings(temperature=<Quantity(298.15, 'kelvin')>, pressure=<Quantity(0.986923267, 'standard_atmosphere')>, ph=None, redox_potential=None) protocol_repeats=3 solvation_settings=OpenMMSolvationSettings(solvent_model='tip3p', solvent_padding=<Quantity(1.2, 'nanometer')>) partial_charge_settings=OpenFFPartialChargeSettings(partial_charge_method='am1bcc', off_toolkit_backend='ambertools', number_of_conformers=None, nagl_model=None) lambda_settings=LambdaSettings(lambda_functions='default', lambda_windows=11) alchemical_settings=AlchemicalSettings(softcore_LJ='gapsys', explicit_charge_correction_cutoff=<Quantity(0.8, 'nanometer')>, endstate_dispersion_correction=False, use_dispersion_correction=False, softcore_alpha=0.85, turn_off_core_unique_exceptions=False, explicit_charge_correction=False) simulation_settings=MultiStateSimulationSettings(equilibration_length=<Quantity(1.0, 'nanosecond')>, production_length=<Quantity(5.0, 'nanosecond')>, minimization_steps=5000, time_per_iteration=<Quantity(1.0, 'picosecond')>, real_time_analysis_interval=<Quantity(250.0, 'picosecond')>, early_termination_target_error=<Quantity(0.0, 'kilocalorie / mole')>, real_time_analysis_minimum_time=<Quantity(500.0, 'picosecond')>, sampler_method='repex', sams_flatness_criteria='logZ-flatness', sams_gamma0=1.0, n_replicas=11) engine_settings=OpenMMEngineSettings(compute_platform=None) integrator_settings=IntegratorSettings(timestep=<Quantity(4.0, 'femtosecond')>, langevin_collision_rate=<Quantity(1.0, '1 / picosecond')>, barostat_frequency=<Quantity(25.0, 'timestep')>, remove_com=False, reassign_velocities=False, n_restart_attempts=20, constraint_tolerance=1e-06) output_settings=MultiStateOutputSettings(checkpoint_interval=<Quantity(250.0, 'picosecond')>, forcefield_cache='db.json', output_indices='not water', checkpoint_storage_filename='checkpoint.chk', output_filename='simulation.nc', output_structure='hybrid_system.pdb'), forcefield_settings != \n",
" forcefield_settings=OpenMMSystemGeneratorFFSettings(constraints='hbonds', rigid_water=True, hydrogen_mass=3.0, forcefields=['amber/ff14SB.xml', 'amber/tip3p_standard.xml', 'amber/tip3p_HFE_multivalent.xml', 'amber/phosaa10.xml'], small_molecule_forcefield='openff-2.1.1', nonbonded_cutoff=<Quantity(1.0, 'nanometer')>, nonbonded_method='PME') thermo_settings=ThermoSettings(temperature=<Quantity(298.15, 'kelvin')>, pressure=<Quantity(0.986923267, 'standard_atmosphere')>, ph=None, redox_potential=None) protocol_repeats=3 solvation_settings=OpenMMSolvationSettings(solvent_model='tip3p', solvent_padding=<Quantity(1.2, 'nanometer')>) partial_charge_settings=OpenFFPartialChargeSettings(partial_charge_method='am1bcc', off_toolkit_backend='ambertools', number_of_conformers=None, nagl_model=None) lambda_settings=LambdaSettings(lambda_functions='default', lambda_windows=11) alchemical_settings=AlchemicalSettings(softcore_LJ='gapsys', explicit_charge_correction_cutoff=<Quantity(0.8, 'nanometer')>, endstate_dispersion_correction=False, use_dispersion_correction=False, softcore_alpha=0.85, turn_off_core_unique_exceptions=False, explicit_charge_correction=False) simulation_settings=MultiStateSimulationSettings(equilibration_length=<Quantity(1.0, 'nanosecond')>, production_length=<Quantity(5.0, 'nanosecond')>, minimization_steps=5000, time_per_iteration=<Quantity(1, 'picosecond')>, real_time_analysis_interval=<Quantity(250, 'picosecond')>, early_termination_target_error=<Quantity(0.0, 'kilocalorie_per_mole')>, real_time_analysis_minimum_time=<Quantity(500, 'picosecond')>, sampler_method='repex', sams_flatness_criteria='logZ-flatness', sams_gamma0=1.0, n_replicas=11) engine_settings=OpenMMEngineSettings(compute_platform=None) integrator_settings=IntegratorSettings(timestep=<Quantity(4, 'femtosecond')>, langevin_collision_rate=<Quantity(1.0, '1 / picosecond')>, barostat_frequency=<Quantity(25, 'timestep')>, remove_com=False, reassign_velocities=False, n_restart_attempts=20, constraint_tolerance=1e-06) output_settings=MultiStateOutputSettings(checkpoint_interval=<Quantity(250, 'picosecond')>, forcefield_cache='db.json', output_indices='not water', checkpoint_storage_filename='checkpoint.chk', output_filename='simulation.nc', output_structure='hybrid_system.pdb'), forcefield_settings\n",
"thermo_settings\n",
"protocol_repeats\n",
"solvation_settings\n",
"partial_charge_settings\n",
"lambda_settings\n",
"alchemical_settings\n",
"simulation_settings\n",
"engine_settings\n",
"integrator_settings\n",
"output_settings\n"
]
}
],
"source": [
"default_settings = RelativeHybridTopologyProtocol.default_settings()\n",
"\n",
"for name, s in settings:\n",
" print(name)\n",
"\n",
" if getattr(settings, name) != getattr(default_settings, name):\n",
" print(f\"{settings}, {name} != \\n {default_settings}, {name}\")"
]
},
{
Expand All @@ -434,7 +483,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "32b9b58a-d7ea-4071-9046-53e6990a1faa",
"metadata": {
"slideshow": {
Expand Down Expand Up @@ -472,7 +521,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.10.14"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
370 changes: 242 additions & 128 deletions networks/ligand_networks_for_developers.ipynb

Large diffs are not rendered by default.

2,825 changes: 184 additions & 2,641 deletions openmm_rbfe/OpenFE_showcase_1_RBFE_of_T4lysozyme.ipynb

Large diffs are not rendered by default.

220 changes: 94 additions & 126 deletions openmm_rbfe/benchmark_demo.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit b70d432

Please sign in to comment.