|
178 | 178 | "text": [ |
179 | 179 | "{'alchemical_settings': {'endstate_dispersion_correction': False,\n", |
180 | 180 | " 'explicit_charge_correction': False,\n", |
181 | | - " 'explicit_charge_correction_cutoff': <Quantity(0.8, 'nanometer')>,\n", |
| 181 | + " 'explicit_charge_correction_cutoff': {'unit': 'nanometer',\n", |
| 182 | + " 'val': 0.8},\n", |
182 | 183 | " 'softcore_LJ': 'gapsys',\n", |
183 | 184 | " 'softcore_alpha': 0.85,\n", |
184 | 185 | " 'turn_off_core_unique_exceptions': False,\n", |
185 | 186 | " 'use_dispersion_correction': False},\n", |
186 | | - " 'engine_settings': {'compute_platform': None, 'gpu_device_index': None},\n", |
| 187 | + " 'engine_settings': {'compute_platform': 'cuda', 'gpu_device_index': None},\n", |
187 | 188 | " 'forcefield_settings': {'constraints': 'hbonds',\n", |
188 | 189 | " 'forcefields': ['amber/ff14SB.xml',\n", |
189 | 190 | " 'amber/tip3p_standard.xml',\n", |
190 | 191 | " 'amber/tip3p_HFE_multivalent.xml',\n", |
191 | 192 | " 'amber/phosaa10.xml'],\n", |
192 | 193 | " 'hydrogen_mass': 3.0,\n", |
193 | | - " 'nonbonded_cutoff': <Quantity(1.0, 'nanometer')>,\n", |
| 194 | + " 'nonbonded_cutoff': {'unit': 'nanometer', 'val': 0.9},\n", |
194 | 195 | " 'nonbonded_method': 'PME',\n", |
195 | 196 | " 'rigid_water': True,\n", |
196 | | - " 'small_molecule_forcefield': 'openff-2.1.1'},\n", |
197 | | - " 'integrator_settings': {'barostat_frequency': <Quantity(25.0, 'timestep')>,\n", |
| 197 | + " 'small_molecule_forcefield': 'openff-2.2.1'},\n", |
| 198 | + " 'integrator_settings': {'barostat_frequency': {'unit': 'timestep',\n", |
| 199 | + " 'val': 25.0},\n", |
198 | 200 | " 'constraint_tolerance': 1e-06,\n", |
199 | | - " 'langevin_collision_rate': <Quantity(1.0, '1 / picosecond')>,\n", |
| 201 | + " 'langevin_collision_rate': {'unit': '1 / picosecond',\n", |
| 202 | + " 'val': 1.0},\n", |
200 | 203 | " 'n_restart_attempts': 20,\n", |
201 | 204 | " 'reassign_velocities': False,\n", |
202 | 205 | " 'remove_com': False,\n", |
203 | | - " 'timestep': <Quantity(4.0, 'femtosecond')>},\n", |
| 206 | + " 'timestep': {'unit': 'femtosecond', 'val': 4.0}},\n", |
204 | 207 | " 'lambda_settings': {'lambda_functions': 'default', 'lambda_windows': 11},\n", |
205 | | - " 'output_settings': {'checkpoint_interval': <Quantity(1.0, 'nanosecond')>,\n", |
| 208 | + " 'output_settings': {'checkpoint_interval': {'unit': 'nanosecond', 'val': 1.0},\n", |
206 | 209 | " 'checkpoint_storage_filename': 'checkpoint.chk',\n", |
207 | 210 | " 'forcefield_cache': 'db.json',\n", |
208 | 211 | " 'output_filename': 'simulation.nc',\n", |
209 | 212 | " 'output_indices': 'not water',\n", |
210 | 213 | " 'output_structure': 'hybrid_system.pdb',\n", |
211 | | - " 'positions_write_frequency': <Quantity(100.0, 'picosecond')>,\n", |
| 214 | + " 'positions_write_frequency': {'unit': 'picosecond',\n", |
| 215 | + " 'val': 100.0},\n", |
212 | 216 | " 'velocities_write_frequency': None},\n", |
213 | 217 | " 'partial_charge_settings': {'nagl_model': None,\n", |
214 | 218 | " 'number_of_conformers': None,\n", |
215 | 219 | " 'off_toolkit_backend': 'ambertools',\n", |
216 | 220 | " 'partial_charge_method': 'am1bcc'},\n", |
217 | 221 | " 'protocol_repeats': 3,\n", |
218 | | - " 'simulation_settings': {'early_termination_target_error': <Quantity(0.0, 'kilocalorie_per_mole')>,\n", |
219 | | - " 'equilibration_length': <Quantity(1.0, 'nanosecond')>,\n", |
| 222 | + " 'simulation_settings': {'early_termination_target_error': {'unit': 'kilocalorie_per_mole',\n", |
| 223 | + " 'val': 0.0},\n", |
| 224 | + " 'equilibration_length': {'unit': 'nanosecond',\n", |
| 225 | + " 'val': 1.0},\n", |
220 | 226 | " 'minimization_steps': 5000,\n", |
221 | 227 | " 'n_replicas': 11,\n", |
222 | | - " 'production_length': <Quantity(5.0, 'nanosecond')>,\n", |
223 | | - " 'real_time_analysis_interval': <Quantity(250.0, 'picosecond')>,\n", |
224 | | - " 'real_time_analysis_minimum_time': <Quantity(500.0, 'picosecond')>,\n", |
| 228 | + " 'production_length': {'unit': 'nanosecond',\n", |
| 229 | + " 'val': 5.0},\n", |
| 230 | + " 'real_time_analysis_interval': {'unit': 'picosecond',\n", |
| 231 | + " 'val': 250.0},\n", |
| 232 | + " 'real_time_analysis_minimum_time': {'unit': 'picosecond',\n", |
| 233 | + " 'val': 500.0},\n", |
225 | 234 | " 'sampler_method': 'repex',\n", |
226 | 235 | " 'sams_flatness_criteria': 'logZ-flatness',\n", |
227 | 236 | " 'sams_gamma0': 1.0,\n", |
228 | | - " 'time_per_iteration': <Quantity(1.0, 'picosecond')>},\n", |
229 | | - " 'solvation_settings': {'box_shape': 'cube',\n", |
| 237 | + " 'time_per_iteration': {'unit': 'picosecond',\n", |
| 238 | + " 'val': 2.5}},\n", |
| 239 | + " 'solvation_settings': {'box_shape': 'dodecahedron',\n", |
230 | 240 | " 'box_size': None,\n", |
231 | 241 | " 'box_vectors': None,\n", |
232 | 242 | " 'number_of_solvent_molecules': None,\n", |
233 | 243 | " 'solvent_model': 'tip3p',\n", |
234 | | - " 'solvent_padding': <Quantity(1.2, 'nanometer')>},\n", |
| 244 | + " 'solvent_padding': {'unit': 'nanometer', 'val': 1.5}},\n", |
235 | 245 | " 'thermo_settings': {'ph': None,\n", |
236 | | - " 'pressure': <Quantity(0.986923267, 'standard_atmosphere')>,\n", |
| 246 | + " 'pressure': {'unit': 'bar', 'val': 1},\n", |
237 | 247 | " 'redox_potential': None,\n", |
238 | | - " 'temperature': <Quantity(298.15, 'kelvin')>}}\n" |
| 248 | + " 'temperature': {'unit': 'kelvin', 'val': 298.15}}}\n" |
| 249 | + ] |
| 250 | + }, |
| 251 | + { |
| 252 | + "name": "stderr", |
| 253 | + "output_type": "stream", |
| 254 | + "text": [ |
| 255 | + "/Users/atravitz/micromamba/envs/openfe-conda/lib/python3.11/site-packages/gufe/settings/models.py:30: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/\n", |
| 256 | + " pprint.pprint(self.dict())\n" |
239 | 257 | ] |
240 | 258 | } |
241 | 259 | ], |
|
318 | 336 | " ],\n", |
319 | 337 | " \n", |
320 | 338 | " # Small molecule force field to use with OpenMM template generator:\n", |
321 | | - " small_molecule_forcefield='openff-2.1.1',\n", |
| 339 | + " small_molecule_forcefield='openff-2.2.1',\n", |
322 | 340 | " \n", |
323 | 341 | " # Nonbonded settings\n", |
324 | 342 | " nonbonded_method='PME', # Particle Mesh Ewald for long range electrostatics\n", |
325 | | - " nonbonded_cutoff=1.0 * unit.nm, # Cut off Lennard-Jones interactions beyond 1 nm\n", |
| 343 | + " nonbonded_cutoff=0.9 * unit.nm, # Cut off Lennard-Jones interactions beyond 0.9 nm\n", |
326 | 344 | " ),\n", |
327 | 345 | " thermo_settings=equil_rfe_settings.ThermoSettings(\n", |
328 | 346 | " temperature=298.15 * unit.kelvin, # Set thermostat temperature\n", |
|
332 | 350 | " ),\n", |
333 | 351 | " solvation_settings=equil_rfe_settings.OpenMMSolvationSettings(\n", |
334 | 352 | " solvent_model='tip3p', # Solvent model to generate starting coords\n", |
335 | | - " solvent_padding=1.2 * unit.nm, # Total distance between periodic image starting coords\n", |
336 | | - " box_shape = 'cube', # Cubic water box\n", |
| 353 | + " solvent_padding=1.5 * unit.nm, # Minimum padding distance from the solute\n", |
| 354 | + " box_shape = 'dodecahedron', # Dodecahedron water box\n", |
337 | 355 | " box_size = None, # Size of the water box\n", |
338 | 356 | " box_vectors = None, # Box vectors\n", |
339 | 357 | " number_of_solvent_molecules = None, # Number of solvent molecules\n", |
|
372 | 390 | " # Alchemical Space Sampling settings\n", |
373 | 391 | " n_replicas=11, # Number of replicas sampling alchemical space\n", |
374 | 392 | " sampler_method='repex', # Sample lambda with Hamiltonian Replica Exchange\n", |
375 | | - " time_per_iteration=1*unit.ps, # Time interval between state sampling (MCMC) attempts\n", |
| 393 | + " time_per_iteration=2.5*unit.ps, # Time interval between state sampling (MCMC) attempts\n", |
376 | 394 | " \n", |
377 | 395 | " # SAMS sampling settings (used if sampler_method='sams')\n", |
378 | 396 | " sams_flatness_criteria='logZ-flatness', # Criteria for switch to asymptomatically optimal scheme\n", |
|
387 | 405 | " early_termination_target_error=0.0*unit.kilocalorie_per_mole,\n", |
388 | 406 | " ),\n", |
389 | 407 | " engine_settings=equil_rfe_settings.OpenMMEngineSettings(\n", |
390 | | - " compute_platform=None, # Let OpenMM choose the best platform for your hardware\n", |
| 408 | + " compute_platform=\"cuda\", # Force the usage of a CUDA device for compute\n", |
391 | 409 | " ),\n", |
392 | 410 | " integrator_settings=equil_rfe_settings.IntegratorSettings(\n", |
393 | 411 | " timestep=4 * unit.femtosecond, # Integration timestep\n", |
|
466 | 484 | "source": [ |
467 | 485 | "Unlike `ProtocolSettings`, a `Protocol` instance is immutable. The only way to safely change the settings of a `Protocol` is to recreate it from the modified `ProtocolSettings` object." |
468 | 486 | ] |
| 487 | + }, |
| 488 | + { |
| 489 | + "cell_type": "code", |
| 490 | + "execution_count": null, |
| 491 | + "id": "91e223bc-5dc7-4533-ba5d-da112809be9a", |
| 492 | + "metadata": {}, |
| 493 | + "outputs": [], |
| 494 | + "source": [] |
469 | 495 | } |
470 | 496 | ], |
471 | 497 | "metadata": { |
|
484 | 510 | "name": "python", |
485 | 511 | "nbconvert_exporter": "python", |
486 | 512 | "pygments_lexer": "ipython3", |
487 | | - "version": "3.12.10" |
| 513 | + "version": "3.11.14" |
488 | 514 | }, |
489 | 515 | "widgets": { |
490 | 516 | "application/vnd.jupyter.widget-state+json": { |
|
0 commit comments