Running molecular dynamics simulations using NAMD

Overview
Creative Commons License: CC-BY Questions:
  • How do I use the NAMD engine in Galaxy?

  • What is the correct procedure for performing a simple molecular dynamics simulation of a protein?

Objectives:
  • Learn about the NAMD engine provided in BRIDGE

Requirements:
Time estimation: 3 hours
Level: Intermediate Intermediate
Supporting Materials:
Published: Jun 3, 2019
Last modification: Nov 3, 2023
License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License. The GTN Framework is licensed under MIT
purl PURL: https://gxy.io/GTN:T00052
version Revision: 22

In this tutorial we will perform a simulation with the popular NAMD molecular dynamics software. Please note NAMD tools are not currently available on a public Galaxy server due to licensing issues. If you are interested in following this tutorial, you will need to download the BRIDGE docker container and download NAMD yourself.

Agenda

In this tutorial, we will cover:

  1. System preparation with CHARMM
    1. Setup
  2. MD simulations with NAMD
  3. Workflows
  4. Conclusion

This tutorial is made up of two parts. In the first section, we will look at preparation of a system (solvation, charge neutralisation, energy minimisation) using CHARMM. In the second section, we will perform an equilibration and production simulation, using NAMD. If you already completed the Setting up molecular systems tutorial, which covers the use of the CHARMM graphical user interface (GUI), you have already prepared your system, so go straight to the second section, using the files you prepared earlier.

The process can be accomplished by selecting each tool from the tools menu, or by importing the workflow. The workflow method is most efficient and the individual tools used in the workflows are discussed below. The entire workflow (preparation + simulation) is shown below for CHARMM and NAMD.

See Statistical Mechanics, McQuarrie for more in depth theory ISBN:9781891389153

System preparation with CHARMM

If you already prepared your system using the CHARMM-GUI, and saved the output files, you can skip this section.

Setup

Initially, we need to prepare a protein-ligand system in CHARMM.

This tool will:

  • solvate the protein-ligand complex, using the TIP3P water model
  • neutralise the system, using 0.05M NaCl
  • conduct a short energy minimisation
Hands-on: Data upload
  1. Create a new history for this tutorial.

    Click the new-history icon at the top of the history panel:

    UI for creating new history

  2. Import the files from the Zenodo link provided.
    https://zenodo.org/record/3234841/files/cbh1test.crd
    https://zenodo.org/record/3234841/files/cbh1test.psf
    
    • Copy the link location
    • Click galaxy-upload Upload Data at the top of the tool panel

    • Select galaxy-wf-edit Paste/Fetch Data
    • Paste the link(s) into the text field

    • Press Start

    • Close the window

    As an alternative to uploading the data from a URL or your computer, the files may also have been made available from a shared data library:

    1. Go into Shared data (top panel) then Data libraries
    2. Navigate to the correct folder as indicated by your instructor.
      • On most Galaxies tutorial data will be provided in a folder named GTN - Material –> Topic Name -> Tutorial Name.
    3. Select the desired files
    4. Click on Add to History galaxy-dropdown near the top and select as Datasets from the dropdown menu
    5. In the pop-up window, choose

      • “Select history”: the history you want to import the data to (or create a new one)
    6. Click on Import

  3. Rename the datasets.

    • Click on the galaxy-pencil pencil icon for the dataset to edit its attributes
    • In the central panel, change the Name field
    • Click the Save button

  4. Check that the datatype is correct. The crd file should have the CRD datatype and the psf file the PSF datatype.

    • Click on the galaxy-pencil pencil icon for the dataset to edit its attributes
    • In the central panel, click galaxy-chart-select-data Datatypes tab on the top
    • In the galaxy-chart-select-data Assign Datatype, select datatypes from “New type” dropdown
      • Tip: you can start typing the datatype into the field to filter the dropdown menu
    • Click the Save button

Hands-on: initial processing

Run System Setup tool with the following parameters:

  • param-file “psf input”: Protein structure file of the protein-ligand system. (Input dataset)
  • param-file “crd input”: Coordinate file of the protein-ligand system. (Input dataset)
  • “Buffer”: Edge to edge distance between the protein and the edge of the water box in angstroms
  • “Custom topology and parameter files for ligands” (optional)

Energy minimisation

The setup provides us with the CRD and PSF files needed to perform a simulation. In addition, we have a PRM file which defines the parameters of the unit cell. Now, we need to perform energy minimisation. This relaxes the system, removing any steric clashes or unusual geometry which could artificially raise the energy.

This tools will:

  • Minimise energy using a steepest descent algorithm followed by Adopted Newton Raphson (using the defined number of steps)
  • Set up periodic boundaries and generate Particle Mesh Ewald (PME)
  • generate reference structures for restraints in NAMD (if selected)
Hands-on: energy minimization

Run Energy Minimizer tool with the following parameters:

  • param-file “system_setup_crd”: Coordinate file generated by the setup tool. (Input dataset)
  • param-file “system_setup_psf”: Protein structure file generated by the setup tool. (Input dataset)
  • param-file “waterbox parameters input”: Water box parameter file generated by the setup tool. (Input dataset)
  • “Minimization steps”: 1000
  • “Create reference structures for RMSD restraints for NAMD?”: No
  • “Custom topology and parameter files for ligands”: No

MD simulations with NAMD

At this point we are ready to run the simulation, which uses NAMD as a molecular dynamics engine. An NVT simulation is followed by an NPT simulation.

NVT

Classical NVT dynamics, maintaining constant number of particles, volume and temperature.

This tool runs classical molecular dynamics simulations in NAMD using an NVT ensemble. User can run the simulation in small time intervals. The coordinates, velocities and the extended system files can be use to restart the simulations. If required, harmonic restraints can be used to maintain the protein shape. These restraints, in particular RMSD harmonic restraints can be added with the NAMD collective variable module.

Hands-on: NVT dynamics
  1. NAMD MD Simulator (NVT) tool with the following parameters:
    • param-file “xplor psf input”: PSF file from CHARMM preparation (Input dataset)
    • param-file “pdb input”: PDB file from CHARMM preparation (Input dataset)
    • param-file “PME grid specs”: Generated by the setup tool (Input dataset)
    • param-file “waterbox prm input”: Water box parameter file generated by the setup tool. (Input dataset)
    • “Temperature (K)”: 300
    • “Are you restarting a simulation?”: No
    • “Use Harmonic restraints simulation?”: No
    • “Custom parameter file for ligands”: No
    • “DCD Frequency (ps)”: 1 (Frequency to record frames in the DCD trajectory)
    • “Simulation Time (ps)”: 10
    • “Number of processors”: 4

NPT

Classical NPT dynamics, maintaining constant number of particles, pressure and temperature.

This tool runs classical molecular dynamics simulations in NAMD using an NPT ensemble. User can run the simulation in small time intervals. The coordinates, velocities and the extended system files can be use to restart the simulations. Harmonic restraints can be used. NAMD collective variable module is used to give RMSD harmonic restraints.

Hands-on: NPT dynamics
  1. NAMD MD Simulator (NPT) tool with the following parameters:
    • param-file “xplor psf input”: PSF file from CHARMM preparation (Input dataset)
    • param-file “pdb input”: PDB file from CHARMM preparation (Input dataset)
    • param-file “PME grid specs”: Generated by the setup tool (Input dataset)
    • param-file “waterbox prm input”: Water box parameter file generated by the setup tool. (Input dataset)
    • “Temperature (K)”: 300
    • “Pressure (bar)”: 1.01325
    • “Are you restarting a simulation?”: Yes
    • “Coordinates from the previous simulation”: from the NVT simulation
    • “Velocities from the previous simulation”: from the NVT simulation
    • “Extended system of the previous simulation”: from the NVT simulation
    • “Use Harmonic restraints simulation?”: No
    • “Custom parameter file for ligands”: No
    • “DCD Frequency (ps)”: 1 (Frequency to record frames in the DCD trajectory)
    • “Simulation Time (ps)”: 15
    • “Number of processors”: 4

Workflows

Both the CHARMM preparatory workflow and the NAMD simulation workflow are available as an alternative to executing individual tools.

Snapshot of CHARMM and NAMD analysis workflow. Open image in new tab

Figure 1: A simple simulation workflow starting with CHARMM for setup and NAMD to continue the production simulation
Snapshot of NAMD analysis workflow. Open image in new tab

Figure 2: A simple NAMD simulation workflow

Conclusion

After completing the steps, or running the workflow, we have successfully produced a trajectory (the xtc file) which describes the atomic motion of the system. This can be viewed using molecular visualization software or analysed further; please visit the visualization and analysis tutorials for more information.