code: function shouldIntroduceTraceBreak(aaStretch, prevResidue, thisResidue) {
    // these checks are on purpose more relaxed than the checks we use in 
    // deriveConnectivity(). We don't really care about correctness of bond 
    // lengths here. The only thing that matters is that the residues are 
    // more or less close so that they could potentially be connected.
    var prevAtom, thisAtom;
    if (aaStretch) {
      prevAtom = prevResidue.atom('C');
      thisAtom = thisResidue.atom('N');
    } else {
      prevAtom = prevResidue.atom('O3\'');
      thisAtom = thisResidue.atom('P');
    }
  
    // in case there is a bond, we don't introduce a chain break
    if (prevAtom.isConnectedTo(thisAtom)) {
      return false;
    }
    var sqrDist = vec3.sqrDist(prevAtom.pos(), thisAtom.pos());
    return (Math.abs(sqrDist - 1.5*1.5) > 1);
  }
docs: helper function to determine whether a trace break should be introduced between two residues of the same type (amino acid, or nucleotides).  aaStretch: indicates whether the residues are to be treated as amino acids