35 |
|
* |
36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
54 |
|
SC::SC() : name_("SC"), initialized_(false), forceField_(NULL), |
55 |
|
scRcut_(0.0), np_(3000) {} |
56 |
|
|
57 |
+ |
SC::~SC() { |
58 |
+ |
initialized_ = false; |
59 |
+ |
|
60 |
+ |
MixingMap.clear(); |
61 |
+ |
SCMap.clear(); |
62 |
+ |
SClist.clear(); |
63 |
+ |
} |
64 |
+ |
|
65 |
|
RealType SC::getM(AtomType* atomType1, AtomType* atomType2) { |
66 |
|
SuttonChenAdapter sca1 = SuttonChenAdapter(atomType1); |
67 |
|
SuttonChenAdapter sca2 = SuttonChenAdapter(atomType2); |
286 |
|
*(sdat.dfrhodrho) = 0.5 * *(sdat.frho) / *(sdat.rho); |
287 |
|
|
288 |
|
(*(sdat.pot))[METALLIC_FAMILY] += u; |
289 |
< |
*(sdat.particlePot) += u; |
290 |
< |
|
289 |
> |
if (sdat.doParticlePot) { |
290 |
> |
*(sdat.particlePot) += u; |
291 |
> |
} |
292 |
> |
|
293 |
|
return; |
294 |
|
} |
295 |
|
|
325 |
|
|
326 |
|
*(idat.f1) += *(idat.d) * dudr / *(idat.rij) ; |
327 |
|
|
328 |
< |
// particlePot is the difference between the full potential and |
329 |
< |
// the full potential without the presence of a particular |
330 |
< |
// particle (atom1). |
331 |
< |
// |
332 |
< |
// This reduces the density at other particle locations, so we |
333 |
< |
// need to recompute the density at atom2 assuming atom1 didn't |
334 |
< |
// contribute. This then requires recomputing the density |
335 |
< |
// functional for atom2 as well. |
336 |
< |
|
337 |
< |
*(idat.particlePot1) -= data2.c * data2.epsilon * |
338 |
< |
sqrt( *(idat.rho2) - rhtmp) + *(idat.frho2); |
328 |
> |
if (idat.doParticlePot) { |
329 |
> |
// particlePot is the difference between the full potential and |
330 |
> |
// the full potential without the presence of a particular |
331 |
> |
// particle (atom1). |
332 |
> |
// |
333 |
> |
// This reduces the density at other particle locations, so we |
334 |
> |
// need to recompute the density at atom2 assuming atom1 didn't |
335 |
> |
// contribute. This then requires recomputing the density |
336 |
> |
// functional for atom2 as well. |
337 |
> |
|
338 |
> |
*(idat.particlePot1) -= data2.c * data2.epsilon * |
339 |
> |
sqrt( *(idat.rho2) - rhtmp) + *(idat.frho2); |
340 |
|
|
341 |
< |
*(idat.particlePot2) -= data1.c * data1.epsilon * |
342 |
< |
sqrt( *(idat.rho1) - rhtmp) + *(idat.frho1); |
341 |
> |
*(idat.particlePot2) -= data1.c * data1.epsilon * |
342 |
> |
sqrt( *(idat.rho1) - rhtmp) + *(idat.frho1); |
343 |
> |
} |
344 |
|
|
345 |
|
(*(idat.pot))[METALLIC_FAMILY] += pot_temp; |
346 |
|
} |