Skip to content
Merged
Changes from all commits
Commits
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
45 changes: 30 additions & 15 deletions openmm_md/plain_md.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"id": "7266db2c-37e5-419a-9015-929ea1635d98",
"metadata": {},
"source": [
"In this notebook we run an MD simulation of benzene bound to T4-lysozyme L99A.",
"![image](assets/t4lyso.png)"
"In this notebook we run an MD simulation of benzene bound to T4-lysozyme L99A.![image](assets/t4lyso.png)"
]
},
{
Expand Down Expand Up @@ -147,7 +146,9 @@
"settings = PlainMDProtocol.default_settings()\n",
"settings.simulation_settings.equilibration_length_nvt = 0.01 * unit.nanosecond # setting the nvt equilibration length to 10 ps\n",
"settings.simulation_settings.equilibration_length = 0.01 * unit.nanosecond # setting the npt equilibration length to 10 ps\n",
"settings.simulation_settings.production_length = 0.01 * unit.nanosecond # setting the npt production length to 10 ps\n",
"# Setting the production length and checkpoint interval to 20 ps to match the trajectory write interval, so one frame will be written\n",
"settings.simulation_settings.production_length = 0.02 * unit.nanosecond # setting the npt production length to 20 ps\n",
"settings.output_settings.checkpoint_interval = 0.02 * unit.nanosecond # setting the checkpoint interval to 20 ps\n",
"settings.engine_settings.compute_platform = 'CPU' # running the simulation on the cpu"
]
},
Expand All @@ -161,7 +162,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{'engine_settings': {'compute_platform': 'CPU'},\n",
"{'engine_settings': {'compute_platform': 'CPU', 'gpu_device_index': None},\n",
" 'forcefield_settings': {'constraints': 'hbonds',\n",
" 'forcefields': ['amber/ff14SB.xml',\n",
" 'amber/tip3p_standard.xml',\n",
Expand All @@ -171,15 +172,15 @@
" 'nonbonded_cutoff': <Quantity(1.0, 'nanometer')>,\n",
" 'nonbonded_method': 'PME',\n",
" 'rigid_water': True,\n",
" 'small_molecule_forcefield': 'openff-2.0.0'},\n",
" 'integrator_settings': {'barostat_frequency': <Quantity(25, 'timestep')>,\n",
" 'small_molecule_forcefield': 'openff-2.1.1'},\n",
" 'integrator_settings': {'barostat_frequency': <Quantity(25.0, 'timestep')>,\n",
" 'constraint_tolerance': 1e-06,\n",
" 'langevin_collision_rate': <Quantity(1.0, '1 / picosecond')>,\n",
" 'n_restart_attempts': 20,\n",
" 'reassign_velocities': False,\n",
" 'remove_com': False,\n",
" 'timestep': <Quantity(4, 'femtosecond')>},\n",
" 'output_settings': {'checkpoint_interval': <Quantity(1, 'picosecond')>,\n",
" 'timestep': <Quantity(4.0, 'femtosecond')>},\n",
" 'output_settings': {'checkpoint_interval': <Quantity(20.0, 'picosecond')>,\n",
" 'checkpoint_storage_filename': 'checkpoint.chk',\n",
" 'equil_npt_structure': 'equil_npt.pdb',\n",
" 'equil_nvt_structure': 'equil_nvt.pdb',\n",
Expand All @@ -189,7 +190,7 @@
" 'output_indices': 'not water',\n",
" 'preminimized_structure': 'system.pdb',\n",
" 'production_trajectory_filename': 'simulation.xtc',\n",
" 'trajectory_write_interval': <Quantity(20, 'picosecond')>},\n",
" 'trajectory_write_interval': <Quantity(20.0, 'picosecond')>},\n",
" 'partial_charge_settings': {'nagl_model': None,\n",
" 'number_of_conformers': None,\n",
" 'off_toolkit_backend': 'ambertools',\n",
Expand All @@ -198,8 +199,12 @@
" 'simulation_settings': {'equilibration_length': <Quantity(0.01, 'nanosecond')>,\n",
" 'equilibration_length_nvt': <Quantity(0.01, 'nanosecond')>,\n",
" 'minimization_steps': 5000,\n",
" 'production_length': <Quantity(0.01, 'nanosecond')>},\n",
" 'solvation_settings': {'solvent_model': 'tip3p',\n",
" 'production_length': <Quantity(0.02, 'nanosecond')>},\n",
" 'solvation_settings': {'box_shape': 'cube',\n",
" 'box_size': None,\n",
" 'box_vectors': None,\n",
" 'number_of_solvent_molecules': None,\n",
" 'solvent_model': 'tip3p',\n",
" 'solvent_padding': <Quantity(1.2, 'nanometer')>},\n",
" 'thermo_settings': {'ph': None,\n",
" 'pressure': <Quantity(0.986923267, 'standard_atmosphere')>,\n",
Expand Down Expand Up @@ -286,7 +291,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"id": "7689c7ba-39a2-49ea-b82b-e3b198354c5b",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -325,7 +330,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "544d037d-3a53-4390-91b8-3104c00694f0",
"metadata": {
"editable": true,
Expand All @@ -334,7 +339,17 @@
},
"tags": []
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/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",
" warnings.warn(wmsg)\n",
"WARNING:root:Non-CUDA platform selected: CPU, this may significantly impact simulation performance\n"
]
}
],
"source": [
"import gufe\n",
"import pathlib\n",
Expand Down Expand Up @@ -407,7 +422,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
"version": "3.12.8"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
Loading