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

Comparing branches/development/src/nonbonded/MAW.cpp (file contents):
Revision 1532 by gezelter, Wed Dec 29 19:59:21 2010 UTC vs.
Revision 1549 by gezelter, Wed Apr 27 18:38:15 2011 UTC

# Line 124 | Line 124 | namespace OpenMD {
124      }    
125    }
126    
127 <  void MAW::calcForce(InteractionData idat) {
127 >  void MAW::calcForce(InteractionData &idat) {
128  
129      if (!initialized_) initialize();
130      
131    pair<AtomType*, AtomType*> key = make_pair(idat.atype1, idat.atype2);
131      map<pair<AtomType*, AtomType*>, MAWInteractionData>::iterator it;
132 <    it = MixingMap.find(key);
132 >    it = MixingMap.find(idat.atypes);
133      if (it != MixingMap.end()) {
134        MAWInteractionData mixer = (*it).second;
135        
# Line 145 | Line 144 | namespace OpenMD {
144        RealType ca1 = mixer.ca1;
145        RealType cb1 = mixer.cb1;
146  
147 <      bool j_is_Metal = idat.atype2->isMetal();
147 >      bool j_is_Metal = idat.atypes.second->isMetal();
148  
149        Vector3d r;
150        RotMat3x3d Atrans;
# Line 221 | Line 220 | namespace OpenMD {
220          
221        RealType pot_temp = idat.vdwMult * Vmorse * Vang;
222        idat.vpair += pot_temp;
223 <      idat.pot += idat.sw * pot_temp;
223 >      idat.pot[0] += idat.sw * pot_temp;
224            
225        Vector3d dVmorsedr = (myDeriv - myDerivC) * Vector3d(x, y, z) / idat.rij;
226      
# Line 271 | Line 270 | namespace OpenMD {
270      
271    }
272      
273 <  RealType MAW::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) {
273 >  RealType MAW::getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes) {
274      if (!initialized_) initialize();  
276    pair<AtomType*, AtomType*> key = make_pair(at1, at2);
275      map<pair<AtomType*, AtomType*>, MAWInteractionData>::iterator it;
276 <    it = MixingMap.find(key);
276 >    it = MixingMap.find(atypes);
277      if (it == MixingMap.end())
278        return 0.0;
279      else  {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines