--- branches/development/src/brains/Thermo.cpp 2012/07/03 18:32:27 1764 +++ branches/development/src/brains/Thermo.cpp 2013/02/20 15:39:39 1850 @@ -35,7 +35,7 @@ * * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). - * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ @@ -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 { @@ -322,7 +324,6 @@ namespace OpenMD { Molecule* mol; Atom* atom; RealType charge; - RealType moment(0.0); Vector3d ri(0.0); Vector3d dipoleVector(0.0); Vector3d nPos(0.0); @@ -370,12 +371,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; } } } @@ -442,7 +439,6 @@ namespace OpenMD { RealType kinetic; RealType potential; RealType eatom; - RealType AvgE_a_ = 0; // Convective portion of the heat flux Vector3d heatFluxJc = V3Zero; @@ -830,9 +826,9 @@ namespace OpenMD { data[0] = pos1.x(); data[1] = pos1.y(); data[2] = pos1.z(); - MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); } else { - MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); pos1 = Vector3d(data); } @@ -841,10 +837,10 @@ namespace OpenMD { pos2 = sd2->getPos(); data[0] = pos2.x(); data[1] = pos2.y(); - data[2] = pos2.z(); - MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); + data[2] = pos2.z(); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); } else { - MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); + MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); pos2 = Vector3d(data); } #else @@ -864,9 +860,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 +898,8 @@ namespace OpenMD { snap->setHullVolume(surfaceMesh_->getVolume()); } return snap->getHullVolume(); - } +#else + return 0.0; +#endif + } }