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

Comparing branches/development/src/nonbonded/GB.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 366 | Line 366 | namespace OpenMD {
366      return;
367  
368    }
369 +
370 +  RealType GB::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) {
371 +    if (!initialized_) initialize();  
372 +
373 +    RealType cut = 0.0;
374 +
375 +    if (at1->isGayBerne()) {
376 +      GayBerneParam gb1 = getGayBerneParam(at1);
377 +      RealType d1 = gb1.GB_d;
378 +      RealType l1 = gb1.GB_l;
379 +      // sigma is actually sqrt(2)*l  for prolate ellipsoids
380 +      cut = max(cut, 2.5 * sqrt(2.0) * max(d1, l1));
381 +    } else if (at1->isLennardJones()) {
382 +      cut = max(cut, 2.5 * getLJSigma(at1));
383 +    }
384 +
385 +    if (at2->isGayBerne()) {
386 +      GayBerneParam gb2 = getGayBerneParam(at2);
387 +      RealType d2 = gb2.GB_d;
388 +      RealType l2 = gb2.GB_l;
389 +      cut = max(cut, 2.5 * sqrt(2.0) * max(d2, l2));
390 +    } else if (at1->isLennardJones()) {
391 +      cut = max(cut, 2.5 * getLJSigma(at2));
392 +    }
393 +  
394 +    return cut;
395 +  }
396   }
397  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines