256 |
|
int metaDataBlockStart = -1; |
257 |
|
int metaDataBlockEnd = -1; |
258 |
|
int i; |
259 |
< |
int mdOffset; |
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; |
709 |
|
} |
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; |
796 |
|
int nGlobalAtoms = info->getNGlobalAtoms(); |
797 |
|
|
798 |
|
beginAtomIndex = 0; |
799 |
< |
beginRigidBodyIndex = 0; |
799 |
> |
//rigidbody's index begins right after atom's |
800 |
> |
beginRigidBodyIndex = info->getNGlobalAtoms(); |
801 |
|
beginCutoffGroupIndex = 0; |
802 |
|
|
803 |
|
for(int i = 0; i < info->getNGlobalMolecules(); i++) { |
915 |
|
for (mol = info->beginMolecule(mi); mol != NULL; mol = info->nextMolecule(mi)) { |
916 |
|
int myGlobalIndex = mol->getGlobalIndex(); |
917 |
|
int globalIO = startingIOIndexForMol[myGlobalIndex]; |
918 |
< |
for (StuntDouble* integrableObject = mol->beginIntegrableObject(ioi); integrableObject != NULL; |
919 |
< |
integrableObject = mol->nextIntegrableObject(ioi)) { |
920 |
< |
integrableObject->setGlobalIntegrableObjectIndex(globalIO); |
921 |
< |
IOIndexToIntegrableObject[globalIO] = integrableObject; |
918 |
> |
for (StuntDouble* sd = mol->beginIntegrableObject(ioi); sd != NULL; |
919 |
> |
sd = mol->nextIntegrableObject(ioi)) { |
920 |
> |
sd->setGlobalIntegrableObjectIndex(globalIO); |
921 |
> |
IOIndexToIntegrableObject[globalIO] = sd; |
922 |
|
globalIO++; |
923 |
|
} |
924 |
|
} |