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

Comparing branches/development/src/nonbonded/EAM.cpp (file contents):
Revision 1504 by gezelter, Sat Oct 2 19:53:32 2010 UTC vs.
Revision 1505 by gezelter, Sun Oct 3 22:18:59 2010 UTC

# Line 486 | Line 486 | namespace OpenMD {
486      return;
487      
488    }
489 +
490 +  RealType EAM::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) {
491 +    if (!initialized_) initialize();  
492 +
493 +    RealType cut = 0.0;
494 +
495 +    map<AtomType*, EAMAtomData>::iterator it;
496 +
497 +    it = EAMMap.find(at1);
498 +    if (it != EAMMap.end()) {
499 +      EAMAtomData data1 = (*it).second;
500 +      cut = data1.rcut;
501 +    }
502 +
503 +    it = EAMMap.find(at2);
504 +    if (it != EAMMap.end()) {
505 +      EAMAtomData data2 = (*it).second;
506 +      if (data2.rcut > cut)
507 +        cut = data2.rcut;
508 +    }
509 +
510 +    return cut;
511 +  }
512   }
513  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines