get_nsteps_from_mdp

gmx.get_nsteps_from_mdp(fname)[source]

Extract the maximum number of simulation steps of an Gromacs MD simulation from the .mdp file.

Parameters:

fname (str or bytes or os.PathLike) – Name of the .mdp file.

Returns:

nsteps (int) – Maximum number of simulation steps specified in the .mdp file.

Raises:
  • FileNotFoundError – If the input file does not exist.

  • ValueError – If the input file does not contain a line that starts with “nsteps” or if “nsteps” is not followed by an equal (=) sign.