116 |
|
set<AtomType*>::iterator at; |
117 |
|
|
118 |
|
for (at = atypes.begin(); at != atypes.end(); ++at) { |
119 |
< |
|
120 |
< |
//for (atype1 = atomTypes->beginType(i1); atype1 != NULL; |
121 |
< |
// atype1 = atomTypes->nextType(i1)) { |
122 |
< |
|
119 |
> |
|
120 |
|
atype1 = *at; |
121 |
|
atid1 = atype1->getIdent(); |
122 |
|
iHash_[atid1].resize(nTypes); |
133 |
|
painCave.isFatal = 0; |
134 |
|
simError(); |
135 |
|
} |
136 |
< |
} |
137 |
< |
|
138 |
< |
if (atype1->isLennardJones()) { |
139 |
< |
sHash_[atid1] |= LJ_INTERACTION; |
140 |
< |
} |
141 |
< |
if (atype1->isElectrostatic()) { |
142 |
< |
sHash_[atid1] |= ELECTROSTATIC_INTERACTION; |
143 |
< |
} |
144 |
< |
if (atype1->isSticky()) { |
145 |
< |
sHash_[atid1] |= STICKY_INTERACTION; |
146 |
< |
} |
147 |
< |
if (atype1->isStickyPower()) { |
148 |
< |
sHash_[atid1] |= STICKY_INTERACTION; |
149 |
< |
} |
150 |
< |
if (atype1->isEAM()) { |
151 |
< |
sHash_[atid1] |= EAM_INTERACTION; |
152 |
< |
} |
153 |
< |
if (atype1->isSC()) { |
154 |
< |
sHash_[atid1] |= SC_INTERACTION; |
155 |
< |
} |
156 |
< |
if (atype1->isGayBerne()) { |
157 |
< |
sHash_[atid1] |= GB_INTERACTION; |
136 |
> |
|
137 |
> |
if (atype1->isLennardJones()) { |
138 |
> |
sHash_[atid1] |= LJ_INTERACTION; |
139 |
> |
} |
140 |
> |
if (atype1->isElectrostatic()) { |
141 |
> |
sHash_[atid1] |= ELECTROSTATIC_INTERACTION; |
142 |
> |
} |
143 |
> |
if (atype1->isSticky()) { |
144 |
> |
sHash_[atid1] |= STICKY_INTERACTION; |
145 |
> |
} |
146 |
> |
if (atype1->isStickyPower()) { |
147 |
> |
sHash_[atid1] |= STICKY_INTERACTION; |
148 |
> |
} |
149 |
> |
if (atype1->isEAM()) { |
150 |
> |
sHash_[atid1] |= EAM_INTERACTION; |
151 |
> |
} |
152 |
> |
if (atype1->isSC()) { |
153 |
> |
sHash_[atid1] |= SC_INTERACTION; |
154 |
> |
} |
155 |
> |
if (atype1->isGayBerne()) { |
156 |
> |
sHash_[atid1] |= GB_INTERACTION; |
157 |
> |
} |
158 |
|
} |
162 |
– |
|
159 |
|
// Now, iterate over all known types and add to the interaction map: |
160 |
|
|
161 |
|
map<int, AtomType*>::iterator it1, it2; |
174 |
|
iHash_[atid1][atid2] |= LJ_INTERACTION; |
175 |
|
} |
176 |
|
if (atype1->isElectrostatic() && atype2->isElectrostatic() ) { |
177 |
< |
// Pairs of fluctuating density EAM atoms have their |
178 |
< |
// interactions handled via the EAM routines. All other |
183 |
< |
// interactions with these atoms are handled via normal |
184 |
< |
// electrostatic channels: |
185 |
< |
if (!(atype1->isEAM() && atype2->isEAM())) { |
186 |
< |
interactions_[atid1][atid2].insert(electrostatic_); |
187 |
< |
iHash_[atid1][atid2] |= ELECTROSTATIC_INTERACTION; |
188 |
< |
} |
177 |
> |
interactions_[atid1][atid2].insert(electrostatic_); |
178 |
> |
iHash_[atid1][atid2] |= ELECTROSTATIC_INTERACTION; |
179 |
|
} |
180 |
|
if (atype1->isSticky() && atype2->isSticky() ) { |
181 |
|
interactions_[atid1][atid2].insert(sticky_); |
371 |
|
atid1 = atype1->getIdent(); |
372 |
|
for (jt = it; jt != simTypes.end(); ++jt) { |
373 |
|
atype2 = (*jt); |
374 |
< |
atid1 = atype1->getIdent(); |
374 |
> |
atid2 = atype2->getIdent(); |
375 |
|
|
376 |
|
if (interactions_[atid1][atid2].size() == 0) { |
377 |
|
sprintf( painCave.errMsg, |