| 240 |
|
} |
| 241 |
|
} |
| 242 |
|
|
| 243 |
< |
void LJ::calcForce(InteractionData idat) { |
| 243 |
> |
void LJ::calcForce(InteractionData &idat) { |
| 244 |
|
|
| 245 |
|
if (!initialized_) initialize(); |
| 246 |
|
|
| 247 |
– |
pair<AtomType*, AtomType*> key = make_pair(idat.atype1, idat.atype2); |
| 247 |
|
map<pair<AtomType*, AtomType*>, LJInteractionData>::iterator it; |
| 248 |
< |
it = MixingMap.find(key); |
| 248 |
> |
it = MixingMap.find(idat.atypes); |
| 249 |
|
|
| 250 |
|
if (it != MixingMap.end()) { |
| 251 |
|
|
| 284 |
|
RealType dudr = idat.sw * idat.vdwMult * epsilon * (myDeriv - |
| 285 |
|
myDerivC)*sigmai; |
| 286 |
|
|
| 287 |
< |
idat.pot += idat.sw * pot_temp; |
| 288 |
< |
idat.f1 = idat.d * dudr / idat.rij; |
| 290 |
< |
|
| 287 |
> |
idat.pot[0] += idat.sw * pot_temp; |
| 288 |
> |
idat.f1 = idat.d * dudr / idat.rij; |
| 289 |
|
} |
| 290 |
|
return; |
| 291 |
|
} |
| 305 |
|
return; |
| 306 |
|
} |
| 307 |
|
|
| 308 |
< |
RealType LJ::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { |
| 308 |
> |
RealType LJ::getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes) { |
| 309 |
|
if (!initialized_) initialize(); |
| 312 |
– |
pair<AtomType*, AtomType*> key = make_pair(at1, at2); |
| 310 |
|
map<pair<AtomType*, AtomType*>, LJInteractionData>::iterator it; |
| 311 |
< |
it = MixingMap.find(key); |
| 311 |
> |
it = MixingMap.find(atypes); |
| 312 |
|
if (it == MixingMap.end()) |
| 313 |
|
return 0.0; |
| 314 |
|
else { |