ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/EAM.cpp
(Generate patch)

Comparing branches/development/src/nonbonded/EAM.cpp (file contents):
Revision 1710 by gezelter, Fri May 18 21:44:02 2012 UTC vs.
Revision 1711 by gezelter, Sat May 19 02:58:35 2012 UTC

# Line 300 | Line 300 | namespace OpenMD {
300      *(sdat.dfrhodrho) = result.second;
301  
302      (*(sdat.pot))[METALLIC_FAMILY] += result.first;
303 <    *(sdat.particlePot) += result.first;
303 >    if (sdat.doParticlePot) {
304 >      *(sdat.particlePot) += result.first;
305 >    }
306  
307      return;
308    }
# Line 392 | Line 394 | namespace OpenMD {
394      
395      *(idat.f1) += *(idat.d) * dudr / *(idat.rij);
396          
397 <    // particlePot is the difference between the full potential and
398 <    // the full potential without the presence of a particular
399 <    // particle (atom1).
400 <    //
401 <    // This reduces the density at other particle locations, so we
402 <    // need to recompute the density at atom2 assuming atom1 didn't
403 <    // contribute.  This then requires recomputing the density
404 <    // functional for atom2 as well.
405 <    
406 <    *(idat.particlePot1) += data2.F->getValueAt( *(idat.rho2) - rha )
407 <      - *(idat.frho2);
408 <    
409 <    *(idat.particlePot2) += data1.F->getValueAt( *(idat.rho1) - rhb)
410 <      - *(idat.frho1);
397 >    if (idat.doParticlePot) {
398 >      // particlePot is the difference between the full potential and
399 >      // the full potential without the presence of a particular
400 >      // particle (atom1).
401 >      //
402 >      // This reduces the density at other particle locations, so we
403 >      // need to recompute the density at atom2 assuming atom1 didn't
404 >      // contribute.  This then requires recomputing the density
405 >      // functional for atom2 as well.
406 >      
407 >      *(idat.particlePot1) += data2.F->getValueAt( *(idat.rho2) - rha )
408 >        - *(idat.frho2);
409 >      
410 >      *(idat.particlePot2) += data1.F->getValueAt( *(idat.rho1) - rhb)
411 >        - *(idat.frho1);
412 >    }
413      
414      (*(idat.pot))[METALLIC_FAMILY] += phab;
415      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines