How to do MDs

From ChengLab
Revision as of 14:26, 6 December 2018 by Kevin (talk | contribs)
Jump to: navigation, search

Prepare the system

Justin's tutorials are always the good starting points (here), especially the "Lysozyme in water" one (here).

Simple steps to prepare a system, and it usually works! (script can be found here)

# Create a cubic box of 2 nm on each side and place the system to the center and align its principle axes to the reference axes
# -princ usually helps to reduce your system size
gmx editconf -f conf.gro -o editconf.gro -bt cubic -d 2 -c -princ
# Solvate the box
gmx solvate -cp editconf.gro -o solvate.gro -p topol.top
# Add ions to make it neutral and of 0.15 M NaCl
# If you want KCl, add -pname K
gmx grompp -f ions.mdp -c solvate.gro -o ions.tpr -p topol.top
gmx genion -s ions.tpr -o ionized.gro -conc 0.15 -neutral -p topol.top


Things to note:

  1. You can find ions.mdp here.
  2. Biological systems might require surprisingly large boxes, if you are interested, read this.

Standard MD

A standard MD includes steps as follows:

  1. Energy minimization
  2. Annealing
  3. Pre-equilibrium
  4. Production run

Here are some standard run scripts.

Things to note:

  1. In step2-3, position restraints have been added to favor the initial structures (usually crystal)
  2. You may consider release the restraints step-wisely

Trajectory manipulation

Usually you will have multiple trajectories from production runs, you would like to combine them and remove the PBC effects in order to calculate something or make videos.

Gromacs

gmx trjcat -f *.xtc -o xtc -dt 100 -n ndx

Notes:

  1. -settime if you did not continue
gmx trjconv -f pre.trr -o unwrap.xtc -s tpr -n ndx -center -pbc nojump (-dt 100)
gmx trjconv -f unwrap.xtc -o fit.xtc -s tpr -n ndx -fit rot+trans

Notes:

  1. Usually protein for least squares fit and centering
  2. -pbc nojump is good for dimer
  3. Try -pbc mol if nojump does not work

Make a movie

Look at Gromacs trajectories in VMD

VMD cannot read .top file causing problems of wrongly connected bonds. We can solve this by generating PSF and PDB files. Here

VMD

Movies can be made in VMD by rendering every frame of the trajectory using the command

render TachyonLOptiXInternal \$outdir1/\$filename.tga

You can get a list of render tools by typing "render" in VMD console.

job_render.pbs is a script helps you to loop over all the frames (and add frame numbers).

Breakdown of steps are:

  1. Load everything into VMD, including psf(if any), pdb and the trajectory
  2. Configure your favorite representations and viewing angles
  3. File > Save Visualisation State
  4. Open the vs_render_$name.vmd to make sure the path to files are correct (especially for Windows)
  5. Put the vs_render_$name.vmd alongside with the coordinate files and change the variable "DCD_DIR=" in the script
  6. Change the variable "name"
  7. (If necessary) Change the render tool in "render TachyonLOptiXInternal \$outdir1/\$filename.tga"
  8. (If necessary) Change "display resize 1920 1080"
  9. Just bash it