diff --git a/ahfe_tutorial/ahfe_tutorial.ipynb b/ahfe_tutorial/ahfe_tutorial.ipynb index 2ef2aaa7..d126dcbf 100644 --- a/ahfe_tutorial/ahfe_tutorial.ipynb +++ b/ahfe_tutorial/ahfe_tutorial.ipynb @@ -25,9 +25,7 @@ { "cell_type": "markdown", "id": "e26c8170", - "metadata": { - "jp-MarkdownHeadingCollapsed": true - }, + "metadata": {}, "source": [ "## 0. Setup for Google Colab\n", "\n", @@ -208,70 +206,41 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'alchemical_settings': {},\n", - " 'integrator_settings': {'barostat_frequency': ,\n", + "{'alchemical_settings': {'annihilate_sterics': False,\n", + " 'disable_alchemical_dispersion_correction': False,\n", + " 'softcore_a': 1.0,\n", + " 'softcore_alpha': 0.5,\n", + " 'softcore_b': 1.0,\n", + " 'softcore_c': 6.0},\n", + " 'analysis_settings': {'protein_selection': 'protein and name CA',\n", + " 'skip': None},\n", + " 'integrator_settings': {'barostat': 'MonteCarloBarostat',\n", + " 'barostat_frequency': {'unit': 'timestep',\n", + " 'val': 25.0},\n", " 'constraint_tolerance': 1e-06,\n", - " 'langevin_collision_rate': ,\n", + " 'langevin_collision_rate': {'unit': '1 / picosecond',\n", + " 'val': 1.0},\n", " 'n_restart_attempts': 20,\n", " 'reassign_velocities': False,\n", " 'remove_com': False,\n", - " 'timestep': },\n", - " 'lambda_settings': {'lambda_elec': [0.0,\n", - " 0.25,\n", - " 0.5,\n", - " 0.75,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0],\n", - " 'lambda_restraints': [0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0],\n", - " 'lambda_vdw': [0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.12,\n", - " 0.24,\n", - " 0.36,\n", - " 0.48,\n", - " 0.6,\n", - " 0.7,\n", - " 0.77,\n", - " 0.85,\n", - " 1.0]},\n", + " 'surface_tension': {'unit': 'bar * nanometer',\n", + " 'val': 0},\n", + " 'timestep': {'unit': 'femtosecond', 'val': 4.0}},\n", " 'partial_charge_settings': {'nagl_model': None,\n", " 'number_of_conformers': None,\n", " 'off_toolkit_backend': 'ambertools',\n", " 'partial_charge_method': 'am1bcc'},\n", " 'protocol_repeats': 3,\n", - " 'solvation_settings': {'box_shape': 'cube',\n", + " 'solvation_settings': {'box_shape': 'dodecahedron',\n", " 'box_size': None,\n", " 'box_vectors': None,\n", " 'number_of_solvent_molecules': None,\n", " 'solvent_model': 'tip3p',\n", - " 'solvent_padding': },\n", - " 'solvent_engine_settings': {'compute_platform': None,\n", + " 'solvent_padding': {'unit': 'nanometer', 'val': 1.5}},\n", + " 'solvent_engine_settings': {'compute_platform': 'cuda',\n", " 'gpu_device_index': None},\n", - " 'solvent_equil_output_settings': {'checkpoint_interval': ,\n", + " 'solvent_equil_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'checkpoint.chk',\n", " 'equil_npt_structure': 'equil_npt_structure.pdb',\n", " 'equil_nvt_structure': 'equil_nvt_structure.pdb',\n", @@ -281,46 +250,104 @@ " 'output_indices': 'not water',\n", " 'preminimized_structure': 'system.pdb',\n", " 'production_trajectory_filename': 'production_equil.xtc',\n", - " 'trajectory_write_interval': },\n", - " 'solvent_equil_simulation_settings': {'equilibration_length': ,\n", - " 'equilibration_length_nvt': ,\n", + " 'trajectory_write_interval': {'unit': 'picosecond',\n", + " 'val': 20.0}},\n", + " 'solvent_equil_simulation_settings': {'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.2},\n", + " 'equilibration_length_nvt': {'unit': 'nanosecond',\n", + " 'val': 0.1},\n", " 'minimization_steps': 5000,\n", - " 'production_length': },\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 0.5}},\n", " 'solvent_forcefield_settings': {'constraints': 'hbonds',\n", " 'forcefields': ['amber/ff14SB.xml',\n", " 'amber/tip3p_standard.xml',\n", " 'amber/tip3p_HFE_multivalent.xml',\n", - " 'amber/phosaa10.xml'],\n", + " 'amber/phosaa10.xml',\n", + " 'amber/lipid17_merged.xml'],\n", " 'hydrogen_mass': 3.0,\n", - " 'nonbonded_cutoff': ,\n", + " 'nonbonded_cutoff': {'unit': 'nanometer',\n", + " 'val': 0.9},\n", " 'nonbonded_method': 'PME',\n", " 'rigid_water': True,\n", - " 'small_molecule_forcefield': 'openff-2.1.1'},\n", - " 'solvent_output_settings': {'checkpoint_interval': ,\n", + " 'small_molecule_forcefield': 'openff-2.2.1'},\n", + " 'solvent_lambda_settings': {'lambda_elec': [0.0,\n", + " 0.25,\n", + " 0.5,\n", + " 0.75,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0],\n", + " 'lambda_restraints': [0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0],\n", + " 'lambda_vdw': [0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.12,\n", + " 0.24,\n", + " 0.36,\n", + " 0.48,\n", + " 0.6,\n", + " 0.7,\n", + " 0.77,\n", + " 0.85,\n", + " 1.0]},\n", + " 'solvent_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'solvent_checkpoint.nc',\n", " 'forcefield_cache': 'db.json',\n", " 'output_filename': 'solvent.nc',\n", " 'output_indices': 'not water',\n", " 'output_structure': 'hybrid_system.pdb',\n", - " 'positions_write_frequency': ,\n", + " 'positions_write_frequency': {'unit': 'picosecond',\n", + " 'val': 100.0},\n", " 'velocities_write_frequency': None},\n", - " 'solvent_simulation_settings': {'early_termination_target_error': ,\n", - " 'equilibration_length': ,\n", + " 'solvent_simulation_settings': {'early_termination_target_error': {'unit': 'kilocalorie_per_mole',\n", + " 'val': 0.0},\n", + " 'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'minimization_steps': 5000,\n", " 'n_replicas': 14,\n", - " 'production_length': ,\n", - " 'real_time_analysis_interval': ,\n", - " 'real_time_analysis_minimum_time': ,\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 10.0},\n", + " 'real_time_analysis_interval': {'unit': 'picosecond',\n", + " 'val': 250.0},\n", + " 'real_time_analysis_minimum_time': {'unit': 'picosecond',\n", + " 'val': 500.0},\n", " 'sampler_method': 'repex',\n", " 'sams_flatness_criteria': 'logZ-flatness',\n", " 'sams_gamma0': 1.0,\n", - " 'time_per_iteration': },\n", + " 'time_per_iteration': {'unit': 'picosecond',\n", + " 'val': 2.5}},\n", " 'thermo_settings': {'ph': None,\n", - " 'pressure': ,\n", + " 'pressure': {'unit': 'bar', 'val': 1},\n", " 'redox_potential': None,\n", - " 'temperature': },\n", - " 'vacuum_engine_settings': {'compute_platform': None, 'gpu_device_index': None},\n", - " 'vacuum_equil_output_settings': {'checkpoint_interval': ,\n", + " 'temperature': {'unit': 'kelvin', 'val': 298.15}},\n", + " 'vacuum_engine_settings': {'compute_platform': 'cuda',\n", + " 'gpu_device_index': None},\n", + " 'vacuum_equil_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'checkpoint.chk',\n", " 'equil_npt_structure': 'equil_structure.pdb',\n", " 'equil_nvt_structure': None,\n", @@ -330,40 +357,56 @@ " 'output_indices': 'not water',\n", " 'preminimized_structure': 'system.pdb',\n", " 'production_trajectory_filename': 'production_equil.xtc',\n", - " 'trajectory_write_interval': },\n", - " 'vacuum_equil_simulation_settings': {'equilibration_length': ,\n", + " 'trajectory_write_interval': {'unit': 'picosecond',\n", + " 'val': 20.0}},\n", + " 'vacuum_equil_simulation_settings': {'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.2},\n", " 'equilibration_length_nvt': None,\n", " 'minimization_steps': 5000,\n", - " 'production_length': },\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 0.5}},\n", " 'vacuum_forcefield_settings': {'constraints': 'hbonds',\n", " 'forcefields': ['amber/ff14SB.xml',\n", " 'amber/tip3p_standard.xml',\n", " 'amber/tip3p_HFE_multivalent.xml',\n", - " 'amber/phosaa10.xml'],\n", + " 'amber/phosaa10.xml',\n", + " 'amber/lipid17_merged.xml'],\n", " 'hydrogen_mass': 3.0,\n", - " 'nonbonded_cutoff': ,\n", + " 'nonbonded_cutoff': {'unit': 'nanometer',\n", + " 'val': 0.9},\n", " 'nonbonded_method': 'nocutoff',\n", " 'rigid_water': True,\n", - " 'small_molecule_forcefield': 'openff-2.1.1'},\n", - " 'vacuum_output_settings': {'checkpoint_interval': ,\n", + " 'small_molecule_forcefield': 'openff-2.2.1'},\n", + " 'vacuum_lambda_settings': {'lambda_elec': [0.0, 0.25, 0.5, 0.75, 1.0],\n", + " 'lambda_restraints': [0.0, 0.0, 0.0, 0.0, 0.0],\n", + " 'lambda_vdw': [0.0, 0.0, 0.0, 0.0, 1.0]},\n", + " 'vacuum_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'vacuum_checkpoint.nc',\n", " 'forcefield_cache': 'db.json',\n", " 'output_filename': 'vacuum.nc',\n", " 'output_indices': 'not water',\n", " 'output_structure': 'hybrid_system.pdb',\n", - " 'positions_write_frequency': ,\n", + " 'positions_write_frequency': {'unit': 'picosecond',\n", + " 'val': 100.0},\n", " 'velocities_write_frequency': None},\n", - " 'vacuum_simulation_settings': {'early_termination_target_error': ,\n", - " 'equilibration_length': ,\n", + " 'vacuum_simulation_settings': {'early_termination_target_error': {'unit': 'kilocalorie_per_mole',\n", + " 'val': 0.0},\n", + " 'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.5},\n", " 'minimization_steps': 5000,\n", - " 'n_replicas': 14,\n", - " 'production_length': ,\n", - " 'real_time_analysis_interval': ,\n", - " 'real_time_analysis_minimum_time': ,\n", + " 'n_replicas': 5,\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 2.0},\n", + " 'real_time_analysis_interval': {'unit': 'picosecond',\n", + " 'val': 250.0},\n", + " 'real_time_analysis_minimum_time': {'unit': 'picosecond',\n", + " 'val': 500.0},\n", " 'sampler_method': 'repex',\n", " 'sams_flatness_criteria': 'logZ-flatness',\n", " 'sams_gamma0': 1.0,\n", - " 'time_per_iteration': }}\n" + " 'time_per_iteration': {'unit': 'picosecond',\n", + " 'val': 2.5}}}\n" ] } ], @@ -424,12 +467,35 @@ } ], "source": [ - "settings.lambda_settings.lambda_elec # List of floats of lambda values for the electrostatics" + "# List of floats of lambda values for the electrostatics of the solvent leg\n", + "settings.solvent_lambda_settings.lambda_elec" ] }, { "cell_type": "code", "execution_count": 10, + "id": "e56837dc-ff54-4a5f-8289-42d20fe036d1", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[0.0, 0.25, 0.5, 0.75, 1.0]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Similarly here is a list of floats of lambda values for the electrostatics of the vacuum leg\n", + "settings.vacuum_lambda_settings.lambda_elec" + ] + }, + { + "cell_type": "code", + "execution_count": 11, "id": "cbaa744c-9b3e-45ca-b6e1-227e80446623", "metadata": {}, "outputs": [ @@ -445,13 +511,14 @@ "" ] }, - "execution_count": 10, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "settings.solvent_simulation_settings.equilibration_length # Length of the NPT equilibration in the solvent, prior to running the AHFE calculation" + "# Length of the NPT equilibration in the solvent, prior to running the AHFE calculation\n", + "settings.solvent_simulation_settings.equilibration_length" ] }, { @@ -459,15 +526,15 @@ "id": "9f81f879-9eea-4af0-b772-e28832912487", "metadata": {}, "source": [ - "By default we run 3 repeats with solvent and vacuum simulation lengths of 10 ns and 2 ns over 14 lambda windows. \n", - "To speed things up here we instead run 1 repeat with both solvent and vacuum simulation lengths of 0.5 ns over 14 lambda windows.\n", + "By default we run 3 repeats with 10 ns over 14 lambda windows in the solvent leg, and 2 ns over 5 lambda windows in the vacuum leg.\n", + "To speed things up here we instead run 1 repeat with both solvent and vacuum simulation lengths of 0.5 ns.\n", "\n", "Changing default values:" ] }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "id": "e83630f0", "metadata": {}, "outputs": [], @@ -476,16 +543,6 @@ "\n", "# change the values\n", "settings.protocol_repeats = 1\n", - "settings.lambda_settings.lambda_elec = [0.0, 0.26, 0.5, 0.75, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "55067780-d228-4661-8c1e-5cb0217fd2dc", - "metadata": {}, - "outputs": [], - "source": [ "settings.solvent_simulation_settings.equilibration_length = 10 * unit.picosecond\n", "settings.solvent_simulation_settings.production_length = 500 * unit.picosecond\n", "settings.vacuum_simulation_settings.equilibration_length = 10 * unit.picosecond\n", @@ -518,70 +575,41 @@ "name": "stdout", "output_type": "stream", "text": [ - "{'alchemical_settings': {},\n", - " 'integrator_settings': {'barostat_frequency': ,\n", + "{'alchemical_settings': {'annihilate_sterics': False,\n", + " 'disable_alchemical_dispersion_correction': False,\n", + " 'softcore_a': 1.0,\n", + " 'softcore_alpha': 0.5,\n", + " 'softcore_b': 1.0,\n", + " 'softcore_c': 6.0},\n", + " 'analysis_settings': {'protein_selection': 'protein and name CA',\n", + " 'skip': None},\n", + " 'integrator_settings': {'barostat': 'MonteCarloBarostat',\n", + " 'barostat_frequency': {'unit': 'timestep',\n", + " 'val': 25.0},\n", " 'constraint_tolerance': 1e-06,\n", - " 'langevin_collision_rate': ,\n", + " 'langevin_collision_rate': {'unit': '1 / picosecond',\n", + " 'val': 1.0},\n", " 'n_restart_attempts': 20,\n", " 'reassign_velocities': False,\n", " 'remove_com': False,\n", - " 'timestep': },\n", - " 'lambda_settings': {'lambda_elec': [0.0,\n", - " 0.26,\n", - " 0.5,\n", - " 0.75,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0,\n", - " 1.0],\n", - " 'lambda_restraints': [0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0],\n", - " 'lambda_vdw': [0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.0,\n", - " 0.12,\n", - " 0.24,\n", - " 0.36,\n", - " 0.48,\n", - " 0.6,\n", - " 0.7,\n", - " 0.77,\n", - " 0.85,\n", - " 1.0]},\n", + " 'surface_tension': {'unit': 'bar * nanometer',\n", + " 'val': 0},\n", + " 'timestep': {'unit': 'femtosecond', 'val': 4.0}},\n", " 'partial_charge_settings': {'nagl_model': None,\n", " 'number_of_conformers': None,\n", " 'off_toolkit_backend': 'ambertools',\n", " 'partial_charge_method': 'am1bcc'},\n", " 'protocol_repeats': 1,\n", - " 'solvation_settings': {'box_shape': 'cube',\n", + " 'solvation_settings': {'box_shape': 'dodecahedron',\n", " 'box_size': None,\n", " 'box_vectors': None,\n", " 'number_of_solvent_molecules': None,\n", " 'solvent_model': 'tip3p',\n", - " 'solvent_padding': },\n", + " 'solvent_padding': {'unit': 'nanometer', 'val': 1.5}},\n", " 'solvent_engine_settings': {'compute_platform': 'CUDA',\n", " 'gpu_device_index': None},\n", - " 'solvent_equil_output_settings': {'checkpoint_interval': ,\n", + " 'solvent_equil_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'checkpoint.chk',\n", " 'equil_npt_structure': 'equil_npt_structure.pdb',\n", " 'equil_nvt_structure': 'equil_nvt_structure.pdb',\n", @@ -591,46 +619,104 @@ " 'output_indices': 'not water',\n", " 'preminimized_structure': 'system.pdb',\n", " 'production_trajectory_filename': 'production_equil.xtc',\n", - " 'trajectory_write_interval': },\n", - " 'solvent_equil_simulation_settings': {'equilibration_length': ,\n", - " 'equilibration_length_nvt': ,\n", + " 'trajectory_write_interval': {'unit': 'picosecond',\n", + " 'val': 20.0}},\n", + " 'solvent_equil_simulation_settings': {'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.2},\n", + " 'equilibration_length_nvt': {'unit': 'nanosecond',\n", + " 'val': 0.1},\n", " 'minimization_steps': 5000,\n", - " 'production_length': },\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 0.5}},\n", " 'solvent_forcefield_settings': {'constraints': 'hbonds',\n", " 'forcefields': ['amber/ff14SB.xml',\n", " 'amber/tip3p_standard.xml',\n", " 'amber/tip3p_HFE_multivalent.xml',\n", - " 'amber/phosaa10.xml'],\n", + " 'amber/phosaa10.xml',\n", + " 'amber/lipid17_merged.xml'],\n", " 'hydrogen_mass': 3.0,\n", - " 'nonbonded_cutoff': ,\n", + " 'nonbonded_cutoff': {'unit': 'nanometer',\n", + " 'val': 0.9},\n", " 'nonbonded_method': 'PME',\n", " 'rigid_water': True,\n", - " 'small_molecule_forcefield': 'openff-2.1.1'},\n", - " 'solvent_output_settings': {'checkpoint_interval': ,\n", + " 'small_molecule_forcefield': 'openff-2.2.1'},\n", + " 'solvent_lambda_settings': {'lambda_elec': [0.0,\n", + " 0.25,\n", + " 0.5,\n", + " 0.75,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0,\n", + " 1.0],\n", + " 'lambda_restraints': [0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0],\n", + " 'lambda_vdw': [0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.0,\n", + " 0.12,\n", + " 0.24,\n", + " 0.36,\n", + " 0.48,\n", + " 0.6,\n", + " 0.7,\n", + " 0.77,\n", + " 0.85,\n", + " 1.0]},\n", + " 'solvent_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'solvent_checkpoint.nc',\n", " 'forcefield_cache': 'db.json',\n", " 'output_filename': 'solvent.nc',\n", " 'output_indices': 'not water',\n", " 'output_structure': 'hybrid_system.pdb',\n", - " 'positions_write_frequency': ,\n", + " 'positions_write_frequency': {'unit': 'picosecond',\n", + " 'val': 100.0},\n", " 'velocities_write_frequency': None},\n", - " 'solvent_simulation_settings': {'early_termination_target_error': ,\n", - " 'equilibration_length': ,\n", + " 'solvent_simulation_settings': {'early_termination_target_error': {'unit': 'kilocalorie_per_mole',\n", + " 'val': 0.0},\n", + " 'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.009999999999999998},\n", " 'minimization_steps': 5000,\n", " 'n_replicas': 14,\n", - " 'production_length': ,\n", - " 'real_time_analysis_interval': ,\n", - " 'real_time_analysis_minimum_time': ,\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 0.4999999999999999},\n", + " 'real_time_analysis_interval': {'unit': 'picosecond',\n", + " 'val': 250.0},\n", + " 'real_time_analysis_minimum_time': {'unit': 'picosecond',\n", + " 'val': 500.0},\n", " 'sampler_method': 'repex',\n", " 'sams_flatness_criteria': 'logZ-flatness',\n", " 'sams_gamma0': 1.0,\n", - " 'time_per_iteration': },\n", + " 'time_per_iteration': {'unit': 'picosecond',\n", + " 'val': 2.5}},\n", " 'thermo_settings': {'ph': None,\n", - " 'pressure': ,\n", + " 'pressure': {'unit': 'bar', 'val': 1},\n", " 'redox_potential': None,\n", - " 'temperature': },\n", - " 'vacuum_engine_settings': {'compute_platform': None, 'gpu_device_index': None},\n", - " 'vacuum_equil_output_settings': {'checkpoint_interval': ,\n", + " 'temperature': {'unit': 'kelvin', 'val': 298.15}},\n", + " 'vacuum_engine_settings': {'compute_platform': 'cuda',\n", + " 'gpu_device_index': None},\n", + " 'vacuum_equil_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'checkpoint.chk',\n", " 'equil_npt_structure': 'equil_structure.pdb',\n", " 'equil_nvt_structure': None,\n", @@ -640,40 +726,56 @@ " 'output_indices': 'not water',\n", " 'preminimized_structure': 'system.pdb',\n", " 'production_trajectory_filename': 'production_equil.xtc',\n", - " 'trajectory_write_interval': },\n", - " 'vacuum_equil_simulation_settings': {'equilibration_length': ,\n", + " 'trajectory_write_interval': {'unit': 'picosecond',\n", + " 'val': 20.0}},\n", + " 'vacuum_equil_simulation_settings': {'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.2},\n", " 'equilibration_length_nvt': None,\n", " 'minimization_steps': 5000,\n", - " 'production_length': },\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 0.5}},\n", " 'vacuum_forcefield_settings': {'constraints': 'hbonds',\n", " 'forcefields': ['amber/ff14SB.xml',\n", " 'amber/tip3p_standard.xml',\n", " 'amber/tip3p_HFE_multivalent.xml',\n", - " 'amber/phosaa10.xml'],\n", + " 'amber/phosaa10.xml',\n", + " 'amber/lipid17_merged.xml'],\n", " 'hydrogen_mass': 3.0,\n", - " 'nonbonded_cutoff': ,\n", + " 'nonbonded_cutoff': {'unit': 'nanometer',\n", + " 'val': 0.9},\n", " 'nonbonded_method': 'nocutoff',\n", " 'rigid_water': True,\n", - " 'small_molecule_forcefield': 'openff-2.1.1'},\n", - " 'vacuum_output_settings': {'checkpoint_interval': ,\n", + " 'small_molecule_forcefield': 'openff-2.2.1'},\n", + " 'vacuum_lambda_settings': {'lambda_elec': [0.0, 0.25, 0.5, 0.75, 1.0],\n", + " 'lambda_restraints': [0.0, 0.0, 0.0, 0.0, 0.0],\n", + " 'lambda_vdw': [0.0, 0.0, 0.0, 0.0, 1.0]},\n", + " 'vacuum_output_settings': {'checkpoint_interval': {'unit': 'nanosecond',\n", + " 'val': 1.0},\n", " 'checkpoint_storage_filename': 'vacuum_checkpoint.nc',\n", " 'forcefield_cache': 'db.json',\n", " 'output_filename': 'vacuum.nc',\n", " 'output_indices': 'not water',\n", " 'output_structure': 'hybrid_system.pdb',\n", - " 'positions_write_frequency': ,\n", + " 'positions_write_frequency': {'unit': 'picosecond',\n", + " 'val': 100.0},\n", " 'velocities_write_frequency': None},\n", - " 'vacuum_simulation_settings': {'early_termination_target_error': ,\n", - " 'equilibration_length': ,\n", + " 'vacuum_simulation_settings': {'early_termination_target_error': {'unit': 'kilocalorie_per_mole',\n", + " 'val': 0.0},\n", + " 'equilibration_length': {'unit': 'nanosecond',\n", + " 'val': 0.009999999999999998},\n", " 'minimization_steps': 5000,\n", - " 'n_replicas': 14,\n", - " 'production_length': ,\n", - " 'real_time_analysis_interval': ,\n", - " 'real_time_analysis_minimum_time': ,\n", + " 'n_replicas': 5,\n", + " 'production_length': {'unit': 'nanosecond',\n", + " 'val': 0.4999999999999999},\n", + " 'real_time_analysis_interval': {'unit': 'picosecond',\n", + " 'val': 250.0},\n", + " 'real_time_analysis_minimum_time': {'unit': 'picosecond',\n", + " 'val': 500.0},\n", " 'sampler_method': 'repex',\n", " 'sams_flatness_criteria': 'logZ-flatness',\n", " 'sams_gamma0': 1.0,\n", - " 'time_per_iteration': }}\n" + " 'time_per_iteration': {'unit': 'picosecond',\n", + " 'val': 2.5}}}\n" ] } ], @@ -761,7 +863,7 @@ "transformation_dir.mkdir(exist_ok=True)\n", "\n", "# then we write out the transformation\n", - "transformation.dump(transformation_dir / f\"{transformation.name}.json\")" + "transformation.to_json(transformation_dir / f\"{transformation.name}.json\")" ] }, { @@ -996,14 +1098,6 @@ "source": [ "estimate" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f65ef93f-89be-4c15-8ac6-014509625be4", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -1022,7 +1116,14 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.10" + "version": "3.14.7" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "state": {}, + "version_major": 2, + "version_minor": 0 + } } }, "nbformat": 4, diff --git a/environment.yaml b/environment.yaml index e4345b5b..4ca6a022 100644 --- a/environment.yaml +++ b/environment.yaml @@ -31,4 +31,4 @@ dependencies: - plugcli - pip: - - git+https://github.com/OpenFreeEnergy/openfe@issue-2236 # use conda-forge v1.13.0 after release + - git+https://github.com/OpenFreeEnergy/openfe@main # use conda-forge v1.13.0 after release