35 |
|
* |
36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
54 |
|
#include "types/FixedChargeAdapter.hpp" |
55 |
|
#include "types/FluctuatingChargeAdapter.hpp" |
56 |
|
#include "types/MultipoleAdapter.hpp" |
57 |
+ |
#ifdef HAVE_QHULL |
58 |
|
#include "math/ConvexHull.hpp" |
59 |
|
#include "math/AlphaHull.hpp" |
60 |
+ |
#endif |
61 |
|
|
62 |
|
using namespace std; |
63 |
|
namespace OpenMD { |
324 |
|
Molecule* mol; |
325 |
|
Atom* atom; |
326 |
|
RealType charge; |
325 |
– |
RealType moment(0.0); |
327 |
|
Vector3d ri(0.0); |
328 |
|
Vector3d dipoleVector(0.0); |
329 |
|
Vector3d nPos(0.0); |
371 |
|
pCount++; |
372 |
|
} |
373 |
|
|
374 |
< |
MultipoleAdapter ma = MultipoleAdapter(atom->getAtomType()); |
375 |
< |
if (ma.isDipole() ) { |
375 |
< |
Vector3d u_i = atom->getElectroFrame().getColumn(2); |
376 |
< |
moment = ma.getDipoleMoment(); |
377 |
< |
moment *= debyeToCm; |
378 |
< |
dipoleVector += u_i * moment; |
374 |
> |
if (atom->isDipole()) { |
375 |
> |
dipoleVector += atom->getDipole() * debyeToCm; |
376 |
|
} |
377 |
|
} |
378 |
|
} |
439 |
|
RealType kinetic; |
440 |
|
RealType potential; |
441 |
|
RealType eatom; |
445 |
– |
RealType AvgE_a_ = 0; |
442 |
|
// Convective portion of the heat flux |
443 |
|
Vector3d heatFluxJc = V3Zero; |
444 |
|
|
826 |
|
data[0] = pos1.x(); |
827 |
|
data[1] = pos1.y(); |
828 |
|
data[2] = pos1.z(); |
829 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); |
829 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); |
830 |
|
} else { |
831 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc1, MPI_COMM_WORLD); |
831 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc1); |
832 |
|
pos1 = Vector3d(data); |
833 |
|
} |
834 |
|
|
837 |
|
pos2 = sd2->getPos(); |
838 |
|
data[0] = pos2.x(); |
839 |
|
data[1] = pos2.y(); |
840 |
< |
data[2] = pos2.z(); |
841 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); |
840 |
> |
data[2] = pos2.z(); |
841 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); |
842 |
|
} else { |
843 |
< |
MPI_Bcast(data, 3, MPI_REALTYPE, proc2, MPI_COMM_WORLD); |
843 |
> |
MPI::COMM_WORLD.Bcast(data, 3, MPI::REALTYPE, proc2); |
844 |
|
pos2 = Vector3d(data); |
845 |
|
} |
846 |
|
#else |
860 |
|
|
861 |
|
RealType Thermo::getHullVolume(){ |
862 |
|
Snapshot* snap = info_->getSnapshotManager()->getCurrentSnapshot(); |
867 |
– |
|
868 |
– |
if (!snap->hasHullVolume) { |
863 |
|
|
864 |
+ |
#ifdef HAVE_QHULL |
865 |
+ |
if (!snap->hasHullVolume) { |
866 |
|
Hull* surfaceMesh_; |
867 |
|
|
868 |
|
Globals* simParams = info_->getSimParams(); |
898 |
|
snap->setHullVolume(surfaceMesh_->getVolume()); |
899 |
|
} |
900 |
|
return snap->getHullVolume(); |
901 |
< |
} |
901 |
> |
#else |
902 |
> |
return 0.0; |
903 |
> |
#endif |
904 |
> |
} |
905 |
|
} |