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 1505 by gezelter, Sun Oct 3 22:18:59 2010 UTC vs.
Revision 1549 by gezelter, Wed Apr 27 18:38:15 2011 UTC

# Line 186 | Line 186 | namespace OpenMD {
186     * idat structure.
187     */
188    
189 <  void Sticky::calcForce(InteractionData idat) {
189 >  void Sticky::calcForce(InteractionData &idat) {
190    
191      if (!initialized_) initialize();
192      
193    pair<AtomType*, AtomType*> key = make_pair(idat.atype1, idat.atype2);
193      map<pair<AtomType*, AtomType*>, StickyInteractionData>::iterator it;
194 <    it = MixingMap.find(key);
194 >    it = MixingMap.find(idat.atypes);
195      if (it != MixingMap.end()) {
196  
197        StickyInteractionData mixer = (*it).second;
# Line 344 | Line 343 | namespace OpenMD {
343          }
344          
345          idat.vpair += 0.5*(v0*s*w + v0p*sp*wp);
346 <        idat.pot += 0.5*(v0*s*w + v0p*sp*wp)*idat.sw;
346 >        idat.pot[2] += 0.5*(v0*s*w + v0p*sp*wp)*idat.sw;
347          
348          // do the torques first since they are easy:
349          // remember that these are still in the body-fixed axes
# Line 378 | Line 377 | namespace OpenMD {
377      return;      
378    }
379  
380 <  RealType Sticky::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) {
380 >  RealType Sticky::getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes) {
381      if (!initialized_) initialize();  
383    pair<AtomType*, AtomType*> key = make_pair(at1, at2);
382      map<pair<AtomType*, AtomType*>, StickyInteractionData>::iterator it;
383 <    it = MixingMap.find(key);
383 >    it = MixingMap.find(atypes);
384      if (it == MixingMap.end())
385        return 0.0;
386      else  {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines