| 124 |
|
} |
| 125 |
|
} |
| 126 |
|
|
| 127 |
< |
void MAW::calcForce(InteractionData idat) { |
| 127 |
> |
void MAW::calcForce(InteractionData &idat) { |
| 128 |
|
|
| 129 |
|
if (!initialized_) initialize(); |
| 130 |
|
|
| 131 |
– |
pair<AtomType*, AtomType*> key = make_pair(idat.atype1, idat.atype2); |
| 131 |
|
map<pair<AtomType*, AtomType*>, MAWInteractionData>::iterator it; |
| 132 |
< |
it = MixingMap.find(key); |
| 132 |
> |
it = MixingMap.find(idat.atypes); |
| 133 |
|
if (it != MixingMap.end()) { |
| 134 |
|
MAWInteractionData mixer = (*it).second; |
| 135 |
|
|
| 144 |
|
RealType ca1 = mixer.ca1; |
| 145 |
|
RealType cb1 = mixer.cb1; |
| 146 |
|
|
| 147 |
< |
bool j_is_Metal = idat.atype2->isMetal(); |
| 147 |
> |
bool j_is_Metal = idat.atypes.second->isMetal(); |
| 148 |
|
|
| 149 |
|
Vector3d r; |
| 150 |
|
RotMat3x3d Atrans; |
| 220 |
|
|
| 221 |
|
RealType pot_temp = idat.vdwMult * Vmorse * Vang; |
| 222 |
|
idat.vpair += pot_temp; |
| 223 |
< |
idat.pot += idat.sw * pot_temp; |
| 223 |
> |
idat.pot[0] += idat.sw * pot_temp; |
| 224 |
|
|
| 225 |
|
Vector3d dVmorsedr = (myDeriv - myDerivC) * Vector3d(x, y, z) / idat.rij; |
| 226 |
|
|
| 270 |
|
|
| 271 |
|
} |
| 272 |
|
|
| 273 |
< |
RealType MAW::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { |
| 273 |
> |
RealType MAW::getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes) { |
| 274 |
|
if (!initialized_) initialize(); |
| 276 |
– |
pair<AtomType*, AtomType*> key = make_pair(at1, at2); |
| 275 |
|
map<pair<AtomType*, AtomType*>, MAWInteractionData>::iterator it; |
| 276 |
< |
it = MixingMap.find(key); |
| 276 |
> |
it = MixingMap.find(atypes); |
| 277 |
|
if (it == MixingMap.end()) |
| 278 |
|
return 0.0; |
| 279 |
|
else { |