Gromacs is used for molecular dynamics simulation. We use the system built by CHARMM-GUI and run equilibration and production runs with Gromacs.
Before you run any simulation, you should transfer simulation files to Bridges (see bottom).
Here is a vid2emeo that shows how to run MD simulation using Gromacs on Bridges.
Load Gromacs on local computer:
Description coming soon.
Load Gromacsi on super computer:
module load cuda/9.2 gcc/7.3.0
source /home/jcai7/Library/gromacs/versions/2018.3/cuda-9.2/gcc-7.3.0/threads/bare/bin/GMXRC
To run molecular dynamic simulation on Bridges using Gromacs: (To install Gromacs on Bridges see bottom or go HERE)
1. Open a terminal and log in to bridges (jcai07 is Xsede username):
ssh -l jcai07 bridges.psc.xsede.org -p 2222
2. Transfer file to Bridges, in the charmm-gui tar file floder open a terminal (jcai7 is psc username):
sftp jcai7@data.bridges.psc.edu
put 3emlCharmm-gui.tgz
3. Move charmm-gui tar file to $SCRATCH and unpack it.
mv 3emlCharmm-gui.tgz $SCRATCH
cd $SCRATCH
tar zxvf 3emlCharmm-gui.tgz
4. Rename unpacked file.
mv 3emlCharmm-gui-15someNumber 3emlMdAug15
5. Prepare files.
cd 3emlMdAug15/gromacs
cp /home/jcai7/mdFile/step6.1_equilibration.mdp /home/jcai7/mdFile/step6.2_equilibration.mdp /home/jcai7/mdFile/step7_production.mdp /home/jcai7/mdFile/README /home/jcai7/mdFile/equi.slu /home/jcai7/mdFile/gromacs.slu $PWD
6. Run equilibration once (it takes about an hours).
sbatch equi.slu
cd ../..
mkdir 3emlMdProAug15 (create a new folder to run production run)
cp -avr 3emlMdAug15/gromacs 3emlMdProAug15 (copy the product from the equilibration run into your new production run folder).
Check job status:
squeue -u jcai7
7. Run production run multiple times using the product from the equilibration run.
cd 3emlMdProAug15/gromacs
sbatch gromacs.slu
After the production run, there is md.part0001.xtc file, which is the trajectory file. Due to the atoms crossing the periodic boundaries, there are lines in the protein in the trajectory file. To fix it, run:
module load cuda/9.2 gcc/7.3.0
source /home/jcai7/Library/gromacs/versions/2018.3/cuda-9.2/gcc-7.3.0/threads/bare/bin/GMXRC
gmx trjconv -f md.part0001.xtc -s step7_production.tpr -o pbc.xtc -pbc mol -ur compact -center
Choose 1 (protein) to group to the center for the first ask, choose 0 (the system) for output for the second ask.
gmx trjconv -f pbc.xtc -s step7_production.tpr -o processed.xtc -fit rot+trans
Choose the same options as the last step.
The first command would center the protein in the box and the last would remove translation and rotation making it easier to visualize.
Copy output files of molecular dynamic simulation to home directory, so that you can transfer output files to local computer (see bottom).
cp processed.xtc step6.6_equilibration.gro step7_production.tpr /home/jcai7/mdAnalysis
Directory and files map:
home directory
/home/jcai7/Library/gromacs/versions/2018.3/
/home/jcai7/Library/quetoos/bin/qusb_dependents.py
/home/jcai7/mdFile/
/home/jcai7/saFile/
/home/jcai7/mdAnalysis/
/home/jcai7/saAnalysis/
Download gromacs-2018.3.tar.gz
Put the file in your home directory using sftp.
tar -xvf gromacs-2018.3.tar.gz
cd gromacs-2018.3
module load cmake/3.11.4
module load cuda/9.2
module load gcc/7.3.0
PREFIX=$HOME/Library/gromacs/versions/2018.3/cuda-9.2/gcc-7.3.0/threads/bare
cmake -DCMAKE_INSTALL_PREFIX=$PREFIX
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
-DGMX_PREFER_STATIC_LIBS=ON
-DBUILD_SHARED_LIBS=off -DGMX_BUILD_OWN_FFTW=ON
make -j 8
make install
#To use this version of Gromacs, execute the following:
module purge
module load cuda/9.2 gcc/7.3.0
source /home/(username)/Library/gromacs/versions/2018.3/cuda-9.2/gcc-7.3.0/threads
/bare/bin/GMXRC
Download gromacs-2019.4.tar.gz
Put the file in your home directory using sftp.
tar -xvf gromacs-2019.4.tar.gz
cd gromacs-2019.4
module load fftw3/3.3.4
module load cmake/3.11.4
module load cuda/9.2
module load gcc/7.3.0
cmake -DCMAKE_INSTALL_PREFIX=$HOME/Library/gromacs/versions/2019.4/cuda-9.2/gcc-7.3.0/threads/bare -DCMAKE_PREFIX_PATH=$FFTW3 -DCMAKE_C_COMPILER=gcc -DGMX_GPU=ON
make -j 8
make install
#To use this version of Gromacs, execute the following:
module purge
module load cuda/9.2 gcc/7.3.0
source /home/(username)/Library/gromacs/versions/2019.4/cuda-9.2/gcc-7.3.0/threads
/bare/bin/GMXRC
SFTP gcc-8.4.0.tar.gz and gcc.slu to your home directory on Bridges-2.
You can check your home directory by going there (cd $HOME) and checking the output of 'pwd' command.
sbatch gcc.slu
This will create gcc-8.4.0 and and g++-8.4.0 (at $HOME/opt/gcc-8.4.0/bin/), and may take 40-60 minutes.
Download gromacs-2020.4.tar.gz
Put gromacs-2020.4.tar.gz and build_gromacs.slu in your home directory (/jet/home/username) using sftp.
sftp username@bridges2.psc.edu
sbatch build_gromacs.slu
In the slu file (build_gromacs), you will find"
module load fftw/3.3.8
module load cuda/11.1.1
cmake -DCMAKE_INSTALL_PREFIX=$HOME/Library/gromacs/versions/2020.4/cuda-11.1/gcc-8.4/threads/ - DCMAKE_PREFIX_PATH=$FFTW -DCMAKE_C_COMPILER=$HOME/opt/gcc-8.4.0/bin/gcc-8.4.0 - DCMAKE_CXX_COMPILER=$HOME/opt/gcc-8.4.0/bin/g++-8.4.0 -DGMX_GPU=ON
make -j 5
make install
#To use this version of Gromacs, execute the following:
module purge
module load cuda/11.1.1
source $HOME/Library/gromacs/versions/2020.4/cuda-11.1/gcc-8.4/threads/bin/GMXRC
To run a simulation using Gromacs on Bridges, we need to prepare simulation files on Bridges. There are two subfolders in bridgesGromacs folder on computer 3. mdSimulation folder contains files for molecular dynamic simulation; saSimulation fodler contains files for simulated annealing simulation.
1. Open terminal and log in to bridges:
ssh -l jcai07 bridges.psc.xsede.org -p 2222
mkdir mdFile
mkdir saFile
mkdir mdAnalysis
mkdir saAnalysis
2. Transfer file to Bridges, inside the mdFile folder open a terminal:
sftp jcai7@data.bridges.psc.edu
cd mdFile
put step6.1_equilibration.mdp
put step6.2_equilibration.mdp
put step7_production.mdp
put equi.slu
put gromacs.slu
3. After transfer molecular dynamic simulation files to Bridges, transfer simulated annealing file to Bridges, inside the saFile folder open a terminal:
cd .. (go back to /home/jcai7 folder on Bridges)
cd saFile
sftp jcai7@data.bridges.psc.edu
put step6.1_equilibration.mdp
put step6.2_equilibration.mdp
put step7_production.mdp
put equi.slu
put gromacs.slu
1. Transfer files from Bridges to a local computer, open a terminal:
sftp jcai7@data.bridges.psc.edu
cd mdAnalysis
get processed.xtc
get step6.6_equilibration.gro
get step7_production.tpr