Electrical and mechanical effects in single-molecule junctions