Skip to content

jeveki/openmm-tutorial-msbs

 
 

Repository files navigation

Introductory OpenMM tutorial

Conditions of use

License: CC BY-NC 4.0 All files in this repository are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Contributions are welcome, see CONTRIBUTING.md for more details.

This tutorial shows how to use and install different software packages, which have their own conditions of use.

Scope

This tutorial was written for the course Molecular Simulations of Biological Systems (MSBS), an introductory elective course for students of the M.Sc. program Biochemistry and Biotechnology at Ghent University. The main goal of the course is to enable these students (who have a limited background in statistical mechanics) to run sensible molecular dynamics simulations and to interpret the results correctly. This tutorial assumes the students have a basic knowledge of Python.

All materials are strongly inspired by several online resources (tutorials, documentation and examples) of the OpenMM, Python, NumPy, Matplotlib and other projects. The main references are:

Even though these resources contain all the background and details to learn OpenMM and related tools, the amount of information is simply overwhelming. The aim of this course is to provide a gentle introduction to many of the topics in the above references.

Installation of OpenMM

Practically all simulations in this tutorial are carried out with OpenMM, which is described extensively here. In short, OpenMM is a modern open-source biomolecular simulation toolkit: it supports many popular biomolecular force fields (AMBER, CHARMM, AMOEBA), it supports GPU-accelerated calculations, and it can carry out many types of advanced molecular dynamics simulations.

To access and customize all these features, and to write reproducible simulation protocols, OpenMM simulations are implemented by writing Python scripts. Hence, to install OpenMM, you need (to create) a Python environment and install OpenMM as a Python package. (The C++ interface is not covered in this tutorial.)

For this tutorial, three environments can be used to perform simulations, each having their strengths and weaknesses:

  • If you have access to the Flemish Supercomputer Center (VSC) (i.e. you are affiliated to a Flemish research institution), it is recommended to run the simulations via an interactive session on the cluster as explained below.
  • For all other users, it is recommended to follow this tutorial by running Jupyter notebooks on your own laptop.
  • For simulations that take longer, section 3 of the tutorial explains how to transfer a notebook from your laptop to an HPC environment (and back) for non-interactive job submissions.

Interactive Jupyter Notebooks on the Vlaams Supercomputer Centrum High-performance cluster

Strengths:

  • Output files are stored on the cluster.
  • Easy visualization in the notebook with nglview.
  • You can work interactively.
  • You have access to significant computational power.

Weaknesses:

  • The installation requires some work.
  • There is a predefined duration of your interactive session.
  • The session ends without warning, which may lose you some progress.
  • You must remain connected during the sessions.
  • This feature is relatively new and may still have some hidden flaws.

Installation instructions: setup_interactive_vsc.md.

(For not affiliated with a Flemish University: setup_interactive_hpc.md.)

Your laptop

Strengths:

  • Calculations require no network.
  • Output files are stored locally.
  • Easy visualization in the notebook with nglview.
  • You can work interactively.

Weaknesses:

  • The installation requires some work.
  • Your laptop could overheat when running longer simulations.
  • Your laptop must remain powered on during calculations.
  • Currently not working on Windows.

Instructions: setup_laptop.md.

Non-interactive job submission on a High-performance cluster (HPC)

Strengths:

  • Calculations run in the background on a remote machine. You can power off your laptop while they run.
  • You have access to more computational power.

Weaknesses:

  • Some Linux knowledge is required.
  • Your calculations do not start instantly. Instead, you submit "jobs" which are executed when a compute-node becomes available.
  • Non-interactive: the entire notebook is executed and you only get to see the results when it has all completed.

Instructions: setup_noninteractive_hpc.md.

Overview of Tutorial Sections

The getting-started instructions showed you how to open a new notebook or to start any notebook from this tutorial. The tutorial consists of the following sections, to be followed more-or-less in order:

1. First steps:

2. Different ways of simulating analine dipeptide:

3. Run demanding OpenMM notebooks as a non-interactive job:

4. A short protein MD simulation:

5. Analysis of MD trajectories:

6. Visualization

7. Ligands (This part is still under development and optional. It does not work natively under Windows, but it should work with the Windows Subsystem for Linux 2.)

Troubleshooting

A list of common problems is compiled here: FAQ.md

About

OpenMM tutorial for the MSBS course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.6%
  • Python 2.6%
  • Shell 0.8%