278 |
|
*(sdat.dfrhodrho) = 0.5 * *(sdat.frho) / *(sdat.rho); |
279 |
|
|
280 |
|
(*(sdat.pot))[METALLIC_FAMILY] += u; |
281 |
< |
*(sdat.particlePot) += u; |
282 |
< |
|
281 |
> |
if (sdat.doParticlePot) { |
282 |
> |
*(sdat.particlePot) += u; |
283 |
> |
} |
284 |
> |
|
285 |
|
return; |
286 |
|
} |
287 |
|
|
317 |
|
|
318 |
|
*(idat.f1) += *(idat.d) * dudr / *(idat.rij) ; |
319 |
|
|
320 |
< |
// particlePot is the difference between the full potential and |
321 |
< |
// the full potential without the presence of a particular |
322 |
< |
// particle (atom1). |
323 |
< |
// |
324 |
< |
// This reduces the density at other particle locations, so we |
325 |
< |
// need to recompute the density at atom2 assuming atom1 didn't |
326 |
< |
// contribute. This then requires recomputing the density |
327 |
< |
// functional for atom2 as well. |
328 |
< |
|
329 |
< |
*(idat.particlePot1) -= data2.c * data2.epsilon * |
330 |
< |
sqrt( *(idat.rho2) - rhtmp) + *(idat.frho2); |
320 |
> |
if (idat.doParticlePot) { |
321 |
> |
// particlePot is the difference between the full potential and |
322 |
> |
// the full potential without the presence of a particular |
323 |
> |
// particle (atom1). |
324 |
> |
// |
325 |
> |
// This reduces the density at other particle locations, so we |
326 |
> |
// need to recompute the density at atom2 assuming atom1 didn't |
327 |
> |
// contribute. This then requires recomputing the density |
328 |
> |
// functional for atom2 as well. |
329 |
> |
|
330 |
> |
*(idat.particlePot1) -= data2.c * data2.epsilon * |
331 |
> |
sqrt( *(idat.rho2) - rhtmp) + *(idat.frho2); |
332 |
|
|
333 |
< |
*(idat.particlePot2) -= data1.c * data1.epsilon * |
334 |
< |
sqrt( *(idat.rho1) - rhtmp) + *(idat.frho1); |
333 |
> |
*(idat.particlePot2) -= data1.c * data1.epsilon * |
334 |
> |
sqrt( *(idat.rho1) - rhtmp) + *(idat.frho1); |
335 |
> |
} |
336 |
|
|
337 |
|
(*(idat.pot))[METALLIC_FAMILY] += pot_temp; |
338 |
|
} |