Skip to content

Commit

Permalink
Merge branch 'test_intel' of github.com:plumed/plumed2 into test_intel
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocamilloni committed Nov 30, 2023
2 parents 95b0190 + 34139d7 commit f52c0d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vatom/Center.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "core/PlumedMain.h"
#include "core/Atoms.h"
#include <cmath>
#include <limits>

namespace PLMD {
namespace vatom {
Expand Down Expand Up @@ -152,7 +153,7 @@ void Center::registerKeywords(Keywords& keys) {
Center::Center(const ActionOptions&ao):
Action(ao),
ActionWithVirtualAtom(ao),
charge_(nan("")),
charge_(std::numeric_limits<double>::lowest()),
mass_(-1),
isChargeSet_(false),
isMassSet_(false),
Expand All @@ -169,7 +170,7 @@ Center::Center(const ActionOptions&ao):
parseFlag("NOPBC",nopbc);
parseFlag("PHASES",phases);
parse("SET_CHARGE",charge_);
if(!std::isnan(charge_)) isChargeSet_=true;
if(charge_!=std::numeric_limits<double>::lowest()) isChargeSet_=true;
parse("SET_MASS",mass_);
if(mass_>0.) isMassSet_=true;
if(mass_==0.) error("SETMASS must be greater than 0");
Expand Down

0 comments on commit f52c0d8

Please sign in to comment.