| 69 |
|
Globals * simParams = info->getSimParams(); |
| 70 |
|
RNEMDParameters* rnemdParams = simParams->getRNEMDParameters(); |
| 71 |
|
|
| 72 |
+ |
doRNEMD_ = rnemdParams->getUseRNEMD(); |
| 73 |
+ |
if (!doRNEMD_) return; |
| 74 |
+ |
|
| 75 |
|
stringToMethod_["Swap"] = rnemdSwap; |
| 76 |
|
stringToMethod_["NIVS"] = rnemdNIVS; |
| 77 |
|
stringToMethod_["VSS"] = rnemdVSS; |
| 413 |
|
} |
| 414 |
|
|
| 415 |
|
RNEMD::~RNEMD() { |
| 416 |
< |
|
| 416 |
> |
if (!doRNEMD_) return; |
| 417 |
|
#ifdef IS_MPI |
| 418 |
|
if (worldRank == 0) { |
| 419 |
|
#endif |
| 435 |
|
} |
| 436 |
|
|
| 437 |
|
void RNEMD::doSwap() { |
| 438 |
< |
|
| 438 |
> |
if (!doRNEMD_) return; |
| 439 |
|
Snapshot* currentSnap_ = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 440 |
|
Mat3x3d hmat = currentSnap_->getHmat(); |
| 441 |
|
|
| 770 |
|
} |
| 771 |
|
|
| 772 |
|
void RNEMD::doNIVS() { |
| 773 |
< |
|
| 773 |
> |
if (!doRNEMD_) return; |
| 774 |
|
Snapshot* currentSnap_ = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 775 |
|
Mat3x3d hmat = currentSnap_->getHmat(); |
| 776 |
|
|
| 1219 |
|
} |
| 1220 |
|
|
| 1221 |
|
void RNEMD::doVSS() { |
| 1222 |
< |
|
| 1222 |
> |
if (!doRNEMD_) return; |
| 1223 |
|
Snapshot* currentSnap_ = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 1224 |
|
RealType time = currentSnap_->getTime(); |
| 1225 |
|
Mat3x3d hmat = currentSnap_->getHmat(); |
| 1397 |
|
} |
| 1398 |
|
|
| 1399 |
|
void RNEMD::doRNEMD() { |
| 1400 |
< |
|
| 1400 |
> |
if (!doRNEMD_) return; |
| 1401 |
|
trialCount_++; |
| 1402 |
|
switch(rnemdMethod_) { |
| 1403 |
|
case rnemdSwap: |
| 1416 |
|
} |
| 1417 |
|
|
| 1418 |
|
void RNEMD::collectData() { |
| 1419 |
< |
|
| 1419 |
> |
if (!doRNEMD_) return; |
| 1420 |
|
Snapshot* currentSnap_ = info_->getSnapshotManager()->getCurrentSnapshot(); |
| 1421 |
|
Mat3x3d hmat = currentSnap_->getHmat(); |
| 1422 |
|
|
| 1553 |
|
} |
| 1554 |
|
|
| 1555 |
|
void RNEMD::getStarted() { |
| 1556 |
+ |
if (!doRNEMD_) return; |
| 1557 |
|
collectData(); |
| 1558 |
|
writeOutputFile(); |
| 1559 |
|
} |
| 1560 |
|
|
| 1561 |
|
void RNEMD::parseOutputFileFormat(const std::string& format) { |
| 1562 |
+ |
if (!doRNEMD_) return; |
| 1563 |
|
StringTokenizer tokenizer(format, " ,;|\t\n\r"); |
| 1564 |
|
|
| 1565 |
|
while(tokenizer.hasMoreTokens()) { |
| 1580 |
|
} |
| 1581 |
|
|
| 1582 |
|
void RNEMD::writeOutputFile() { |
| 1583 |
+ |
if (!doRNEMD_) return; |
| 1584 |
|
|
| 1585 |
|
#ifdef IS_MPI |
| 1586 |
|
// If we're the root node, should we print out the results |
| 1722 |
|
} |
| 1723 |
|
|
| 1724 |
|
void RNEMD::writeReal(int index, unsigned int bin) { |
| 1725 |
+ |
if (!doRNEMD_) return; |
| 1726 |
|
assert(index >=0 && index < ENDINDEX); |
| 1727 |
|
assert(bin < nBins_); |
| 1728 |
|
RealType s; |
| 1741 |
|
} |
| 1742 |
|
|
| 1743 |
|
void RNEMD::writeVector(int index, unsigned int bin) { |
| 1744 |
+ |
if (!doRNEMD_) return; |
| 1745 |
|
assert(index >=0 && index < ENDINDEX); |
| 1746 |
|
assert(bin < nBins_); |
| 1747 |
|
Vector3d s; |
| 1760 |
|
} |
| 1761 |
|
|
| 1762 |
|
void RNEMD::writeRealStdDev(int index, unsigned int bin) { |
| 1763 |
+ |
if (!doRNEMD_) return; |
| 1764 |
|
assert(index >=0 && index < ENDINDEX); |
| 1765 |
|
assert(bin < nBins_); |
| 1766 |
|
RealType s; |
| 1779 |
|
} |
| 1780 |
|
|
| 1781 |
|
void RNEMD::writeVectorStdDev(int index, unsigned int bin) { |
| 1782 |
+ |
if (!doRNEMD_) return; |
| 1783 |
|
assert(index >=0 && index < ENDINDEX); |
| 1784 |
|
assert(bin < nBins_); |
| 1785 |
|
Vector3d s; |