291 |
|
kineticFlux_ = 0.0; |
292 |
|
} |
293 |
|
if (hasMomentumFluxVector) { |
294 |
< |
momentumFluxVector_ = rnemdParams->getMomentumFluxVector(); |
294 |
> |
std::vector<RealType> mf = rnemdParams->getMomentumFluxVector(); |
295 |
> |
if (mf.size() != 3) { |
296 |
> |
sprintf(painCave.errMsg, |
297 |
> |
"RNEMD: Incorrect number of parameters specified for momentumFluxVector.\n" |
298 |
> |
"\tthere should be 3 parameters, but %lu were specified.\n", |
299 |
> |
mf.size()); |
300 |
> |
painCave.isFatal = 1; |
301 |
> |
simError(); |
302 |
> |
} |
303 |
> |
momentumFluxVector_.x() = mf[0]; |
304 |
> |
momentumFluxVector_.y() = mf[1]; |
305 |
> |
momentumFluxVector_.z() = mf[2]; |
306 |
|
} else { |
307 |
|
momentumFluxVector_ = V3Zero; |
308 |
|
if (hasMomentumFlux) { |
328 |
|
} |
329 |
|
} |
330 |
|
if (hasAngularMomentumFluxVector) { |
331 |
< |
angularMomentumFluxVector_ = rnemdParams->getAngularMomentumFluxVector(); |
331 |
> |
std::vector<RealType> amf = rnemdParams->getAngularMomentumFluxVector(); |
332 |
> |
if (amf.size() != 3) { |
333 |
> |
sprintf(painCave.errMsg, |
334 |
> |
"RNEMD: Incorrect number of parameters specified for angularMomentumFluxVector.\n" |
335 |
> |
"\tthere should be 3 parameters, but %lu were specified.\n", |
336 |
> |
amf.size()); |
337 |
> |
painCave.isFatal = 1; |
338 |
> |
simError(); |
339 |
> |
} |
340 |
> |
angularMomentumFluxVector_.x() = amf[0]; |
341 |
> |
angularMomentumFluxVector_.y() = amf[1]; |
342 |
> |
angularMomentumFluxVector_.z() = amf[2]; |
343 |
|
} else { |
344 |
|
angularMomentumFluxVector_ = V3Zero; |
345 |
|
if (hasAngularMomentumFlux) { |
370 |
|
} |
371 |
|
|
372 |
|
if (hasCoordinateOrigin) { |
373 |
< |
coordinateOrigin_ = rnemdParams->getCoordinateOrigin(); |
373 |
> |
std::vector<RealType> co = rnemdParams->getCoordinateOrigin(); |
374 |
> |
if (co.size() != 3) { |
375 |
> |
sprintf(painCave.errMsg, |
376 |
> |
"RNEMD: Incorrect number of parameters specified for coordinateOrigin.\n" |
377 |
> |
"\tthere should be 3 parameters, but %lu were specified.\n", |
378 |
> |
co.size()); |
379 |
> |
painCave.isFatal = 1; |
380 |
> |
simError(); |
381 |
> |
} |
382 |
> |
coordinateOrigin_.x() = co[0]; |
383 |
> |
coordinateOrigin_.y() = co[1]; |
384 |
> |
coordinateOrigin_.z() = co[2]; |
385 |
|
} else { |
386 |
|
coordinateOrigin_ = V3Zero; |
387 |
|
} |
656 |
|
StuntDouble* sd; |
657 |
|
|
658 |
|
RealType min_val; |
659 |
< |
bool min_found = false; |
659 |
> |
int min_found = 0; |
660 |
|
StuntDouble* min_sd; |
661 |
|
|
662 |
|
RealType max_val; |
663 |
< |
bool max_found = false; |
663 |
> |
int max_found = 0; |
664 |
|
StuntDouble* max_sd; |
665 |
|
|
666 |
|
for (sd = seleManA_.beginSelected(selei); sd != NULL; |
715 |
|
if (!max_found) { |
716 |
|
max_val = value; |
717 |
|
max_sd = sd; |
718 |
< |
max_found = true; |
718 |
> |
max_found = 1; |
719 |
|
} else { |
720 |
|
if (max_val < value) { |
721 |
|
max_val = value; |
777 |
|
if (!min_found) { |
778 |
|
min_val = value; |
779 |
|
min_sd = sd; |
780 |
< |
min_found = true; |
780 |
> |
min_found = 1; |
781 |
|
} else { |
782 |
|
if (min_val > value) { |
783 |
|
min_val = value; |
787 |
|
} |
788 |
|
|
789 |
|
#ifdef IS_MPI |
790 |
< |
int worldRank = MPI::COMM_WORLD.Get_rank(); |
791 |
< |
|
792 |
< |
bool my_min_found = min_found; |
793 |
< |
bool my_max_found = max_found; |
790 |
> |
int worldRank; |
791 |
> |
MPI_Comm_rank( MPI_COMM_WORLD, &worldRank); |
792 |
> |
|
793 |
> |
int my_min_found = min_found; |
794 |
> |
int my_max_found = max_found; |
795 |
|
|
796 |
|
// Even if we didn't find a minimum, did someone else? |
797 |
< |
MPI::COMM_WORLD.Allreduce(&my_min_found, &min_found, 1, MPI::BOOL, MPI::LOR); |
797 |
> |
MPI_Allreduce(&my_min_found, &min_found, 1, MPI_INT, MPI_LOR, |
798 |
> |
MPI_COMM_WORLD); |
799 |
|
// Even if we didn't find a maximum, did someone else? |
800 |
< |
MPI::COMM_WORLD.Allreduce(&my_max_found, &max_found, 1, MPI::BOOL, MPI::LOR); |
800 |
> |
MPI_Allreduce(&my_max_found, &max_found, 1, MPI_INT, MPI_LOR, |
801 |
> |
MPI_COMM_WORLD); |
802 |
|
#endif |
803 |
|
|
804 |
|
if (max_found && min_found) { |
817 |
|
min_vals.rank = worldRank; |
818 |
|
|
819 |
|
// Who had the minimum? |
820 |
< |
MPI::COMM_WORLD.Allreduce(&min_vals, &min_vals, |
821 |
< |
1, MPI::REALTYPE_INT, MPI::MINLOC); |
820 |
> |
MPI_Allreduce(&min_vals, &min_vals, |
821 |
> |
1, MPI_REALTYPE_INT, MPI_MINLOC, MPI_COMM_WORLD); |
822 |
|
min_val = min_vals.val; |
823 |
|
|
824 |
|
if (my_max_found) { |
829 |
|
max_vals.rank = worldRank; |
830 |
|
|
831 |
|
// Who had the maximum? |
832 |
< |
MPI::COMM_WORLD.Allreduce(&max_vals, &max_vals, |
833 |
< |
1, MPI::REALTYPE_INT, MPI::MAXLOC); |
832 |
> |
MPI_Allreduce(&max_vals, &max_vals, |
833 |
> |
1, MPI_REALTYPE_INT, MPI_MAXLOC, MPI_COMM_WORLD); |
834 |
|
max_val = max_vals.val; |
835 |
|
#endif |
836 |
|
|
890 |
|
|
891 |
|
Vector3d min_vel; |
892 |
|
Vector3d max_vel = max_sd->getVel(); |
893 |
< |
MPI::Status status; |
893 |
> |
MPI_Status status; |
894 |
|
|
895 |
|
// point-to-point swap of the velocity vector |
896 |
< |
MPI::COMM_WORLD.Sendrecv(max_vel.getArrayPointer(), 3, MPI::REALTYPE, |
897 |
< |
min_vals.rank, 0, |
898 |
< |
min_vel.getArrayPointer(), 3, MPI::REALTYPE, |
899 |
< |
min_vals.rank, 0, status); |
896 |
> |
MPI_Sendrecv(max_vel.getArrayPointer(), 3, MPI_REALTYPE, |
897 |
> |
min_vals.rank, 0, |
898 |
> |
min_vel.getArrayPointer(), 3, MPI_REALTYPE, |
899 |
> |
min_vals.rank, 0, MPI_COMM_WORLD, &status); |
900 |
|
|
901 |
|
switch(rnemdFluxType_) { |
902 |
|
case rnemdKE : |
907 |
|
Vector3d max_angMom = max_sd->getJ(); |
908 |
|
|
909 |
|
// point-to-point swap of the angular momentum vector |
910 |
< |
MPI::COMM_WORLD.Sendrecv(max_angMom.getArrayPointer(), 3, |
911 |
< |
MPI::REALTYPE, min_vals.rank, 1, |
912 |
< |
min_angMom.getArrayPointer(), 3, |
913 |
< |
MPI::REALTYPE, min_vals.rank, 1, |
914 |
< |
status); |
910 |
> |
MPI_Sendrecv(max_angMom.getArrayPointer(), 3, |
911 |
> |
MPI_REALTYPE, min_vals.rank, 1, |
912 |
> |
min_angMom.getArrayPointer(), 3, |
913 |
> |
MPI_REALTYPE, min_vals.rank, 1, |
914 |
> |
MPI_COMM_WORLD, &status); |
915 |
|
|
916 |
|
max_sd->setJ(min_angMom); |
917 |
|
} |
936 |
|
|
937 |
|
Vector3d max_vel; |
938 |
|
Vector3d min_vel = min_sd->getVel(); |
939 |
< |
MPI::Status status; |
939 |
> |
MPI_Status status; |
940 |
|
|
941 |
|
// point-to-point swap of the velocity vector |
942 |
< |
MPI::COMM_WORLD.Sendrecv(min_vel.getArrayPointer(), 3, MPI::REALTYPE, |
943 |
< |
max_vals.rank, 0, |
944 |
< |
max_vel.getArrayPointer(), 3, MPI::REALTYPE, |
945 |
< |
max_vals.rank, 0, status); |
942 |
> |
MPI_Sendrecv(min_vel.getArrayPointer(), 3, MPI_REALTYPE, |
943 |
> |
max_vals.rank, 0, |
944 |
> |
max_vel.getArrayPointer(), 3, MPI_REALTYPE, |
945 |
> |
max_vals.rank, 0, MPI_COMM_WORLD, &status); |
946 |
|
|
947 |
|
switch(rnemdFluxType_) { |
948 |
|
case rnemdKE : |
953 |
|
Vector3d max_angMom; |
954 |
|
|
955 |
|
// point-to-point swap of the angular momentum vector |
956 |
< |
MPI::COMM_WORLD.Sendrecv(min_angMom.getArrayPointer(), 3, |
957 |
< |
MPI::REALTYPE, max_vals.rank, 1, |
958 |
< |
max_angMom.getArrayPointer(), 3, |
959 |
< |
MPI::REALTYPE, max_vals.rank, 1, |
960 |
< |
status); |
956 |
> |
MPI_Sendrecv(min_angMom.getArrayPointer(), 3, |
957 |
> |
MPI_REALTYPE, max_vals.rank, 1, |
958 |
> |
max_angMom.getArrayPointer(), 3, |
959 |
> |
MPI_REALTYPE, max_vals.rank, 1, |
960 |
> |
MPI_COMM_WORLD, &status); |
961 |
|
|
962 |
|
min_sd->setJ(max_angMom); |
963 |
|
} |
1126 |
|
Kcw *= 0.5; |
1127 |
|
|
1128 |
|
#ifdef IS_MPI |
1129 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Phx, 1, MPI::REALTYPE, MPI::SUM); |
1130 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Phy, 1, MPI::REALTYPE, MPI::SUM); |
1131 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Phz, 1, MPI::REALTYPE, MPI::SUM); |
1132 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Pcx, 1, MPI::REALTYPE, MPI::SUM); |
1133 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Pcy, 1, MPI::REALTYPE, MPI::SUM); |
1134 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Pcz, 1, MPI::REALTYPE, MPI::SUM); |
1129 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Phx, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1130 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Phy, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1131 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Phz, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1132 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Pcx, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1133 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Pcy, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1134 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Pcz, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1135 |
|
|
1136 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Khx, 1, MPI::REALTYPE, MPI::SUM); |
1137 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Khy, 1, MPI::REALTYPE, MPI::SUM); |
1138 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Khz, 1, MPI::REALTYPE, MPI::SUM); |
1139 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Khw, 1, MPI::REALTYPE, MPI::SUM); |
1136 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Khx, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1137 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Khy, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1138 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Khz, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1139 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Khw, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1140 |
|
|
1141 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Kcx, 1, MPI::REALTYPE, MPI::SUM); |
1142 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Kcy, 1, MPI::REALTYPE, MPI::SUM); |
1143 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Kcz, 1, MPI::REALTYPE, MPI::SUM); |
1144 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Kcw, 1, MPI::REALTYPE, MPI::SUM); |
1141 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Kcx, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1142 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Kcy, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1143 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Kcz, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1144 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Kcw, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1145 |
|
#endif |
1146 |
|
|
1147 |
|
//solve coldBin coeff's first |
1618 |
|
Kc *= 0.5; |
1619 |
|
|
1620 |
|
#ifdef IS_MPI |
1621 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Ph[0], 3, MPI::REALTYPE, MPI::SUM); |
1622 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Pc[0], 3, MPI::REALTYPE, MPI::SUM); |
1623 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Lh[0], 3, MPI::REALTYPE, MPI::SUM); |
1624 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Lc[0], 3, MPI::REALTYPE, MPI::SUM); |
1625 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Mh, 1, MPI::REALTYPE, MPI::SUM); |
1626 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Kh, 1, MPI::REALTYPE, MPI::SUM); |
1627 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Mc, 1, MPI::REALTYPE, MPI::SUM); |
1628 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &Kc, 1, MPI::REALTYPE, MPI::SUM); |
1629 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, Ih.getArrayPointer(), 9, |
1630 |
< |
MPI::REALTYPE, MPI::SUM); |
1631 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, Ic.getArrayPointer(), 9, |
1632 |
< |
MPI::REALTYPE, MPI::SUM); |
1621 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Ph[0], 3, MPI_REALTYPE, MPI_SUM, |
1622 |
> |
MPI_COMM_WORLD); |
1623 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Pc[0], 3, MPI_REALTYPE, MPI_SUM, |
1624 |
> |
MPI_COMM_WORLD); |
1625 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Lh[0], 3, MPI_REALTYPE, MPI_SUM, |
1626 |
> |
MPI_COMM_WORLD); |
1627 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Lc[0], 3, MPI_REALTYPE, MPI_SUM, |
1628 |
> |
MPI_COMM_WORLD); |
1629 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Mh, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1630 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Kh, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1631 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Mc, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1632 |
> |
MPI_Allreduce(MPI_IN_PLACE, &Kc, 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1633 |
> |
MPI_Allreduce(MPI_IN_PLACE, Ih.getArrayPointer(), 9, |
1634 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1635 |
> |
MPI_Allreduce(MPI_IN_PLACE, Ic.getArrayPointer(), 9, |
1636 |
> |
MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
1637 |
|
#endif |
1638 |
|
|
1639 |
|
|
1788 |
|
#if defined(HAVE_QHULL) |
1789 |
|
ConvexHull* surfaceMeshA = new ConvexHull(); |
1790 |
|
surfaceMeshA->computeHull(aSites); |
1791 |
+ |
cerr << "flag1\n"; |
1792 |
|
areaA = surfaceMeshA->getArea(); |
1793 |
+ |
cerr << "Flag2 " << areaA << "\n"; |
1794 |
|
delete surfaceMeshA; |
1795 |
|
#else |
1796 |
|
sprintf( painCave.errMsg, |
2029 |
|
#ifdef IS_MPI |
2030 |
|
|
2031 |
|
for (int i = 0; i < nBins_; i++) { |
2032 |
< |
|
2033 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binCount[i], |
2034 |
< |
1, MPI::INT, MPI::SUM); |
2035 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binMass[i], |
2036 |
< |
1, MPI::REALTYPE, MPI::SUM); |
2037 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binP[i], |
2038 |
< |
3, MPI::REALTYPE, MPI::SUM); |
2039 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binL[i], |
2040 |
< |
3, MPI::REALTYPE, MPI::SUM); |
2041 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binI[i], |
2042 |
< |
9, MPI::REALTYPE, MPI::SUM); |
2043 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binKE[i], |
2044 |
< |
1, MPI::REALTYPE, MPI::SUM); |
2045 |
< |
MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binDOF[i], |
2046 |
< |
1, MPI::INT, MPI::SUM); |
2047 |
< |
//MPI::COMM_WORLD.Allreduce(MPI::IN_PLACE, &binOmega[i], |
2048 |
< |
// 1, MPI::REALTYPE, MPI::SUM); |
2032 |
> |
|
2033 |
> |
MPI_Allreduce(MPI_IN_PLACE, &binCount[i], |
2034 |
> |
1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); |
2035 |
> |
MPI_Allreduce(MPI_IN_PLACE, &binMass[i], |
2036 |
> |
1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
2037 |
> |
MPI_Allreduce(MPI_IN_PLACE, binP[i].getArrayPointer(), |
2038 |
> |
3, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
2039 |
> |
MPI_Allreduce(MPI_IN_PLACE, binL[i].getArrayPointer(), |
2040 |
> |
3, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
2041 |
> |
MPI_Allreduce(MPI_IN_PLACE, binI[i].getArrayPointer(), |
2042 |
> |
9, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
2043 |
> |
MPI_Allreduce(MPI_IN_PLACE, &binKE[i], |
2044 |
> |
1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
2045 |
> |
MPI_Allreduce(MPI_IN_PLACE, &binDOF[i], |
2046 |
> |
1, MPI_INT, MPI_SUM, MPI_COMM_WORLD); |
2047 |
> |
//MPI_Allreduce(MPI_IN_PLACE, &binOmega[i], |
2048 |
> |
// 1, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
2049 |
|
} |
2050 |
|
|
2051 |
|
#endif |
2141 |
|
|
2142 |
|
#ifdef IS_MPI |
2143 |
|
// If we're the root node, should we print out the results |
2144 |
< |
int worldRank = MPI::COMM_WORLD.Get_rank(); |
2144 |
> |
int worldRank; |
2145 |
> |
MPI_Comm_rank( MPI_COMM_WORLD, &worldRank); |
2146 |
> |
|
2147 |
|
if (worldRank == 0) { |
2148 |
|
#endif |
2149 |
|
rnemdFile_.open(rnemdFileName_.c_str(), std::ios::out | std::ios::trunc ); |
2274 |
|
} |
2275 |
|
|
2276 |
|
rnemdFile_ << "#######################################################\n"; |
2277 |
< |
rnemdFile_ << "# Standard Deviations in those quantities follow:\n"; |
2277 |
> |
rnemdFile_ << "# 95% confidence intervals in those quantities follow:\n"; |
2278 |
|
rnemdFile_ << "#######################################################\n"; |
2279 |
|
|
2280 |
|
|
2283 |
|
for (unsigned int i = 0; i < outputMask_.size(); ++i) { |
2284 |
|
if (outputMask_[i]) { |
2285 |
|
if (data_[i].dataType == "RealType") |
2286 |
< |
writeRealStdDev(i,j); |
2286 |
> |
writeRealErrorBars(i,j); |
2287 |
|
else if (data_[i].dataType == "Vector3d") |
2288 |
< |
writeVectorStdDev(i,j); |
2288 |
> |
writeVectorErrorBars(i,j); |
2289 |
|
else { |
2290 |
|
sprintf( painCave.errMsg, |
2291 |
|
"RNEMD found an unknown data type for: %s ", |
2356 |
|
} |
2357 |
|
} |
2358 |
|
|
2359 |
< |
void RNEMD::writeRealStdDev(int index, unsigned int bin) { |
2359 |
> |
void RNEMD::writeRealErrorBars(int index, unsigned int bin) { |
2360 |
|
if (!doRNEMD_) return; |
2361 |
|
assert(index >=0 && index < ENDINDEX); |
2362 |
|
assert(int(bin) < nBins_); |
2366 |
|
count = data_[index].accumulator[bin]->count(); |
2367 |
|
if (count == 0) return; |
2368 |
|
|
2369 |
< |
dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->getStdDev(s); |
2369 |
> |
dynamic_cast<Accumulator *>(data_[index].accumulator[bin])->get95percentConfidenceInterval(s); |
2370 |
|
|
2371 |
|
if (! isinf(s) && ! isnan(s)) { |
2372 |
|
rnemdFile_ << "\t" << s; |
2379 |
|
} |
2380 |
|
} |
2381 |
|
|
2382 |
< |
void RNEMD::writeVectorStdDev(int index, unsigned int bin) { |
2382 |
> |
void RNEMD::writeVectorErrorBars(int index, unsigned int bin) { |
2383 |
|
if (!doRNEMD_) return; |
2384 |
|
assert(index >=0 && index < ENDINDEX); |
2385 |
|
assert(int(bin) < nBins_); |
2389 |
|
count = data_[index].accumulator[bin]->count(); |
2390 |
|
if (count == 0) return; |
2391 |
|
|
2392 |
< |
dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->getStdDev(s); |
2392 |
> |
dynamic_cast<VectorAccumulator*>(data_[index].accumulator[bin])->get95percentConfidenceInterval(s); |
2393 |
|
if (isinf(s[0]) || isnan(s[0]) || |
2394 |
|
isinf(s[1]) || isnan(s[1]) || |
2395 |
|
isinf(s[2]) || isnan(s[2]) ) { |