Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming and moving some of the protocol settings #689

Merged
merged 45 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
189815e
Initial commit to rename protocol settings
hannahbaumann Jan 17, 2024
7a4266e
more settings changes
hannahbaumann Jan 18, 2024
1ed1ea9
Transfer changes in AlchemicalSamplerSettings to different protocols
hannahbaumann Jan 18, 2024
a16a91e
Change n_steps in protocols
hannahbaumann Jan 18, 2024
190eec9
Propagate changes in OutputSettings to protocols and tests
hannahbaumann Jan 18, 2024
eb238e3
change validator
hannahbaumann Jan 18, 2024
d499356
fixes new settings
hannahbaumann Jan 18, 2024
768b4b3
small changes
hannahbaumann Jan 19, 2024
d7145d8
changes protocol_repeats
hannahbaumann Jan 19, 2024
ff84000
add values to validators
hannahbaumann Jan 19, 2024
2566438
small fix
hannahbaumann Jan 19, 2024
b22c51a
change doc string minimum iterations
hannahbaumann Jan 19, 2024
2dd0faa
more renaming online_analysis to real_time and pep8 fixes
hannahbaumann Jan 19, 2024
b39e6e3
for MD protocol use mcmc_steps=1 since only used for testing the time…
hannahbaumann Jan 19, 2024
e55ce2c
changes softcore_LJ
hannahbaumann Jan 24, 2024
4d08133
Fixes protocol_repeats
hannahbaumann Jan 25, 2024
1d6f9c7
Fix get_integrator
hannahbaumann Jan 25, 2024
b5bca0d
small fixes
hannahbaumann Jan 25, 2024
a3f72d1
Move remove_com to IntegratorSettings
hannahbaumann Jan 25, 2024
ad8170f
more small fixes
hannahbaumann Jan 25, 2024
aef9156
Plain MD protocol move n_repeats from RepeatSettings to ProtocolSetti…
hannahbaumann Jan 25, 2024
c83a3c9
small fixes
hannahbaumann Jan 25, 2024
c20f5b6
Larger settings changes, suggestions
hannahbaumann Jan 26, 2024
573f271
Change unit early_termination_target_error to kcal/mol
hannahbaumann Jan 30, 2024
990667c
Merge branch 'main' into rename_settings
richardjgowers Feb 1, 2024
4a73dff
updates for new Settings
richardjgowers Feb 2, 2024
55981bb
document dev scripts for generating jsons
richardjgowers Feb 5, 2024
60a42bc
fixup usage of 'sampler_settings' in AFE base
richardjgowers Feb 5, 2024
c8acd48
clean up some imports
richardjgowers Feb 5, 2024
3aa4581
use convert_steps_per_iteration in afe base
richardjgowers Feb 5, 2024
238bedf
works on validators and unit conversions
richardjgowers Feb 5, 2024
940424f
fixup on unit conversion
richardjgowers Feb 5, 2024
e0fabfe
remove commented out SamplerSettings block
richardjgowers Feb 5, 2024
6db0c53
added tests for settings_validation conversions
richardjgowers Feb 5, 2024
8bc76b1
got kT conversion upside down
richardjgowers Feb 5, 2024
0b858df
small fixups for new settings
richardjgowers Feb 5, 2024
0fa3995
update result jsons for tests
richardjgowers Feb 5, 2024
03c4a17
shorten AHFE time in dev scripts
richardjgowers Feb 5, 2024
8457b78
Merge branch 'main' into rename_settings
richardjgowers Feb 5, 2024
5f25fd4
shorten AHFE time in dev scripts
richardjgowers Feb 5, 2024
fcf5735
update openfecli test files for new settings
richardjgowers Feb 6, 2024
cc3e22e
revert changes to gen-serialized-results.py
richardjgowers Feb 6, 2024
ae5374e
update away from nose test style
richardjgowers Feb 6, 2024
8c84c7b
fixup LambdaSettings docstrings
richardjgowers Feb 6, 2024
2a948cc
remove doc stubs for removed settings
richardjgowers Feb 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions devtools/data/gen-serialized-results.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
"""
Dev script to generate some result jsons that are used for testing

Generates
- AHFEProtocol_json_results.gz
- used in afe_solvation_json fixture
- RHFEProtocol_json_results.gz
- used in rfe_transformation_json fixture
- MDProtocol_json_results.gz
- used in md_json fixture
"""
import gzip
import json
import logging
Expand Down Expand Up @@ -60,7 +71,7 @@ def generate_md_json(smc):
settings.simulation_settings.equilibration_length_nvt = 0.01 * unit.nanosecond
settings.simulation_settings.equilibration_length = 0.01 * unit.nanosecond
settings.simulation_settings.production_length = 0.01 * unit.nanosecond
settings.system_settings.nonbonded_method = "nocutoff"
settings.forcefield_settings.nonbonded_method = "nocutoff"
protocol = PlainMDProtocol(settings=settings)
system = openfe.ChemicalSystem({"ligand": smc})
dag = protocol.create(stateA=system, stateB=system, mapping=None)
Expand All @@ -80,9 +91,11 @@ def generate_ahfe_json(smc):
settings.lambda_settings.lambda_vdw = [0.0, 0.0, 0.0, 0.0, 0.0, 0.12, 0.24,
0.36, 0.48, 0.6, 0.7, 0.77, 0.85,
1.0]
settings.alchemsampler_settings.n_repeats = 3
settings.alchemsampler_settings.n_replicas = 14
settings.alchemsampler_settings.online_analysis_target_error = 0.2 * unit.boltzmann_constant * unit.kelvin
settings.protocol_repeats = 3
settings.solvent_simulation_settings.n_replicas = 14
settings.vacuum_simulation_settings.n_replicas = 14
settings.solvent_simulation_settings.early_termination_target_error = 0.12 * unit.kilocalorie_per_mole
settings.vacuum_simulation_settings.early_termination_target_error = 0.12 * unit.kilocalorie_per_mole
settings.vacuum_engine_settings.compute_platform = 'CPU'
settings.solvent_engine_settings.compute_platform = 'CUDA'

Expand All @@ -103,7 +116,7 @@ def generate_rfe_json(smcA, smcB):
settings = RelativeHybridTopologyProtocol.default_settings()
settings.simulation_settings.equilibration_length = 10 * unit.picosecond
settings.simulation_settings.production_length = 250 * unit.picosecond
settings.system_settings.nonbonded_method = "nocutoff"
settings.forcefield_settings.nonbonded_method = "nocutoff"
protocol = RelativeHybridTopologyProtocol(settings=settings)

a_smcB = align_mol_shape(smcB, ref_mol=smcA)
Expand Down
24 changes: 1 addition & 23 deletions docs/reference/api/openmm_rfe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,6 @@ Below are the settings which can be tweaked in the protocol. The default setting
:inherited-members: SettingsBaseModel
:member-order: bysource

.. autopydantic_model:: AlchemicalSamplerSettings
: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
:member-order: bysource

.. autopydantic_model:: AlchemicalSettings
:model-show-json: False
:model-show-field-summary: False
Expand Down Expand Up @@ -113,7 +102,7 @@ Below are the settings which can be tweaked in the protocol. The default setting
:inherited-members: SettingsBaseModel
:member-order: bysource

.. autopydantic_model:: SimulationSettings
.. autopydantic_model:: MultiStateSimulationSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
Expand All @@ -134,14 +123,3 @@ Below are the settings which can be tweaked in the protocol. The default setting
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource

.. autopydantic_model:: SystemSettings
: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
:member-order: bysource
26 changes: 1 addition & 25 deletions docs/reference/api/openmm_solvation_afe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ Below are the settings which can be tweaked in the protocol. The default setting
:member-order: bysource
:noindex:

.. autopydantic_model:: AlchemicalSamplerSettings
: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
:member-order: bysource
:noindex:

.. autopydantic_model:: AlchemicalSettings
:model-show-json: False
:model-show-field-summary: False
Expand Down Expand Up @@ -121,7 +109,7 @@ Below are the settings which can be tweaked in the protocol. The default setting
:member-order: bysource
:noindex:

.. autopydantic_model:: SimulationSettings
.. autopydantic_model:: MultiStateSimulationSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
Expand All @@ -144,15 +132,3 @@ Below are the settings which can be tweaked in the protocol. The default setting
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: SystemSettings
: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
:member-order: bysource
:noindex:
Loading
Loading