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

Comparing branches/development/src/nonbonded/Sticky.cpp (file contents):
Revision 1710 by gezelter, Fri May 18 21:44:02 2012 UTC vs.
Revision 1840 by gezelter, Mon Jan 28 15:44:32 2013 UTC

# Line 86 | Line 86 | namespace OpenMD {
86        painCave.severity = OPENMD_INFO;
87        painCave.isFatal = 0;
88        simError();        
89 <    }
89 >    }  
90      
91    RealType w0i, v0i, v0pi, rli, rui, rlpi, rupi;
92    
91      StickyAdapter sticky1 = StickyAdapter(atomType);
92  
93      // Now, iterate over all known types and add to the mixing map:
# Line 114 | Line 112 | namespace OpenMD {
112        mixer.rup  = 0.5 * ( sticky1.getRup() + sticky2.getRup() );
113        mixer.rbig = max(mixer.ru, mixer.rup);
114        mixer.w0  = sqrt( sticky1.getW0()   * sticky2.getW0()  );
115 <      mixer.v0  = sqrt( sticky1.getW0()   * sticky2.getV0()  );
115 >      mixer.v0  = sqrt( sticky1.getV0()   * sticky2.getV0()  );
116        mixer.v0p = sqrt( sticky1.getV0p()  * sticky2.getV0p() );
117        mixer.isPower = sticky1.isStickyPower() && sticky2.isStickyPower();
118  
# Line 235 | Line 233 | namespace OpenMD {
233            }
234          }
235          
236 +
237          RealType wi = 2.0*(xi2-yi2)*zi / r3;
238          RealType wj = 2.0*(xj2-yj2)*zj / r3;
239          RealType w = wi+wj;
# Line 286 | Line 285 | namespace OpenMD {
285                          0.0);
286          
287          if (isPower) {
288 +          cerr << "This is probably an error!\n";
289            RealType frac1 = 0.25;
290            RealType frac2 = 0.75;      
291            RealType wi2 = wi*wi;
# Line 305 | Line 305 | namespace OpenMD {
305            dspdr = 0.0;
306          }
307          
308 +
309 +
310          *(idat.vpair) += RealType(0.5)*(v0*s*w + v0p*sp*wp);
311          (*(idat.pot))[HYDROGENBONDING_FAMILY] += RealType(0.5)*(v0*s*w + v0p*sp*wp)* *(idat.sw) ;
312          
# Line 330 | Line 332 | namespace OpenMD {
332          Vector3d fjj = A2trans * radcomj;
333          
334          // now assemble these with the radial-only terms:
335 <        
335 >      
336          *(idat.f1) += RealType(0.5) * ((v0*dsdr*w + v0p*dspdr*wp) * *(idat.d) /
337                                         *(idat.rij)  + fii - fjj);
338          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines