--- branches/development/src/brains/Thermo.cpp 2012/07/03 18:32:27 1764 +++ branches/development/src/brains/Thermo.cpp 2012/08/29 18:13:11 1787 @@ -54,8 +54,10 @@ #include "types/FixedChargeAdapter.hpp" #include "types/FluctuatingChargeAdapter.hpp" #include "types/MultipoleAdapter.hpp" +#ifdef HAVE_QHULL #include "math/ConvexHull.hpp" #include "math/AlphaHull.hpp" +#endif using namespace std; namespace OpenMD { @@ -370,12 +372,8 @@ namespace OpenMD { pCount++; } - MultipoleAdapter ma = MultipoleAdapter(atom->getAtomType()); - if (ma.isDipole() ) { - Vector3d u_i = atom->getElectroFrame().getColumn(2); - moment = ma.getDipoleMoment(); - moment *= debyeToCm; - dipoleVector += u_i * moment; + if (atom->isDipole()) { + dipoleVector += atom->getDipole() * debyeToCm; } } } @@ -864,9 +862,9 @@ namespace OpenMD { RealType Thermo::getHullVolume(){ Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot(); - - if (!snap->hasHullVolume) { +#ifdef HAVE_QHULL + if (!snap->hasHullVolume) { Hull* surfaceMesh_; Globals* simParams = info_->getSimParams(); @@ -902,5 +900,8 @@ namespace OpenMD { snap->setHullVolume(surfaceMesh_->getVolume()); } return snap->getHullVolume(); - } +#else + return 0.0; +#endif + } }