def angstrom_to_axunits(val, ax):
    """
    Converts value in Angstrom to units of x axis
    - used to scale bond widths regardless of axis size

    Args:
    val (float): value in Angstroms
    ax (plt.axis): matplotlib axis object used to scale value
    """
    xr = ax.get_xlim()[1] - ax.get_xlim()[0]
    fig = ax.get_figure()
    width = fig.bbox_inches.width * ax.get_position().width
    width *= 72
    return val * (width / xr)
