544 |
|
} |
545 |
|
} |
546 |
|
|
547 |
+ |
//fill molMembershipArray |
548 |
+ |
//molMembershipArray is filled by SimCreator |
549 |
+ |
std::vector<int> molMembershipArray(nGlobalAtoms_); |
550 |
+ |
for (int i = 0; i < nGlobalAtoms_; i++) { |
551 |
+ |
molMembershipArray.push_back(globalMolMembership_[i] + 1); |
552 |
+ |
} |
553 |
+ |
|
554 |
|
//setup fortran simulation |
555 |
|
//gloalExcludes and molMembershipArray should go away (They are never used) |
556 |
|
//why the hell fortran need to know molecule? |
633 |
|
|
634 |
|
|
635 |
|
} |
636 |
+ |
|
637 |
+ |
#endif |
638 |
+ |
|
639 |
+ |
double SimInfo::calcMaxCutoffRadius() { |
640 |
+ |
|
641 |
+ |
|
642 |
+ |
std::vector<AtomType*> atomTypes; |
643 |
+ |
std::vector<AtomType*>::iterator i; |
644 |
+ |
std::vector<double> cutoffRadius; |
645 |
|
|
646 |
+ |
//get the unique atom types |
647 |
+ |
atomTypes = getUniqueAtomTypes(); |
648 |
+ |
|
649 |
+ |
//query the max cutoff radius among these atom types |
650 |
+ |
for (i = atomTypes.begin(); i != atomTypes.end(); ++i) { |
651 |
+ |
cutoffRadius.push_back(forceField_->getRcutFromAtomType(*i)); |
652 |
+ |
} |
653 |
+ |
|
654 |
+ |
double maxCutoffRadius = std::max_element(cutoffRadius.begin(), cutoffRadius.end()); |
655 |
+ |
#ifdef IS_MPI |
656 |
+ |
//pick the max cutoff radius among the processors |
657 |
|
#endif |
658 |
|
|
659 |
+ |
return maxCutoffRadius; |
660 |
+ |
} |
661 |
+ |
|
662 |
|
void SimInfo::addProperty(GenericData* genData) { |
663 |
|
properties_.addProperty(genData); |
664 |
|
} |