code: static Vector2d getNearestVector(Vector2d reference, IAtom fromAtom, List<IBond> bonds) {
  
          final List<IAtom> toAtoms = new ArrayList<IAtom>();
          for (IBond bond : bonds) {
              toAtoms.add(bond.getOther(fromAtom));
          }
  
          return getNearestVector(reference, newUnitVectors(fromAtom, toAtoms));
      }
docs: Given a list of bonds, find the bond which is nearest to a provided
  reference and return the vector for this bond.
  
  @param reference a target vector
  @param fromAtom an atom (will be 0,0)
  @param bonds list of bonds containing 'fromAtom'
  @return the nearest vector