35 |
|
* |
36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
91 |
|
for (vector<Component*>::iterator i = components.begin(); |
92 |
|
i !=components.end(); ++i) { |
93 |
|
molStamp = (*i)->getMoleculeStamp(); |
94 |
+ |
if ( (*i)->haveRegion() ) { |
95 |
+ |
molStamp->setRegion( (*i)->getRegion() ); |
96 |
+ |
} else { |
97 |
+ |
// set the region to a disallowed value: |
98 |
+ |
molStamp->setRegion( -1 ); |
99 |
+ |
} |
100 |
+ |
|
101 |
|
nMolWithSameStamp = (*i)->getNMol(); |
102 |
|
|
103 |
|
addMoleculeStamp(molStamp, nMolWithSameStamp); |
789 |
|
return atomTypes; |
790 |
|
} |
791 |
|
|
792 |
+ |
|
793 |
+ |
int getGlobalCountOfType(AtomType* atype) { |
794 |
+ |
/* |
795 |
+ |
set<AtomType*> atypes = getSimulatedAtomTypes(); |
796 |
+ |
map<AtomType*, int> counts_; |
797 |
+ |
|
798 |
+ |
for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { |
799 |
+ |
for(atom = mol->beginAtom(ai); atom != NULL; |
800 |
+ |
atom = mol->nextAtom(ai)) { |
801 |
+ |
atom->getAtomType(); |
802 |
+ |
} |
803 |
+ |
} |
804 |
+ |
*/ |
805 |
+ |
return 0; |
806 |
+ |
} |
807 |
+ |
|
808 |
|
void SimInfo::setupSimVariables() { |
809 |
|
useAtomicVirial_ = simParams_->getUseAtomicVirial(); |
810 |
|
// we only call setAccumulateBoxDipole if the accumulateBoxDipole |
938 |
|
} |
939 |
|
} |
940 |
|
|
941 |
< |
// Build the identArray_ |
941 |
> |
// Build the identArray_ and regions_ |
942 |
|
|
943 |
|
identArray_.clear(); |
944 |
< |
identArray_.reserve(getNAtoms()); |
945 |
< |
for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { |
944 |
> |
identArray_.reserve(getNAtoms()); |
945 |
> |
regions_.clear(); |
946 |
> |
regions_.reserve(getNAtoms()); |
947 |
> |
|
948 |
> |
for(mol = beginMolecule(mi); mol != NULL; mol = nextMolecule(mi)) { |
949 |
> |
int reg = mol->getRegion(); |
950 |
|
for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { |
951 |
|
identArray_.push_back(atom->getIdent()); |
952 |
+ |
regions_.push_back(reg); |
953 |
|
} |
954 |
|
} |
955 |
< |
|
928 |
< |
//scan topology |
929 |
< |
|
930 |
< |
int* excludeList = excludedInteractions_.getPairList(); |
931 |
< |
int* oneTwoList = oneTwoInteractions_.getPairList(); |
932 |
< |
int* oneThreeList = oneThreeInteractions_.getPairList(); |
933 |
< |
int* oneFourList = oneFourInteractions_.getPairList(); |
934 |
< |
|
955 |
> |
|
956 |
|
topologyDone_ = true; |
957 |
|
} |
958 |
|
|
1024 |
|
|
1025 |
|
|
1026 |
|
StuntDouble* SimInfo::getIOIndexToIntegrableObject(int index) { |
1027 |
< |
if (index >= IOIndexToIntegrableObject.size()) { |
1027 |
> |
if (index >= int(IOIndexToIntegrableObject.size())) { |
1028 |
|
sprintf(painCave.errMsg, |
1029 |
|
"SimInfo::getIOIndexToIntegrableObject Error: Integrable Object\n" |
1030 |
|
"\tindex exceeds number of known objects!\n"); |