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

Comparing branches/development/src/nonbonded/SC.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 278 | Line 278 | namespace OpenMD {
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    
# Line 315 | Line 317 | namespace OpenMD {
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      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines