In this tutorial, we will perform energy minimization and equilibration of a simple protein using NAMD [1] & VMD [2]. We are using insulin (PDB ID: 2wfu) for this tutorial.
Energy minimization is a process of searching for an energy landscape of the molecule to find a conformation of the molecule in which it is relaxed. The equilibration involves molecular dynamics whereby Newton’s Second Law is solved for each atom in the system to find its trajectory. Equilibration is judged by how well velocities, pressure, etc. are distributed in the system over a given amount of time.
Files required
- A PDB file of the protein (here, 2wfu).
- A protein structure file (psf) containing all structural information of the protein.
- A forcefield parameter and topology files. It can be from AMBER, CHARMM, GROMACS, and X-PLOR. We are using CHARMM forcefield in this tutorial.
- A configuration file containing all options defined by the user required to run a simulation.
Let’s start our minimization and equilibration using NAMD.
First, create a new directory namely, “namd”. We will save all our files inside this directory only.
- Download the topology file from here.
- Download a CHARMM forcefield from here. I am using the c32b1 release. You can use the latest one (c36).
- Remember the topology file is for generating a PSf file only and the parameter file is for minimization and equilibration.
1. Downloading PDB file of protein
Here, we are simulating insulin. Let’s download it from PDB (www.rcsb.org) and save it in the namd directory.
2. Preparing protein file
In this tutorial, we are simulating only chain A of the protein. Therefore, remove other chains from the PDB file and save it.
3. Generating a PSF file of protein
- Open VMD by typing
$ vmd
in a terminal. - In the main VMD window, go to File –> New Molecule. Molecule File Browser window will open.
- Browse for the 2wfu.pdb –> Click OK –> Click Load.
3.1. Creating protein file without Hydrogens
To generate a PSF file, we need the protein without hydrogens. Let’s create a new PDB file without hydrogens. To do this,
- In the main VMD window, go to Extensions –> Tk Console. A new console window will appear.
- Type the following commands in the console:
% set ins [atomselect top protein]
% $ins writepdb insp.pdb
- It will create a new file, namely, insp.pdb.
3.2. Generating PSF file
You can either generate a PSF file automatically using VMD or use the following commands to do the same. I would recommend the latter option because you will know what will happen at each step which will help you to catch errors easily. I personally use the manual method because the automatic builder gives errors at later stages including the file format error such as “FATAL ERROR: ABNORMAL EOF FOUND – buffer=*END*”. However, I will tell you the automatic method as well.
3.2.1. Using Automatic PSF builder
- In the main VMD window, go to Extensions –> Modeling –> Automatic PSF Builder.
- A new window will appear, namely, “AutoPSF” as shown below (Fig. 1):
Fig.1 Automatic PSF Builder in VMD. - Select the molecule insp.pdb in step 1.
- It will show some topology files. Click ‘Load input files’.
- In step 2., You can either select protein or everything or any other option based on your protein. Here, I am selecting ‘everything’.
- Click ‘Guess and split chains using current selection’.
- In step 3., click ‘Create chains’.
- In step 4., click ‘Apply patches and finish PSF/PDB’.
3.2.2. Using manual method
Again, open the Tk console in VMD. Type the following commands one by one.
% package require psfgen
% topology top_all27_prot_lipid.inp
% pdbalias residue HIS HSE
% pdbalias atom ILE CD1 CD
% segment U {pdb insp.pdb}
% coordpdb insp.pdb U
% guesscoord
% writepdb ins.pdb
% writepsf ins.psf
Remember, it will show you some warnings. You can avoid them. Ultimately, it will create two new files: ins.pdb and ins.psf.
Now, we have successfully generated a PSF file for the protein.
4. Solvating the protein
You can either minimize and equilibrate your protein in a water sphere (with non-periodic boundary conditions) in a surrounding vacuum or in a water box with periodic boundary conditions.
- Open the Tk Console again and type the following commands:
% package require solvate
% solvate ins.psf ins.pdb -t 5 -o ins_wb
here, -t defines the water box dimensions. - It will create two new output files: ins_wb.pdb and ins_wb.psf.
Visualize the protein in VMD now.
- Load the ins_wb.psf file in VMD. Go to File –> New Molecule –> Browse –> select ins_wb.psf –> Load.
- Now load ins_wb.pdb file in VMD.
- See if the water box surrounds the protein. If not, try increasing the box size in the above command using -t argument.
Get the x, y, and z coordinates and their maximum and minimum values of the entire protein-water system.
- Type the following commands in the Tk console:
% set everyone [atomselect top all]
% measure minmax $everyone - It will give the minimum and maximum values of x, y, and z coordinates.
- Get the coordinates for the center of the box.
% measure center $everyone
- It will display the coordinates.
5. Minimization & equilibration
We will need a configuration file for this step where we will define our parameters for the simulation run. You can download the configuration file from here.
Open this file in an editor and edit accordingly.
- Replace the structure and coordinates filename with ins.psf and ins.pdb respectively.
- Set the output filename, here, it is ins_wb_eq.
- Write the parameters filename (par_all27_prot_lipid.prm).
- You can change the timestep to 1fs.
- Set the minimization steps accordingly. I did it for 5000 steps only. It’s a short simulation. I guess you will need more time to equilibrate your protein properly.
- Save the file. Here, I am saving it as “box_sim.conf”.
Now finally, run the equilibration by typing the following command in a terminal (Ctrl+Alt+T):
$ /path/to/NAMD/namd3 box_sim.conf > ins_wb_eq.log &
It will take some time to finish and will output some files, out of which ins_wb_eq.dcd will be used for trajectory analysis.
The analysis will be explained in the upcoming article.
References
- Phillips, J. C., Hardy, D. J., Maia, J. D., Stone, J. E., Ribeiro, J. V., Bernardi, R. C., … & Tajkhorshid, E. (2020). Scalable molecular dynamics on CPU and GPU architectures with NAMD. The Journal of chemical physics, 153(4).
- Humphrey, W., Dalke, A., & Schulten, K. (1996). VMD: visual molecular dynamics. Journal of molecular graphics, 14(1), 33-38.