Running plumed with gromacs

GROMACS version: 2021.4-plumed-2.8.0
GROMACS modification: Yes/No
Here post your question
I want to perform steered molecular dynamics in gromacs with plumed. I have patched plumed with gromacs. But I don’t know how to run plumed now. I mean I tried gmx mdrun -plumed plumed.dat, with the script written in plumed.dat, but got an error. How should I proceed? I mean I have an equilibrated system named nvt.gro wherein I want to run the smd by following the distance between the COM of two particles and measuring the corresponding work done. I got an error stating that file with extension .tpr was not found. How should I create such a file?

Please provide actual error messages, directly copied and pasted from the terminal.

If the issue is with PLUMED, please use their help forum.

            :-) GROMACS - gmx mdrun, 2021.4-plumed-2.8.0 (-:

                        GROMACS is written by:
 Andrey Alekseenko              Emile Apol              Rossen Apostolov     
     Paul Bauer           Herman J.C. Berendsen           Par Bjelkmar       
   Christian Blau           Viacheslav Bolnykh             Kevin Boyd        
 Aldert van Buuren           Rudi van Drunen             Anton Feenstra      
Gilles Gouaillardet             Alan Gray               Gerrit Groenhof      
   Anca Hamuraru            Vincent Hindriksen          M. Eric Irrgang      
  Aleksei Iupinov           Christoph Junghans             Joe Jordan        
Dimitrios Karkoulis            Peter Kasson                Jiri Kraus        
  Carsten Kutzner              Per Larsson              Justin A. Lemkul     
   Viveca Lindahl            Magnus Lundborg             Erik Marklund       
    Pascal Merz             Pieter Meulenhoff            Teemu Murtola       
    Szilard Pall               Sander Pronk              Roland Schulz       
   Michael Shirts            Alexey Shvetsov             Alfons Sijbers      
   Peter Tieleman              Jon Vincent              Teemu Virolainen     
 Christian Wennberg            Maarten Wolf              Artem Zhmurov       
                       and the project leaders:
    Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright (c) 1991-2000, University of Groningen, The Netherlands.
Copyright (c) 2001-2019, The GROMACS development team at
Uppsala University, Stockholm University and
the Royal Institute of Technology, Sweden.
check out http://www.gromacs.org for more information.

GROMACS is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1
of the License, or (at your option) any later version.

GROMACS: gmx mdrun, version 2021.4-plumed-2.8.0
Executable: /home/niladri/gromacs21-4-mpi-plumed/bin/gmx_mpi
Data prefix: /home/niladri/gromacs21-4-mpi-plumed
Working dir: /home/niladri/Gourav/SMD_calc/25_percent/dodecane_equilibration
Command line:
gmx_mpi mdrun -v -deffnm md -ntmpi 0 -ntomp 32 -pin on -pinoffset 0 -plumed plumed.dat

Back Off! I just backed up md.log to ./#md.log.2#
Reading file md.tpr, VERSION 2021.4 (single precision)
Changing nstlist from 10 to 100, rlist from 1.2 to 1.2

Using 1 MPI process
Using 32 OpenMP threads

Back Off! I just backed up md.trr to ./#md.trr.2#

Back Off! I just backed up md.edr to ./#md.edr.2#
starting mdrun ‘SIL in water’
1000000 steps, 1000.0 ps.
[raman:167854] *** Process received signal ***
[raman:167854] Signal: Segmentation fault (11)
[raman:167854] Signal code: Address not mapped (1)
[raman:167854] Failing at address: (nil)
[raman:167854] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x430c0)[0x7f4198a8c0c0]
[raman:167854] [ 1] /opt/plumed/lib/libplumedKernel.so(ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_M_realloc_insertIJRKS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT+0x9f)[0x7f4197ff4f0f]
[raman:167854] [ 2] /opt/plumed/lib/libplumedKernel.so(_ZNK4PLMD3PDB13getChainNamesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x264)[0x7f41984970b4]
[raman:167854] [ 3] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD14GenericMolInfoC1ERKNS_13ActionOptionsE+0x852)[0x7f4198189c12]
[raman:167854] [ 4] /opt/plumed/lib/libplumedKernel.so(+0x494757)[0x7f41981f4757]
[raman:167854] [ 5] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD14ActionRegister6createERKNS_13ActionOptionsE+0x614)[0x7f4198154774]
[raman:167854] [ 6] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD10PlumedMain14readInputWordsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE+0x280)[0x7f41981a0880]
[raman:167854] [ 7] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD10PlumedMain13readInputFileERNS_5IFileE+0x54)[0x7f41981a0ce4]
[raman:167854] [ 8] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD10PlumedMain13readInputFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xa3)[0x7f41981a3ee3]
[raman:167854] [ 9] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD10PlumedMain4initEv+0x124a)[0x7f41981a52ea]
[raman:167854] [10] /opt/plumed/lib/libplumedKernel.so(_ZN4PLMD10PlumedMain3cmdERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11TypesafePtrE+0x1bb5)[0x7f41981a7415]
[raman:167854] [11] /opt/plumed/lib/libplumedKernel.so(+0x44b806)[0x7f41981ab806]
[raman:167854] [12] /home/niladri/gromacs21-4-mpi-plumed/lib/libgromacs_mpi.so.6(_ZN3gmx15LegacySimulator5do_mdEv+0x1c65)[0x7f4199a27e55]
[raman:167854] [13] /home/niladri/gromacs21-4-mpi-plumed/lib/libgromacs_mpi.so.6(_ZN3gmx15LegacySimulator3runEv+0x72)[0x7f4199a25f62]
[raman:167854] [14] /home/niladri/gromacs21-4-mpi-plumed/lib/libgromacs_mpi.so.6(_ZN3gmx8Mdrunner8mdrunnerEv+0x61e9)[0x7f4199a603e9]
[raman:167854] [15] gmx_mpi(+0xb75a)[0x56481b63275a]
[raman:167854] [16] gmx_mpi(+0xb902)[0x56481b632902]
[raman:167854] [17] /home/niladri/gromacs21-4-mpi-plumed/lib/libgromacs_mpi.so.6(_ZN3gmx24CommandLineModuleManager3runEiPPc+0x280)[0x7f419939a600]
[raman:167854] [18] gmx_mpi(+0x7eb0)[0x56481b62eeb0]
[raman:167854] [19] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f4198a6d0b3]
[raman:167854] [20] gmx_mpi(+0x7f3e)[0x56481b62ef3e]
[raman:167854] *** End of error message ***
Segmentation fault (core dumped)

I want to run SMD here with to determine the work done when the distance between the COM of two particles is increased. For this I have already equilibrated the system (NVT equilibration was done). But when I ran the command gmx_mpi mdrun -plumed plumed.dat (with the moleinfo command = nvt.gro, in order to read the nvt.gro file obtained from NVT equilibration) I got an error as mdrun requires .tpr file. So I was not sure, which .tpr file it requires. So I created another tpr file for a simple 1ns production run (named md.tpr) but when used with plumed, I got a segmentation fault.

An mdrun process always requires instructions for doing the dynamics, hence why you need a .tpr file, and its settings must be sensible for the type of simulation you’re running. Regardless, this all looks like some kind of PLUMED failure. If the md.tpr file runs without PLUMED options, you can confirm that. And if it is a PLUMED problem, please inquire on their forums.

ok. But I have one question here. If I want to run an SMD calculation, what should be the input parameters for the corresponding .mdp file? I mean can I run SMD without plumed in gromacs?

One possible example: Umbrella Sampling