Weights on Edges of Chemical Graphs Determined by Paths