|
137 | 137 | "execution_count": 1, |
138 | 138 | "id": "20fc8142-c618-4d50-b903-5a04f6a34d5c", |
139 | 139 | "metadata": {}, |
140 | | - "outputs": [], |
| 140 | + "outputs": [ |
| 141 | + { |
| 142 | + "name": "stderr", |
| 143 | + "output_type": "stream", |
| 144 | + "text": [ |
| 145 | + "/home/ialibay/software/mambaforge/install/envs/openfe/lib/python3.12/site-packages/openmoltools/utils.py:9: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", |
| 146 | + " from pkg_resources import resource_filename\n" |
| 147 | + ] |
| 148 | + } |
| 149 | + ], |
141 | 150 | "source": [ |
142 | 151 | "import openfe\n", |
143 | 152 | "from openfe import ChemicalSystem, ProteinComponent, SmallMoleculeComponent, SolventComponent\n", |
|
186 | 195 | }, |
187 | 196 | { |
188 | 197 | "cell_type": "code", |
189 | | - "execution_count": 2, |
| 198 | + "execution_count": 3, |
190 | 199 | "id": "b27e54cc-fd6a-4afc-ab22-4dde0561938c", |
191 | 200 | "metadata": {}, |
192 | 201 | "outputs": [], |
|
200 | 209 | "# Setting the production length and checkpoint interval to 20 ps to match the trajectory write interval, so one frame will be written\n", |
201 | 210 | "settings.simulation_settings.production_length = 0.02 * unit.nanosecond # setting the npt production length to 20 ps\n", |
202 | 211 | "settings.output_settings.checkpoint_interval = 0.02 * unit.nanosecond # setting the checkpoint interval to 20 ps\n", |
203 | | - "settings.engine_settings.compute_platform = 'CPU' # running the simulation on the cpu" |
| 212 | + "settings.engine_settings.compute_platform = 'CPU' # running the simulation on the cpu\n", |
| 213 | + "settings.solvation_settings.solvent_padding = 1.0 * unit.nanometer # set the solvent padding to 1 nm to reduce the number of waters" |
204 | 214 | ] |
205 | 215 | }, |
206 | 216 | { |
207 | 217 | "cell_type": "code", |
208 | | - "execution_count": 3, |
| 218 | + "execution_count": 4, |
209 | 219 | "id": "b69668c9-2e74-421e-a9ea-b7f3bc6c6e5a", |
210 | 220 | "metadata": {}, |
211 | 221 | "outputs": [ |
|
220 | 230 | " 'amber/tip3p_HFE_multivalent.xml',\n", |
221 | 231 | " 'amber/phosaa10.xml'],\n", |
222 | 232 | " 'hydrogen_mass': 3.0,\n", |
223 | | - " 'nonbonded_cutoff': <Quantity(1.0, 'nanometer')>,\n", |
| 233 | + " 'nonbonded_cutoff': {'unit': 'nanometer', 'val': 0.9},\n", |
224 | 234 | " 'nonbonded_method': 'PME',\n", |
225 | 235 | " 'rigid_water': True,\n", |
226 | | - " 'small_molecule_forcefield': 'openff-2.1.1'},\n", |
227 | | - " 'integrator_settings': {'barostat_frequency': <Quantity(25.0, 'timestep')>,\n", |
| 236 | + " 'small_molecule_forcefield': 'openff-2.2.1'},\n", |
| 237 | + " 'integrator_settings': {'barostat_frequency': {'unit': 'timestep',\n", |
| 238 | + " 'val': 25.0},\n", |
228 | 239 | " 'constraint_tolerance': 1e-06,\n", |
229 | | - " 'langevin_collision_rate': <Quantity(1.0, '1 / picosecond')>,\n", |
| 240 | + " 'langevin_collision_rate': {'unit': '1 / picosecond',\n", |
| 241 | + " 'val': 1.0},\n", |
230 | 242 | " 'n_restart_attempts': 20,\n", |
231 | 243 | " 'reassign_velocities': False,\n", |
232 | 244 | " 'remove_com': False,\n", |
233 | | - " 'timestep': <Quantity(4.0, 'femtosecond')>},\n", |
234 | | - " 'output_settings': {'checkpoint_interval': <Quantity(20.0, 'picosecond')>,\n", |
| 245 | + " 'timestep': {'unit': 'femtosecond', 'val': 4.0}},\n", |
| 246 | + " 'output_settings': {'checkpoint_interval': {'unit': 'nanosecond', 'val': 0.02},\n", |
235 | 247 | " 'checkpoint_storage_filename': 'checkpoint.chk',\n", |
236 | 248 | " 'equil_npt_structure': 'equil_npt.pdb',\n", |
237 | 249 | " 'equil_nvt_structure': 'equil_nvt.pdb',\n", |
|
241 | 253 | " 'output_indices': 'not water',\n", |
242 | 254 | " 'preminimized_structure': 'system.pdb',\n", |
243 | 255 | " 'production_trajectory_filename': 'simulation.xtc',\n", |
244 | | - " 'trajectory_write_interval': <Quantity(20.0, 'picosecond')>},\n", |
| 256 | + " 'trajectory_write_interval': {'unit': 'picosecond',\n", |
| 257 | + " 'val': 20.0}},\n", |
245 | 258 | " 'partial_charge_settings': {'nagl_model': None,\n", |
246 | 259 | " 'number_of_conformers': None,\n", |
247 | 260 | " 'off_toolkit_backend': 'ambertools',\n", |
248 | 261 | " 'partial_charge_method': 'am1bcc'},\n", |
249 | 262 | " 'protocol_repeats': 1,\n", |
250 | | - " 'simulation_settings': {'equilibration_length': <Quantity(0.01, 'nanosecond')>,\n", |
251 | | - " 'equilibration_length_nvt': <Quantity(0.01, 'nanosecond')>,\n", |
| 263 | + " 'simulation_settings': {'equilibration_length': {'unit': 'nanosecond',\n", |
| 264 | + " 'val': 0.01},\n", |
| 265 | + " 'equilibration_length_nvt': {'unit': 'nanosecond',\n", |
| 266 | + " 'val': 0.01},\n", |
252 | 267 | " 'minimization_steps': 5000,\n", |
253 | | - " 'production_length': <Quantity(0.02, 'nanosecond')>},\n", |
254 | | - " 'solvation_settings': {'box_shape': 'cube',\n", |
| 268 | + " 'production_length': {'unit': 'nanosecond',\n", |
| 269 | + " 'val': 0.02}},\n", |
| 270 | + " 'solvation_settings': {'box_shape': 'dodecahedron',\n", |
255 | 271 | " 'box_size': None,\n", |
256 | 272 | " 'box_vectors': None,\n", |
257 | 273 | " 'number_of_solvent_molecules': None,\n", |
258 | 274 | " 'solvent_model': 'tip3p',\n", |
259 | | - " 'solvent_padding': <Quantity(1.2, 'nanometer')>},\n", |
| 275 | + " 'solvent_padding': {'unit': 'nanometer', 'val': 1.0}},\n", |
260 | 276 | " 'thermo_settings': {'ph': None,\n", |
261 | | - " 'pressure': <Quantity(0.986923267, 'standard_atmosphere')>,\n", |
| 277 | + " 'pressure': {'unit': 'bar', 'val': 1},\n", |
262 | 278 | " 'redox_potential': None,\n", |
263 | | - " 'temperature': <Quantity(298.15, 'kelvin')>}}\n" |
| 279 | + " 'temperature': {'unit': 'kelvin', 'val': 298.15}}}\n" |
| 280 | + ] |
| 281 | + }, |
| 282 | + { |
| 283 | + "name": "stderr", |
| 284 | + "output_type": "stream", |
| 285 | + "text": [ |
| 286 | + "/home/ialibay/software/mambaforge/install/envs/openfe/lib/python3.12/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", |
| 287 | + " pprint.pprint(self.dict())\n" |
264 | 288 | ] |
265 | 289 | } |
266 | 290 | ], |
|
282 | 306 | }, |
283 | 307 | { |
284 | 308 | "cell_type": "code", |
285 | | - "execution_count": 4, |
| 309 | + "execution_count": 5, |
286 | 310 | "id": "3b0f5a26-b23b-4ab2-9f1e-293d98ed5bcd", |
287 | 311 | "metadata": {}, |
288 | 312 | "outputs": [], |
|
303 | 327 | }, |
304 | 328 | { |
305 | 329 | "cell_type": "code", |
306 | | - "execution_count": 5, |
| 330 | + "execution_count": 6, |
307 | 331 | "id": "987cceda-1253-417b-8cca-bc750ac0aa1e", |
308 | 332 | "metadata": {}, |
309 | 333 | "outputs": [], |
|
342 | 366 | }, |
343 | 367 | { |
344 | 368 | "cell_type": "code", |
345 | | - "execution_count": 6, |
| 369 | + "execution_count": 7, |
346 | 370 | "id": "7689c7ba-39a2-49ea-b82b-e3b198354c5b", |
347 | 371 | "metadata": {}, |
348 | 372 | "outputs": [], |
|
353 | 377 | "md_dir.mkdir(exist_ok=True)\n", |
354 | 378 | "\n", |
355 | 379 | "# then we write out the transformation\n", |
356 | | - "nontransformation.dump(md_dir / f\"{nontransformation.name}.json\")" |
| 380 | + "nontransformation.to_json(md_dir / f\"{nontransformation.name}.json\")" |
357 | 381 | ] |
358 | 382 | }, |
359 | 383 | { |
|
381 | 405 | }, |
382 | 406 | { |
383 | 407 | "cell_type": "code", |
384 | | - "execution_count": 7, |
| 408 | + "execution_count": 8, |
385 | 409 | "id": "544d037d-3a53-4390-91b8-3104c00694f0", |
386 | 410 | "metadata": { |
387 | 411 | "editable": true, |
|
395 | 419 | "name": "stderr", |
396 | 420 | "output_type": "stream", |
397 | 421 | "text": [ |
398 | | - "/Users/hannahbaumann/miniforge3/envs/openfe_dev/lib/python3.12/site-packages/openfe/protocols/openmm_utils/omm_compute.py:76: UserWarning: Non-CUDA platform selected: CPU, this may significantly impact simulation performance\n", |
| 422 | + "INFO:openfe.utils.system_probe.log:SYSTEM CONFIG DETAILS:\n", |
| 423 | + "INFO:openfe.utils.system_probe.log.hostname:hostname: 'sith'\n", |
| 424 | + "INFO:openfe.utils.system_probe.log.gpu:CUDA-based GPU not found\n", |
| 425 | + "INFO:openfe.utils.system_probe.log:Memory used: 7.3G (25.9%)\n", |
| 426 | + "INFO:openfe.utils.system_probe.log:scratch_PlainMDProtocolUnit-6b85013e6cb94120baf447540650643b_attempt_0: 82% full (53.4G free)\n", |
| 427 | + "INFO:gufekey.openfe.protocols.openmm_md.plain_md_methods.PlainMDProtocolUnit:Creating system\n", |
| 428 | + "INFO:openmmforcefields.generators.template_generators:Requested to generate parameters for residue <Residue 0 (UNK) of chain 0>\n", |
| 429 | + "INFO:openmmforcefields.generators.template_generators:Generating a residue template for [H][c]1[c]([H])[c]([H])[c]([H])[c]([H])[c]1[H] using openff-2.2.1\n", |
| 430 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 0\n", |
| 431 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 1\n", |
| 432 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 2\n", |
| 433 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 3\n", |
| 434 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 4\n", |
| 435 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 5\n", |
| 436 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 6\n", |
| 437 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 7\n", |
| 438 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 8\n", |
| 439 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 9\n", |
| 440 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 10\n", |
| 441 | + "INFO:openff.interchange.smirnoff._nonbonded:Preset charges applied to atom index 11\n", |
| 442 | + "/home/ialibay/github/openfe/openfe/protocols/openmm_utils/omm_compute.py:76: UserWarning: Non-CUDA platform selected: CPU, this may significantly impact simulation performance\n", |
399 | 443 | " warnings.warn(wmsg)\n", |
400 | | - "WARNING:root:Non-CUDA platform selected: CPU, this may significantly impact simulation performance\n" |
| 444 | + "WARNING:root:Non-CUDA platform selected: CPU, this may significantly impact simulation performance\n", |
| 445 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:minimizing systems\n", |
| 446 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:Running NVT equilibration\n", |
| 447 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:Completed NVT equilibration in 93.03289294242859 seconds\n", |
| 448 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:Running NPT equilibration\n", |
| 449 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:Completed NPT equilibration in 105.741370677948 seconds\n", |
| 450 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:running production phase\n", |
| 451 | + "INFO:openfe.protocols.openmm_md.plain_md_methods:Completed simulation in 216.3571000099182 seconds\n" |
401 | 452 | ] |
402 | 453 | } |
403 | 454 | ], |
|
430 | 481 | }, |
431 | 482 | { |
432 | 483 | "cell_type": "code", |
433 | | - "execution_count": 9, |
| 484 | + "execution_count": 10, |
434 | 485 | "id": "16fbf816-8d3d-4121-ab0e-5cd7741788d6", |
435 | 486 | "metadata": {}, |
436 | 487 | "outputs": [ |
437 | 488 | { |
438 | 489 | "name": "stdout", |
439 | 490 | "output_type": "stream", |
440 | 491 | "text": [ |
441 | | - "checkpoint.chk equil_npt.pdb minimized.pdb simulation.xtc\n", |
442 | | - "db.json equil_nvt.pdb simulation.log system.pdb\n" |
| 492 | + "checkpoint.chk\tequil_npt.pdb minimized.pdb simulation.xtc\n", |
| 493 | + "db.json\t\tequil_nvt.pdb simulation.log system.pdb\n" |
| 494 | + ] |
| 495 | + }, |
| 496 | + { |
| 497 | + "name": "stderr", |
| 498 | + "output_type": "stream", |
| 499 | + "text": [ |
| 500 | + "/home/ialibay/software/mambaforge/install/envs/openfe/lib/python3.12/pty.py:95: DeprecationWarning: This process (pid=257465) is multi-threaded, use of forkpty() may lead to deadlocks in the child.\n", |
| 501 | + " pid, fd = os.forkpty()\n" |
443 | 502 | ] |
444 | 503 | } |
445 | 504 | ], |
446 | 505 | "source": [ |
447 | | - "!ls shared_PlainMDProtocolUnit-256e9093d8f3443b9949b95e7ddbb64e_attempt_0/" |
| 506 | + "!ls shared_PlainMDProtocolUnit-6b85013e6cb94120baf447540650643b_attempt_0/" |
448 | 507 | ] |
449 | 508 | }, |
450 | 509 | { |
|
473 | 532 | "name": "python", |
474 | 533 | "nbconvert_exporter": "python", |
475 | 534 | "pygments_lexer": "ipython3", |
476 | | - "version": "3.12.8" |
| 535 | + "version": "3.12.11" |
477 | 536 | }, |
478 | 537 | "widgets": { |
479 | 538 | "application/vnd.jupyter.widget-state+json": { |
|
0 commit comments