From 57e8311a04c27b4aa40418f693c64fa2322403f9 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Wed, 28 Jun 2017 09:33:00 +0200
Subject: [PATCH] Revert "Fix #251"

This reverts commit fba71ad4ea8a7477a02f8d8b1bee682ce2eebb21.
Looks like it fails on linux. I have to investigate the problem,
meanwhile I revert
---
 src/vatom/COM.cpp | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/vatom/COM.cpp b/src/vatom/COM.cpp
index 63fd49e69..9e9ac4890 100644
--- a/src/vatom/COM.cpp
+++ b/src/vatom/COM.cpp
@@ -23,7 +23,6 @@
 #include "ActionRegister.h"
 #include "core/PlumedMain.h"
 #include "core/Atoms.h"
-#include <cmath>
 
 using namespace std;
 
@@ -112,16 +111,7 @@ void COM::calculate() {
   if(!nopbc) makeWhole();
   double mass(0.0);
   vector<Tensor> deriv(getNumberOfAtoms());
-  for(unsigned i=0; i<getNumberOfAtoms(); i++) {
-    double m=getMass(i);
-    if(isnan(m)) {
-      error(
-        "You are trying to compute a COM but masses are not known.\n"
-        "        If you are using plumed driver, please use the --mc option"
-      );
-    }
-    mass+=m;
-  }
+  for(unsigned i=0; i<getNumberOfAtoms(); i++) mass+=getMass(i);
   if( plumed.getAtoms().chargesWereSet() ) {
     double charge(0.0);
     for(unsigned i=0; i<getNumberOfAtoms(); i++) charge+=getCharge(i);
-- 
GitLab