Molecular dynamics is a fantastic tool to understand the behavior of a chemical system over time. In this blog post, we share an easy recipe for a simulation with OpenMM that involves a part of simulated annealing.
Simulated annealing in the context of molecular dynamics refers to the controlled heating and cooling of the system in order to overcome energetic barriers and find energetically favorable minima much faster. This process can be repeated multiple times over the course of simulation.
In the following we will use T4 Lysozyme as a toy example in our simulation. We want to simulate the annealing with the following temperatures:
starting temerature | 0 K |
normal temperature | 300 K (26.85 °C) |
highest temperature | 315 K |
We use OpenMM Setup to create the system, solvate the protein, and to fix potential errors in our PDB files. It is highly recommended to prepare your system with this tool, as it will avoid potential errors later.
The protein was solvated in a 10 Å water box, hydrogens and neutralizing ions were added:
If you want to reproduce the simulation, you can download the pre-processed PDB file here and the simulation protocol here.
A snippet of the most important part of the simulation is shown below:
... # Phase I print(f'initial heating of system') for temp in np.arange(start_temperature.value_in_unit(kelvin),end_temperature.value_in_unit(kelvin),temperature_step.value_in_unit(kelvin)): if temp % 1 == 0: print(f'current temperature: {temp}') integrator.setTemperature(temp*kelvin) barostat.setDefaultTemperature(temp*kelvin) simulation.step(heating_interval) # Phase II print(f'simulating') simulation.step(steps) # Phase III print(f'heating system to top temperature') for temp in np.arange(end_temperature.value_in_unit(kelvin),top_temperature.value_in_unit(kelvin),top_temperature_step.value_in_unit(kelvin)): print(f'current temperature: {temp}') integrator.setTemperature(temp*kelvin) barostat.setDefaultTemperature(temp*kelvin) simulation.step(heating_interval) # Phase IV print(f'holding top temperature') simulation.step(100000) # Phase V print(f'cooling system to end temperature') for temp in np.arange(top_temperature.value_in_unit(kelvin),end_temperature.value_in_unit(kelvin),-top_temperature_step.value_in_unit(kelvin)): print(f'current temperature: {temp}') integrator.setTemperature(temp*kelvin) barostat.setDefaultTemperature(temp*kelvin) simulation.step(heating_interval) # Phase VI print(f'final equilibration') simulation.step(300000) ...
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.