code: private void stretch(IntStack stack, IAtom beg, IAtom end, double amount) {
          Point2d begPoint = beg.getPoint2d();
          Point2d endPoint = end.getPoint2d();
  
          if (begPoint.distance(endPoint) + amount > MAX_BOND_LENGTH)
              return;
  
          Vector2d vector = new Vector2d(endPoint.x - begPoint.x, endPoint.y - begPoint.y);
          vector.normalize();
          vector.scale(amount);
  
          for (int i = 0; i < stack.len; i++)
              atoms[stack.xs[i]].getPoint2d().add(vector);
      }
docs: Stretch the distance between beg and end, moving all atoms provided in
  the stack.
  
  @param stack  atoms to be moved
  @param beg    begin atom of a bond
  @param end    end atom of a bond
  @param amount amount to try stretching by (absolute)