How to do MDs
Contents
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:
- You can find ions.mdp here.
- Biological systems might require surprisingly large boxes, if you are interested, read this.
Standard MD
A standard MD includes steps as follows:
- Energy minimization
- Annealing
- Pre-equilibrium
- Production run
Here are some standard run scripts.
Things to note:
- In step2-3, position restraints have been added to favor the initial structures (usually crystal)
- 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:
- -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:
- Usually protein for least squares fit and centering
- -pbc nojump is good for dimer
- Try -pbc mol if nojump does not work
Make a movie
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:
- Load everything into VMD, including psf(if any), pdb and the trajectory
- Configure your favorite representations and viewing angles
- File > Save Visualisation State
- Open the vs_render_$name file to make sure the path to files are correct (especially for Windows)
- Put the vs_render_$name file alongside with the coordinate files and change the variable "DCD_DIR=" in the script
- (If necessary) Change the render tool in "render TachyonLOptiXInternal \$outdir1/\$filename.tga"
- (If necessary) Change "display resize 1920 1080"
- Just bash it