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

Comparing branches/devel_omp/src/nonbonded/InteractionManager.cpp (file contents):
Revision 1608 by mciznick, Tue Aug 9 01:58:56 2011 UTC vs.
Revision 1614 by mciznick, Tue Aug 23 20:55:51 2011 UTC

# Line 281 | Line 281 | namespace OpenMD {
281    }
282    
283    void InteractionManager::doPrePair(InteractionData idat){
284 <        printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__);
285 < /*    if (!initialized_) initialize();
284 > //      printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__);
285 >    if (!initialized_) initialize();
286          
287      // excluded interaction, so just return
288      if (idat.excluded) return;
# Line 294 | Line 294 | namespace OpenMD {
294        if ((*it)->getFamily() == METALLIC_FAMILY) {
295          dynamic_cast<MetallicInteraction*>(*it)->calcDensity(idat);
296        }
297 <    }*/
297 >    }
298      
299      return;    
300    }
# Line 336 | Line 336 | namespace OpenMD {
336      }
337      
338      return;    
339 +  }
340 +
341 +  void InteractionManager::initNonbondedForces() {
342 +        pair<AtomType*, AtomType*> key;
343 +                set<AtomType*> simTypes = info_->getSimulatedAtomTypes();
344 +                set<AtomType*>::iterator it, jt;
345 +                set<NonBondedInteraction*>::iterator kt;
346 +    AtomType* atype1;
347 +    AtomType* atype2;
348 +
349 +                for (it = simTypes.begin(); it != simTypes.end(); ++it) {
350 +                        atype1 = (*it);
351 +                        for (jt = it; jt != simTypes.end(); ++jt) {
352 +                                atype2 = (*jt);
353 +                                key = make_pair(atype1, atype2);
354 +
355 +                                for (kt = interactions_[ key ].begin();
356 +                                                kt != interactions_[ key ].end(); ++kt) {
357 +
358 +                                                (*kt)->initForce();
359 +                                }
360 +                        }
361 +                }
362 +
363 + /*      lj_->initForce();
364 +        electrostatic_->initForce();
365 +        sticky_->initForce();
366 +        eam_->initForce();
367 +        sc_->initForce();
368 +        gb_->initForce();*/
369 +
370 +                return;
371    }
372  
373    void InteractionManager::doPair(InteractionData idat){
374 <        printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__);
375 <    /*if (!initialized_) initialize();
374 > //      printf("%s\tERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n", __FUNCTION__);
375 >    if (!initialized_) initialize();
376  
377      set<NonBondedInteraction*>::iterator it;
378  
# Line 353 | Line 385 | namespace OpenMD {
385        if (!idat.excluded || (*it)->getFamily() == ELECTROSTATIC_FAMILY) {
386          (*it)->calcForce(idat);
387        }
388 <    }*/
388 >    }
389      
390      return;    
391    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines