For generating a tpr file, you need a topology file (.top), a coordinate file (.gro/.pdb) and a input parameter file (.mdp).
Assuming, you are working with amber forcefield (a99ffSBdisp), Here's how I do it.
gmx pdb2gmx -ff a99SBdisp -f yourpdbfile.pdb -o water_1.gro -ignh -p topol.top
gmx grompp -f water.mdp -c water_1.gro -p topol.top -o water.tpr -maxwarn 2
Below I have pasted the water.mdp
file, which can also be found here.
; ions.mdp - used as input into grompp to generate ions.tpr
; Parameters describing what to do, when to stop and what to save
integrator = steep ; Algorithm (steep = steepest descent minimization)
emtol = 1000.0 ; Stop minimization when the maximum force < 1000.0 kJ/mol/nm
emstep = 0.01 ; Minimization step size
nsteps = 50000 ; Maximum number of (minimization) steps to perform
; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
nstlist = 1 ; Frequency to update the neighbor list and long range forces
cutoff-scheme = Verlet ; Buffered neighbor searching
ns_type = grid ; Method to determine neighbor list (simple, grid)
coulombtype = cutoff ; Treatment of long range electrostatic interactions
rcoulomb = 1.0 ; Short-range electrostatic cut-off
rvdw = 1.0 ; Short-range Van der Waals cut-off
pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions
a99SBdisp is the forcefield file (.ff), Here I specified my forcefield exculsively, if not there will be a list of options given to you when you remove -ff a99SBdisp
and run the command. Choose from the list
For more information, follow this.
tpr
file $\endgroup$