Hello! This is an updated guide to running MD simulations, with more detail and links specific to COVID-19.
BEFORE STARTING: You will need to run CHARMM-GUI to get your starter files, and you'll need to install GROMACS to your account on Bridges (use 2020.4).
Additionally, this process requires a beginner-level understanding of the Linux command-line interface. I recommend pages 1-5 of Ubuntu's tutorial as a starting point. Remember, however, that you will be using SSH. SSH allows you to operate in another computer's command line remotely. In our case, that computer is Bridges-2.
Signing into Bridges-2
Open your SSH client. If you are on Mac or Linux (most distributions, including Debian and Ubuntu), open Terminal. If you are on Windows, open Command Prompt or PowerShell.
Enter ssh username@bridges2.psc.edu into your terminal, replacing username with your XSEDE credential.
Enter your XSEDE password when prompted.
Transferring files
You'll need to use SFTP to transfer files to Bridges-2. To log onto Bridges-2, type sftp yourusernamehere@bridges2.psc.edu. Then, you can use the same basic commands as above, as well as lcd pathhere to change directories on your local computer, put filenamehere to upload a file to Bridges-2, and get filenamehere to download a file from Bridges-2.
Decompressing files
Once you've used SFTP to transfer your compressed files, be sure to move them where you want. Then, in that directory, use tar -xvf filenamehere (while logged on with ssh) to decompress them. You can rename the folder they're expanded to using the move command — just use mv old-name new-name to do it.
Moving GROMACS files
You'll need to move the CHARMM-GUI files generated specifically for GROMACS out of their special folder and into the main one. To do this, navigate into the GROMACS folder within your decompressed files with cd. Then, navigate into the toppar folder within.
Copy the files out of this folder and into the correct one by using cp ./* ~/path-to-decompressed-folder-here/toppar
Move up a directory using cd ../ and, from there, copy the files out of the GROMACS folder up using mv ./* ../
Move back up to the CHARMM-GUI folder.
Alternatively, you can decompress the CHARMM-GUI files on your local system, move them as needed, and retar them. If you're on Mac, you can decompress by double-clicking on the compressed file. To recompress, use the command line to navigate to your Downloads, then use tar -zcvf new-compressed-file-name.tar.gz decompressed-directory-name to recompress the files.
Getting .slu files
Though you can sftp the .slu files from your computer to Bridges, that can be a hassle. Instead, I find it easier to create them directly on Bridges. To do this, go to the decompressed directory and run nano.
Copy and paste the text from minimization.slu from the Drive directly into your nano file. You can find that and other new, Bridges-2 script files here. If you have not updated your scripts since Spring 2021, please download new copies.
The files may need to be edited. You can use your arrow keys to move around and edit the text. Make sure you change the source path to include your username. If necessary, edit the run time (after #SBATCH -t) to a reasonable number; for a large production run, it may be as high as 48 hours. You should also edit the job name (after #SBATCH -J) to something that makes sense to you.
Press ctrl + o and enter your preferred filename with the .slu extension – minimization.slu will work fine.
Press ctrl + x to leave nano.
Repeat this process for any .slu files you need.
Editing production parameters
Note: If you are completing training, you should skip this section.
Run nano step5_production.mdp from your working directory.
Starting on the third line, edit the following numbers:
nsteps = 50000000
nstxtcout = 500000
nstvout = 500000
nstfout = 500000
nstcalcenergy = 100000
nstenergy = 100000
nstlog = 100000
Press ctrl + o, then press enter to save.
Press ctrl + x to leave nano.
Running GROMACS
Start with sbatch minimization.slu to run that job.
To view the log, run nano _minimization.out (there is an underscore before the word).
You'll need to run the other necessary jobs. For simulations related to COVID-19, these are (in order) minimization.slu, equilibration.slu, and production.slu, all available here. Be sure to check the logs for failures before moving on, and adjust the scripts as necessary. You can always ask Alec or Dr. Norimatsu for help with these.
You will also need to complete a conversion job once you've finished production. Use the commands in conversion.txt in the Scripts folder and select the options specified.
Examining results
If you use my scripts and they work as intended (this may take some time to achieve), you should have a folder very full of files. Download step5_production.gro and step6.1_final.xtc. These files could be named differently if you used different scripts to get here; be sure you get the most recent .gro and .xtc files.
Use PyMOL to open the .gro file you downloaded. Then, in the same window, use File > Open to open the .xtc file.
In the lower right corner of the PyMOL window, there should be a play button, along with stop and frame-by-frame arrow keys. Press play, and a video of the production run should play.
Final notes
At this point, the steps of generating the MD simulation are essentially over. You may need to repeat or modify the steps above to produce the result you need, but this should provide a rough template for how to get successful production runs for our purposes.
A lot of these instructions depend on using Mac or Linux. If you have a Windows system, a lot of the things you do locally may need to be changed, though the things you're doing on Bridges-2's filesystem will be the same. Be sure to get familiar with the Windows filesystem architecture (C:/ instead of /, C:/Users/yourusername/Downloads instead of ~/Downloads, etc.). You can use SSH and SFTP from Command Prompt, and installing third-party software is not required.