Follow instructions here to set up Gromacs once you have launched an EC2 instance. Make sure to save your instance as an image so you can shut it off after you close the EC2 instance without losing anything.
http://fowlerlab.org/2016/01/13/gromacs-on-aws/
To use the gmx command, make sure to source the binary:
source /home/ec2-user/packages/gromacs-5.0.7/build-gcc48/scripts/GMXRC
If at any point your path gets corrupted, restore the path with:
export PATH=$PATH:/usr/local/sbin
or
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Source a new .bashrc with:source ~/.bashrc
sudo yum update
sudo yum install gcc gcc-c++ openmpi-devel mpich-devel cmake svn texinfo-tex flex zip libgcc.i686 glibc-devel.i686
export PATH=/usr/lib64/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib
[ec2-user@ip-172-30-0-42 ~]$ mkdir ~/packages
[ec2-user@ip-172-30-0-42 ~]$ cd ~/packages
[ec2-user@ip-172-30-0-42 packages]$ wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.0.7.tar.gz
[ec2-user@ip-172-30-0-42 packages]$ tar zxvf gromacs-5.0.7.tar.gz
[ec2-user@ip-172-30-0-42 packages]$ cd gromacs-5.0.7
[ec2-user@ip-172-30-0-42 gromacs-5.0.7]$ mkdir build-gcc48
[ec2-user@ip-172-30-0-42 gromacs-5.0.7]$ cd build-gcc48
[ec2-user@ip-172-30-0-42 build-gcc48]$ cmake .. -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX='/usr/local/gromacs/5.0.7/
If the cmake doesn't work follow the instruction in the INSTALL folder. Follow the rest of the instructions in the INSTALL folder to finish.
GROMACS Tutorials
http://www.mdtutorials.com/gmx/complex/08_MD.htmlCheckpoints
When executing a production md, make sure you use the flag http://www.gromacs.org/Documentation/How-tos/Doing_RestartsStart from a checkpoint using this command:
gmx mdrun -deff md_0_1 -s topol.tpr -cpi md_0_1.cpt
Ligand Preparation
When preparing ligands you need to have the right version of networkX. If you do not, use the command below to switch to version 1.11:
pip install --user networkx==1.11
https://groups.google.com/forum/#!topic/networkx-discuss/Sp_aylvgxjc
To transfer a file to your EC-2 instance:
scp -i /c/Users/Solugen\ Employee/MyKeyPair.pem /c/Users/Solugen\ Employee/1aki.pdb ec2-user@ec2-18-220-134-81.us-east-2.compute.amazonaws.com:~/
To transfer file from EC-2 to your computer:
sudo scp -i MyKeyPair.pem ec2-user@ec2-18-216-95-110.us-east-2.compute.amazonaws.com:~/*.xvg .
To generate ligand:
Use the cgenff_charmm2gmz_py2.py script. Do not use the python version 3 scripts.
For free metal structures, use OPLS-AA/L ff or ideally use CHARMM36. You can prepare a pdb using this link: http://www.charmm-gui.org/?doc=input/pdbreader
To get RMSDS:
https://www.researchgate.net/post/How_to_calculate_the_RMSD_for_a_part_of_a_protein_after_MD_in_gromacs
"All you need to do is run gmx make_ndx on any coordinate or .tpr file and select the region of interest (type "help" for examples, the syntax is quite simple). Then you pass the index file to gmx rms -n and choose the group for output. You don't need to run the simulation again, you just have to analyze it properly."
gmx make_ndx -f yourfile.tpr -o youroutfile.ndx #copy your .tpr to the name topol.tpr
gmx rms -f md_0_1.ndx -o yourRMSDoutfilename.xvg #copy your .xtc to the name traj.xtc
You can pick CA to follow the backbone trajectory.
To get RMSF:
http://manual.gromacs.org/archive/5.0/programs/gmx-rmsf.html
Use the command:
gmx rmsf -n filename.ndx -res -oq -f traj.xtc -o rmsf_outpufilename.xvg -od rmsd_outputfilename.xvg
This command will generate two .xvg files with values of RMSF or RMSD and a pdb file with b-factors calculated from the simulation. You can show areas of the structure in Pymol with high b-factor using the following two commands:
https://pymolwiki.org/index.php/Advanced_Coloring#Assign_color_by_B-factor
cartoon putty, bfac #Changes width of tube to match bfactor
spectrum b, blue_white_red, minimum=20, maximum=50 #colors high bfactor segment red, low bfactor segment blue
Plotting data saved as .xvg files:
Download GNUplot
If your job timesout run in the background:sudo scp -i MyKeyPair.pem ec2-user@ec2-18-216-95-110.us-east-2.compute.amazonaws.com:~/*.xvg .
To generate ligand:
Use the cgenff_charmm2gmz_py2.py script. Do not use the python version 3 scripts.
For free metal structures, use OPLS-AA/L ff or ideally use CHARMM36. You can prepare a pdb using this link: http://www.charmm-gui.org/?doc=input/pdbreader
To get RMSDS:
https://www.researchgate.net/post/How_to_calculate_the_RMSD_for_a_part_of_a_protein_after_MD_in_gromacs
"All you need to do is run gmx make_ndx on any coordinate or .tpr file and select the region of interest (type "help" for examples, the syntax is quite simple). Then you pass the index file to gmx rms -n and choose the group for output. You don't need to run the simulation again, you just have to analyze it properly."
gmx make_ndx -f yourfile.tpr -o youroutfile.ndx #copy your .tpr to the name topol.tpr
gmx rms -f md_0_1.ndx -o yourRMSDoutfilename.xvg #copy your .xtc to the name traj.xtc
You can pick CA to follow the backbone trajectory.
To get RMSF:
http://manual.gromacs.org/archive/5.0/programs/gmx-rmsf.html
Use the command:
gmx rmsf -n filename.ndx -res -oq -f traj.xtc -o rmsf_outpufilename.xvg -od rmsd_outputfilename.xvg
This command will generate two .xvg files with values of RMSF or RMSD and a pdb file with b-factors calculated from the simulation. You can show areas of the structure in Pymol with high b-factor using the following two commands:
https://pymolwiki.org/index.php/Advanced_Coloring#Assign_color_by_B-factor
cartoon putty, bfac #Changes width of tube to match bfactor
spectrum b, blue_white_red, minimum=20, maximum=50 #colors high bfactor segment red, low bfactor segment blue
Plotting data saved as .xvg files:
Download GNUplot
set datafile commentschars "#@&"
plot "my_filename.xvg" u 1:2 w lines
- run the command "tmux"
- in the new shell that pops up, execute the job
- detach from the tmux shell by using the shortcut (Ctrl+b then d)
- if the ssh connection resets, ssh to the instance again and run "tmux attach"
- the job should have kept on running and you can resume where you left off
Visualize with VMD
- Open VMD
- Load .gro file to load structure
- Load trajectory file (.xtc) to load MD data
- In representations, change selection to protein and representation to cartoon
- Press play to see movement
Expanding the volume
1. Create a new volume2. Attach it to your existing EC2 instance (you may want to put it in a volume under /data)
3. Make sure it is attached permanently so you can log in and out without losing the connection
/dev/nvme1n1: UUID="32bd1592-7f44-4b79-bca3-bd9c55c9233d" TYPE="xfs"
No comments:
Post a Comment