Only calculates bonds in xyz when necessary.