Unverified Commit 1d310ad7 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add half a bond length safety margin to bond length based cutoff estimates

parent 20843f74
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -278,9 +278,10 @@ void Neighbor::init()
  // cutneighghost = pair cutghost if it requests it, else same as cutneigh

  // also consider bonded interactions for estimating the the neighborlist
  // and communication cutoff. we use the bond equilibrium distance as
  // cutoff, if only a bond style exists. if also an angle style exists we
  // multiply by 2, for dihedral or improper we multiply by 3.
  // and communication cutoff. we use the 1.5x the bond equilibrium distance
  // as cutoff, if only a bond style exists. if also an angle style exists we
  // multiply by 2.5, for dihedral or improper we multiply by 3.5. (1,2, or 3
  // bonds plus half a bond length total stretch).
  // this plus "skin" will become the default communication cutoff, if no
  // pair style is defined. otherwise the maximum of the largest pairwise
  // cutoff of this is used.
@@ -293,9 +294,11 @@ void Neighbor::init()
       maxbondcutoff = MAX(bondcutoff,maxbondcutoff);
    }
    if (force->dihedral || force->improper) {
      maxbondcutoff *= 3.0;
      maxbondcutoff *= 3.5;
    } else if (force->angle) {
      maxbondcutoff *=2.0;
      maxbondcutoff *=2.5;
    } else {
      maxbondcutoff *=1.5;
    }
  }