258 |
|
int i; |
259 |
|
streamoff mdOffset; |
260 |
|
int mdFileVersion; |
261 |
+ |
|
262 |
|
|
263 |
|
#ifdef IS_MPI |
264 |
|
const int masterNode = 0; |
265 |
|
if (worldRank == masterNode) { |
266 |
|
#endif |
267 |
|
|
268 |
< |
std::ifstream mdFile_(mdFileName.c_str()); |
268 |
> |
std::ifstream mdFile_; |
269 |
> |
mdFile_.open(mdFileName.c_str(), ifstream::in | ifstream::binary); |
270 |
|
|
271 |
|
if (mdFile_.fail()) { |
272 |
|
sprintf(painCave.errMsg, |
675 |
|
set<AtomType*>::iterator i; |
676 |
|
bool hasDirectionalAtoms = false; |
677 |
|
bool hasFixedCharge = false; |
678 |
< |
bool hasMultipoles = false; |
678 |
> |
bool hasDipoles = false; |
679 |
> |
bool hasQuadrupoles = false; |
680 |
|
bool hasPolarizable = false; |
681 |
|
bool hasFluctuatingCharge = false; |
682 |
|
bool hasMetallic = false; |
698 |
|
if (da.isDirectional()){ |
699 |
|
hasDirectionalAtoms = true; |
700 |
|
} |
701 |
< |
if (ma.isMultipole()){ |
702 |
< |
hasMultipoles = true; |
701 |
> |
if (ma.isDipole()){ |
702 |
> |
hasDipoles = true; |
703 |
> |
} |
704 |
> |
if (ma.isQuadrupole()){ |
705 |
> |
hasQuadrupoles = true; |
706 |
|
} |
707 |
|
if (ea.isEAM() || sca.isSuttonChen()){ |
708 |
|
hasMetallic = true; |
727 |
|
storageLayout |= DataStorage::dslTorque; |
728 |
|
} |
729 |
|
} |
730 |
< |
if (hasMultipoles) { |
731 |
< |
storageLayout |= DataStorage::dslElectroFrame; |
730 |
> |
if (hasDipoles) { |
731 |
> |
storageLayout |= DataStorage::dslDipole; |
732 |
|
} |
733 |
+ |
if (hasQuadrupoles) { |
734 |
+ |
storageLayout |= DataStorage::dslQuadrupole; |
735 |
+ |
} |
736 |
|
if (hasFixedCharge || hasFluctuatingCharge) { |
737 |
|
storageLayout |= DataStorage::dslSkippedCharge; |
738 |
|
} |
770 |
|
if (simParams->getOutputElectricField()) { |
771 |
|
storageLayout |= DataStorage::dslElectricField; |
772 |
|
} |
773 |
+ |
|
774 |
|
if (simParams->getOutputFluctuatingCharges()) { |
775 |
|
storageLayout |= DataStorage::dslFlucQPosition; |
776 |
|
storageLayout |= DataStorage::dslFlucQVelocity; |