diff --git a/src/USER-PLUMED/fix_plumed.cpp b/src/USER-PLUMED/fix_plumed.cpp
index 8569a1dd4a382a5e9fdc19edb463c72fae95479e..57cd2b0feff019209fe78c6731d79abd5c7f8a13 100644
--- a/src/USER-PLUMED/fix_plumed.cpp
+++ b/src/USER-PLUMED/fix_plumed.cpp
@@ -456,4 +456,42 @@ double FixPlumed::compute_scalar()
   return bias;
 }
 
+int FixPlumed::modify_param(int narg, char **arg)
+{
+  if (strcmp(arg[0],"pe") == 0) {
+    if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
+    modify->delete_compute(id_pe); delete [] id_pe;
+    int n = strlen(arg[1]) + 1;
+    id_pe = new char[n];
+    strcpy(id_pe,arg[1]);
+
+    int icompute = modify->find_compute(arg[1]);
+    if (icompute < 0) error->all(FLERR,"Could not find fix_modify potential energy ID");
+    c_pe = modify->compute[icompute];
+
+    if (c_pe->peflag == 0)
+      error->all(FLERR,"Fix_modify plmd_pe ID does not compute potential energy");
+    if (c_pe->igroup != 0 && comm->me == 0)
+      error->warning(FLERR,"Potential for fix PLUMED is not for group all");
+
+    return 2;
+
+  } else if (strcmp(arg[0],"press") == 0) {
+    if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
+    modify->delete_compute(id_press); delete [] id_press;
+    int n = strlen(arg[1]) + 1;
+    id_press = new char[n];
+    strcpy(id_press,arg[1]);
+
+    int icompute = modify->find_compute(arg[1]);
+    if (icompute < 0) error->all(FLERR,"Could not find fix_modify pressure ID");
+    c_press = modify->compute[icompute];
+
+    if (c_press->pressflag == 0)
+      error->all(FLERR,"Fix_modify pressure ID does not compute pressure");
+
+    return 2;
+  }
+  return 0;
+}
 
diff --git a/src/USER-PLUMED/fix_plumed.h b/src/USER-PLUMED/fix_plumed.h
index fda14606bfb6f3e23953d1ff0fc55d5f3f88f5c6..cd101c3ac5cea15c2113d784ad04239bedd87665 100644
--- a/src/USER-PLUMED/fix_plumed.h
+++ b/src/USER-PLUMED/fix_plumed.h
@@ -42,6 +42,7 @@ class FixPlumed : public Fix {
   void min_post_force(int);
   double compute_scalar();
   void reset_dt();
+  int modify_param(int narg, char **arg);
 
  private: