| 51 |
|
gb_ = new GB(); |
| 52 |
|
sticky_ = new Sticky(); |
| 53 |
|
morse_ = new Morse(); |
| 54 |
+ |
repulsivePower_ = new RepulsivePower(); |
| 55 |
|
eam_ = new EAM(); |
| 56 |
|
sc_ = new SC(); |
| 57 |
|
electrostatic_ = new Electrostatic(); |
| 71 |
|
electrostatic_->setSimInfo(info_); |
| 72 |
|
electrostatic_->setForceField(forceField_); |
| 73 |
|
maw_->setForceField(forceField_); |
| 74 |
+ |
repulsivePower_->setForceField(forceField_); |
| 75 |
|
|
| 76 |
|
ForceField::AtomTypeContainer* atomTypes = forceField_->getAtomTypes(); |
| 77 |
|
ForceField::AtomTypeContainer::MapTypeIterator i1, i2; |
| 178 |
|
if (ifam == VANDERWAALS_FAMILY) interactions_[key].erase(*it); |
| 179 |
|
} |
| 180 |
|
interactions_[key].insert(morse_); |
| 181 |
+ |
vdwExplicit = true; |
| 182 |
+ |
} |
| 183 |
+ |
|
| 184 |
+ |
if (nbiType->isRepulsivePower()) { |
| 185 |
+ |
if (vdwExplicit) { |
| 186 |
+ |
sprintf( painCave.errMsg, |
| 187 |
+ |
"InteractionManager::initialize found more than one " |
| 188 |
+ |
"explicit \n" |
| 189 |
+ |
"\tvan der Waals interaction for atom types %s - %s\n", |
| 190 |
+ |
atype1->getName().c_str(), atype2->getName().c_str()); |
| 191 |
+ |
painCave.severity = OPENMD_ERROR; |
| 192 |
+ |
painCave.isFatal = 1; |
| 193 |
+ |
simError(); |
| 194 |
+ |
} |
| 195 |
+ |
// We found an explicit RepulsivePower interaction. |
| 196 |
+ |
// override all other vdw entries for this pair of atom types: |
| 197 |
+ |
set<NonBondedInteraction*>::iterator it; |
| 198 |
+ |
for (it = interactions_[key].begin(); |
| 199 |
+ |
it != interactions_[key].end(); ++it) { |
| 200 |
+ |
InteractionFamily ifam = (*it)->getFamily(); |
| 201 |
+ |
if (ifam == VANDERWAALS_FAMILY) interactions_[key].erase(*it); |
| 202 |
+ |
} |
| 203 |
+ |
interactions_[key].insert(repulsivePower_); |
| 204 |
|
vdwExplicit = true; |
| 205 |
|
} |
| 206 |
|
|
| 207 |
+ |
|
| 208 |
|
if (nbiType->isEAM()) { |
| 209 |
|
// We found an explicit EAM interaction. |
| 210 |
|
// override all other metallic entries for this pair of atom types: |