302 |
|
return; |
303 |
|
} |
304 |
|
|
305 |
< |
void SC::calcDensity(DensityData ddat) { |
305 |
> |
void SC::calcDensity(DensityData &ddat) { |
306 |
|
|
307 |
|
if (!initialized_) initialize(); |
308 |
|
|
321 |
|
return; |
322 |
|
} |
323 |
|
|
324 |
< |
void SC::calcFunctional(FunctionalData fdat) { |
324 |
> |
void SC::calcFunctional(FunctionalData &fdat) { |
325 |
|
|
326 |
|
if (!initialized_) initialize(); |
327 |
|
|
334 |
|
} |
335 |
|
|
336 |
|
|
337 |
< |
void SC::calcForce(InteractionData idat) { |
337 |
> |
void SC::calcForce(InteractionData &idat) { |
338 |
|
|
339 |
|
if (!initialized_) initialize(); |
340 |
|
|
359 |
|
RealType dvpdr = res.second; |
360 |
|
|
361 |
|
RealType pot_temp = vptmp - vcij; |
362 |
< |
idat.vpair += pot_temp; |
362 |
> |
idat.vpair[3] += pot_temp; |
363 |
|
|
364 |
|
RealType dudr = drhodr * (idat.dfrho1 + idat.dfrho2) + dvpdr; |
365 |
|
|
380 |
|
idat.fshift1 = - data1.c * data1.epsilon * sqrt(idat.rho1 - rhtmp); |
381 |
|
idat.fshift2 = - data2.c * data2.epsilon * sqrt(idat.rho2 - rhtmp); |
382 |
|
|
383 |
< |
idat.pot += pot_temp; |
383 |
> |
idat.pot[3] += pot_temp; |
384 |
|
} |
385 |
|
|
386 |
|
return; |
387 |
|
} |
388 |
+ |
|
389 |
+ |
RealType SC::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { |
390 |
+ |
if (!initialized_) initialize(); |
391 |
+ |
pair<AtomType*, AtomType*> key = make_pair(at1, at2); |
392 |
+ |
map<pair<AtomType*, AtomType*>, SCInteractionData>::iterator it; |
393 |
+ |
it = MixingMap.find(key); |
394 |
+ |
if (it == MixingMap.end()) |
395 |
+ |
return 0.0; |
396 |
+ |
else { |
397 |
+ |
SCInteractionData mixer = (*it).second; |
398 |
+ |
return mixer.rCut; |
399 |
+ |
} |
400 |
+ |
} |
401 |
|
} |