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

Comparing branches/development/src/nonbonded/Morse.cpp (file contents):
Revision 1505 by gezelter, Sun Oct 3 22:18:59 2010 UTC vs.
Revision 1545 by gezelter, Fri Apr 8 21:25:19 2011 UTC

# Line 142 | Line 142 | namespace OpenMD {
142      }    
143    }
144    
145 <  void Morse::calcForce(InteractionData idat) {
145 >  void Morse::calcForce(InteractionData &idat) {
146  
147      if (!initialized_) initialize();
148      
149    pair<AtomType*, AtomType*> key = make_pair(idat.atype1, idat.atype2);
149      map<pair<AtomType*, AtomType*>, MorseInteractionData>::iterator it;
150 <    it = MixingMap.find(key);
150 >    it = MixingMap.find(idat.atypes);
151      if (it != MixingMap.end()) {
152        MorseInteractionData mixer = (*it).second;
153        
# Line 221 | Line 220 | namespace OpenMD {
220        }
221        
222        RealType pot_temp = idat.vdwMult * (myPot - myPotC);
223 <      idat.vpair += pot_temp;
223 >      idat.vpair[0] += pot_temp;
224        
225        RealType dudr = idat.sw * idat.vdwMult * (myDeriv - myDerivC);
226        
227 <      idat.pot += idat.sw * pot_temp;
227 >      idat.pot[0] += idat.sw * pot_temp;
228        idat.f1 = idat.d * dudr / idat.rij;
229      }
230      return;
231      
232    }
233      
234 <  RealType Morse::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) {
234 >  RealType Morse::getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes) {
235      if (!initialized_) initialize();  
237    pair<AtomType*, AtomType*> key = make_pair(at1, at2);
236      map<pair<AtomType*, AtomType*>, MorseInteractionData>::iterator it;
237 <    it = MixingMap.find(key);
237 >    it = MixingMap.find(atypes);
238      if (it == MixingMap.end())
239        return 0.0;
240      else  {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines