How to do MDs

From ChengLab
Revision as of 01:26, 10 March 2020 by Kevin (talk | contribs)
Jump to: navigation, search

Gromacs

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 triclinic -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.pdb -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.
  3. You can consider using -d 1.2 if you are confident that your system does not extend its dimension a lot.

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.

gmx mdrun -pin on -ntmpi 1 -ntomp 12 -v -deffnm 

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.

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 -pbc mol (-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. Try "-pbc nojump" if "mol" does not work
  3. "-pbc nojump" is good for dimer; "-pbc mol" is good for multimer
  4.  !!!Never use "-center" with "-pbc mol"!!!

Split

echo 0 | gmx trjconv -f ed.trr -s ../ed.tpr -split 20
for ii in $(seq 0 10); do
   jj=$(($ii + 1))
   echo 0 | gmx trjconv -f trajout$ii.xtc -s ../ed.tpr -skip 20 -o $jj.gro
done
rm -f trajout$ii.xtc \#*

Anton

Alt 1:

Load dtr in vmd

pbc unwrap -all
animate write trr
gmx trjcat -o xtc
gmx trjconv -pbc nojump -o unwrap.xtc

Alt 2:

Load dtr in vmd

animate write trr

Load trr in vmd

pbc unwrap -all
animate write trr
gmx trjcat -o unwrap.xtc

Alt 3:

Load dtr in vmd

animate write trr
gmx trjcat -f *.trr -o xtc -cat
gmx trjconv -f xtc -o xtc -timestep 120
gmx trjconv -s tpr -pbc res -center -o unwrap.xtc