From 457892572f91f59946a7d0773e3ff80595264bc7 Mon Sep 17 00:00:00 2001
From: Carlo Camilloni <carlo.camilloni@gmail.com>
Date: Sun, 29 Jan 2017 22:58:46 +0100
Subject: [PATCH] PlumedMain: reordered included headers and removed
 duplications

---
 src/core/PlumedMain.cpp | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/src/core/PlumedMain.cpp b/src/core/PlumedMain.cpp
index 535cabe87..d43cae3e9 100644
--- a/src/core/PlumedMain.cpp
+++ b/src/core/PlumedMain.cpp
@@ -19,31 +19,30 @@
    You should have received a copy of the GNU Lesser General Public License
    along with plumed.  If not, see <http://www.gnu.org/licenses/>.
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
-#include "PlumedMain.h"
-#include "tools/Tools.h"
-#include "tools/OpenMP.h"
-#include <cstring>
+#include "ActionAtomistic.h"
 #include "ActionPilot.h"
+#include "ActionRegister.h"
+#include "ActionSet.h"
 #include "ActionWithValue.h"
-#include "ActionAtomistic.h"
 #include "ActionWithVirtualAtom.h"
 #include "Atoms.h"
-#include <set>
-#include "config/Config.h"
-#include <cstdlib>
-#include "ActionRegister.h"
+#include "CLToolMain.h"
+#include "ExchangePatterns.h"
 #include "GREX.h"
+#include "PlumedMain.h"
+#include "config/Config.h"
+#include "tools/Citations.h"
+#include "tools/Communicator.h"
+#include "tools/DLLoader.h"
 #include "tools/Exception.h"
-#include "Atoms.h"
-#include "ActionSet.h"
+#include "tools/IFile.h"
 #include "tools/Log.h"
-#include "tools/DLLoader.h"
-#include "tools/Communicator.h"
-#include "CLToolMain.h"
+#include "tools/OpenMP.h"
+#include "tools/Tools.h"
 #include "tools/Stopwatch.h"
-#include "tools/Citations.h"
-#include "ExchangePatterns.h"
-#include "tools/IFile.h"
+#include <cstdlib>
+#include <cstring>
+#include <set>
 
 using namespace std;
 
@@ -376,6 +375,13 @@ void PlumedMain::cmd(const std::string & word,void*val){
         doCheckPoint = false;
         if(*static_cast<int*>(val)!=0) doCheckPoint = true;
         break;
+      /* ADDED WITH API==4 */
+      case cmd_EnsembleRestraints:
+        CHECK_INIT(initialized,word);
+        CHECK_NOTNULL(val,word);
+        doCheckPoint = false;
+        if(*static_cast<int*>(val)!=0) doCheckPoint = true;
+        break;
       /* STOP API */
       case cmd_setMDEngine:
         CHECK_NOTINIT(initialized,word);
-- 
GitLab