| 347 |
|
return; |
| 348 |
|
} |
| 349 |
|
|
| 350 |
< |
void EAM::calcDensity(DensityData ddat) { |
| 350 |
> |
void EAM::calcDensity(DensityData &ddat) { |
| 351 |
|
|
| 352 |
|
if (!initialized_) initialize(); |
| 353 |
|
|
| 363 |
|
return; |
| 364 |
|
} |
| 365 |
|
|
| 366 |
< |
void EAM::calcFunctional(FunctionalData fdat) { |
| 366 |
> |
void EAM::calcFunctional(FunctionalData &fdat) { |
| 367 |
|
|
| 368 |
|
if (!initialized_) initialize(); |
| 369 |
|
|
| 377 |
|
} |
| 378 |
|
|
| 379 |
|
|
| 380 |
< |
void EAM::calcForce(InteractionData idat) { |
| 380 |
> |
void EAM::calcForce(InteractionData &idat) { |
| 381 |
|
|
| 382 |
|
if (!initialized_) initialize(); |
| 383 |
|
|
| 478 |
|
idat.fshift1 = data1.F->getValueAt( idat.rho1 - rhb ); |
| 479 |
|
idat.fshift2 = data1.F->getValueAt( idat.rho2 - rha ); |
| 480 |
|
|
| 481 |
< |
idat.pot += phab; |
| 481 |
> |
idat.pot[3] += phab; |
| 482 |
|
|
| 483 |
< |
idat.vpair += phab; |
| 483 |
> |
idat.vpair[3] += phab; |
| 484 |
|
} |
| 485 |
|
|
| 486 |
|
return; |
| 487 |
|
|
| 488 |
|
} |
| 489 |
+ |
|
| 490 |
+ |
RealType EAM::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { |
| 491 |
+ |
if (!initialized_) initialize(); |
| 492 |
+ |
|
| 493 |
+ |
RealType cut = 0.0; |
| 494 |
+ |
|
| 495 |
+ |
map<AtomType*, EAMAtomData>::iterator it; |
| 496 |
+ |
|
| 497 |
+ |
it = EAMMap.find(at1); |
| 498 |
+ |
if (it != EAMMap.end()) { |
| 499 |
+ |
EAMAtomData data1 = (*it).second; |
| 500 |
+ |
cut = data1.rcut; |
| 501 |
+ |
} |
| 502 |
+ |
|
| 503 |
+ |
it = EAMMap.find(at2); |
| 504 |
+ |
if (it != EAMMap.end()) { |
| 505 |
+ |
EAMAtomData data2 = (*it).second; |
| 506 |
+ |
if (data2.rcut > cut) |
| 507 |
+ |
cut = data2.rcut; |
| 508 |
+ |
} |
| 509 |
+ |
|
| 510 |
+ |
return cut; |
| 511 |
+ |
} |
| 512 |
|
} |
| 513 |
|
|