Hi All,
I would like to ask a question regarding running gmx mdrun using a file intial stricture file that contains multiple structures (thousands of them). Usually, when we run simulations, we read an initial structure file (Input.gro) that contains only one structure using “gmx grompp -f XYZ.mdp -o XYZ.tpr -c Input.gro -r Input.gro -p topol.top” and then we perform gmx mdrun. However, in my case Input file contains several frames.
The idea is, when I do mdrun, it will 1) open the first frame, 2) minimze for certain steps, 3) save that minimized frame and then 4) it will open the next frame and do the same until it reach the end frame of the Input file.
I know how to do this in NAMD (part of my configuration file):
DCDfreq 200
set ts 0
coorfile open dcd …/…/…/creating_dcds_small_XY/dcds/dcdsstart_1.dcd
while { ![coorfile read] } {
firstTimestep $ts
minimize 200
}
coorfile close
Could you direct me how to do the same in GROMACS? Since NAMD does not support Amber forcefield I need to know how to do this task in GROMACS.
Alternatively, I can just create independent input files, each containing a single structure frame, and run all of them in parallel. But since I have thousands of these frames, it won’t be practical.
This is easy enough to do. First you can dump the frames in your trajectory using gmx trajconv (see the documentation for usage instructions), then you can write a little script in your language of choice that calls grompp with each of the structures that you have but using the same mdp file. Then for each of these you run mdrun as normal.
However, why do you want to do this? It is rather unlikely that neighboring frames in your simulation have significant structural differences. If you have a long enough trajectory you can do, e.g., clustering to find structures that have differences, which is better than just taking every n-th frame. But even then, the minimization step is probably not going to add much unless you will be modifying the structures in some way.
Please clarify your intent and also note that there is a difference between multiple structures and multiple frames.
Hi Joe,
Thank you so much for your replay. The reason why I want to do this that, the frames are manually generated and they are structurally different. I place a ligand inside a binding pocket of a protein in all possible conformations (I could not use docking since I have to use some special positional restraints on the ligand and there is an important cation-pi interaction between the protein and the ligand). Once I generate these multiple conformations, I would like to select some good representative poses after minimization and post-processing. Hope this clarify your question.
According to your suggestions, I can write a do loop in a bash script and run over multiple .gro files, one at a time, but, this way I have to save separate .gro file for each frame which will be in the order of thousands. Is that correct?
Instead, in grompp, can I call a trajectory file in the -c option?
Please check the documentation of grompp to see the file types supported for different flags. Even in the situation you describe you can benefit from first clustering your different conformations so that you have only a relatively small number of ligand poses for each of the different conformations that you have externally generated. You will need a script of some sort. I might also suggest that you read about how some other projects tackle such problems. Reading a few papers from, for example) the rosetta community could give you a better idea of what are (one example of) standard practices for the problem you are trying to solve.