Skip to content
Snippets Groups Projects
Commit 57e8311a authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Revert "Fix #251"

This reverts commit fba71ad4.
Looks like it fails on linux. I have to investigate the problem,
meanwhile I revert
parent fba71ad4
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "ActionRegister.h" #include "ActionRegister.h"
#include "core/PlumedMain.h" #include "core/PlumedMain.h"
#include "core/Atoms.h" #include "core/Atoms.h"
#include <cmath>
using namespace std; using namespace std;
...@@ -112,16 +111,7 @@ void COM::calculate() { ...@@ -112,16 +111,7 @@ void COM::calculate() {
if(!nopbc) makeWhole(); if(!nopbc) makeWhole();
double mass(0.0); double mass(0.0);
vector<Tensor> deriv(getNumberOfAtoms()); vector<Tensor> deriv(getNumberOfAtoms());
for(unsigned i=0; i<getNumberOfAtoms(); i++) { for(unsigned i=0; i<getNumberOfAtoms(); i++) mass+=getMass(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;
}
if( plumed.getAtoms().chargesWereSet() ) { if( plumed.getAtoms().chargesWereSet() ) {
double charge(0.0); double charge(0.0);
for(unsigned i=0; i<getNumberOfAtoms(); i++) charge+=getCharge(i); for(unsigned i=0; i<getNumberOfAtoms(); i++) charge+=getCharge(i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment